From 70ae25069bac1244e50bcaabc98962e3a8471de6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 3 Aug 2022 18:32:16 +0000 Subject: [PATCH] feat: new model service to manage recommendation models (#497) - [ ] Regenerate this pull request now. feat: support case insensitive match on search facets feat: allow disabling spell check in search requests feat: allow adding labels in search requests feat: allow returning min/max values on search numeric facets feat: allow using serving configs as an alias of placements feat: allow enabling recommendation filtering on custom attributes feat: return output BigQuery table on product / event export response feat: allow skiping default branch protection when doing product full import docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 464664497 Source-Link: https://github.com/googleapis/googleapis/commit/c30c9ccfd90bebbe16375d19a666e2651e81931f Source-Link: https://github.com/googleapis/googleapis-gen/commit/a7fe8d672b8cbbadc5ab32253dea50e4c3d8e390 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTdmZThkNjcyYjhjYmJhZGM1YWIzMjI1M2RlYTUwZTRjM2Q4ZTM5MCJ9 feat: support case insensitive match on search facets feat: allow to return min/max values on search numeric facets feat: allow to use serving configs as an alias of placements docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 464560246 Source-Link: https://github.com/googleapis/googleapis/commit/139f56eefb531a0d47bd52720160103a2b9e7fe5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eca9b7ecbdc2c64c2d0ec2e6688f6353aff162ef Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWNhOWI3ZWNiZGMyYzY0YzJkMGVjMmU2Njg4ZjYzNTNhZmYxNjJlZiJ9 feat: support case insensitive match on search facets feat: allow disabling spell check in search requests feat: allow adding labels in search requests feat: allow returning min/max values on search numeric facets feat: allow using serving configs as an alias of placements feat: allow enabling recommendation filtering on custom attributes feat: return output BigQuery table on product / event export response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 463980128 Source-Link: https://github.com/googleapis/googleapis/commit/d6bce0ee59fb796e8df417f3058e4197a1a0c38a Source-Link: https://github.com/googleapis/googleapis-gen/commit/e3d1296a9592b9fe714a7cbe8d2acc4bf42f4ec2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTNkMTI5NmE5NTkyYjlmZTcxNGE3Y2JlOGQyYWNjNGJmNDJmNGVjMiJ9 --- .../cloud/retail/v2/ProductServiceClient.java | 245 +- .../stub/HttpJsonPredictionServiceStub.java | 2 + .../v2/stub/HttpJsonSearchServiceStub.java | 2 + .../retail/v2alpha/CatalogServiceClient.java | 4 +- .../retail/v2alpha/ControlServiceClient.java | 16 +- .../retail/v2alpha/ModelServiceClient.java | 1067 ++ .../retail/v2alpha/ModelServiceSettings.java | 294 + .../retail/v2alpha/ProductServiceClient.java | 284 +- .../retail/v2alpha/SearchServiceClient.java | 8 + .../v2alpha/ServingConfigServiceClient.java | 4 +- .../v2alpha/UserEventServiceClient.java | 6 +- .../cloud/retail/v2alpha/gapic_metadata.json | 30 + .../cloud/retail/v2alpha/package-info.java | 29 + .../stub/GrpcModelServiceCallableFactory.java | 115 + .../v2alpha/stub/GrpcModelServiceStub.java | 375 + .../HttpJsonModelServiceCallableFactory.java | 105 + .../stub/HttpJsonModelServiceStub.java | 563 + .../stub/HttpJsonPredictionServiceStub.java | 2 + .../stub/HttpJsonSearchServiceStub.java | 2 + .../retail/v2alpha/stub/ModelServiceStub.java | 104 + .../stub/ModelServiceStubSettings.java | 631 + .../stub/ProductServiceStubSettings.java | 12 +- .../stub/UserEventServiceStubSettings.java | 12 +- .../retail/v2beta/CatalogServiceClient.java | 4 +- .../retail/v2beta/ControlServiceClient.java | 16 +- .../retail/v2beta/ProductServiceClient.java | 269 +- .../retail/v2beta/SearchServiceClient.java | 8 + .../v2beta/ServingConfigServiceClient.java | 4 +- .../retail/v2beta/UserEventServiceClient.java | 6 +- .../cloud/retail/v2beta/package-info.java | 2 + .../stub/HttpJsonPredictionServiceStub.java | 2 + .../stub/HttpJsonSearchServiceStub.java | 2 + .../retail/v2alpha/MockModelService.java | 59 + .../retail/v2alpha/MockModelServiceImpl.java | 203 + .../ModelServiceClientHttpJsonTest.java | 722 ++ .../v2alpha/ModelServiceClientTest.java | 637 + .../ProductServiceClientHttpJsonTest.java | 2 + .../v2alpha/ProductServiceClientTest.java | 4 + .../SearchServiceClientHttpJsonTest.java | 5 + .../v2alpha/SearchServiceClientTest.java | 7 + .../UserEventServiceClientHttpJsonTest.java | 4 +- .../v2alpha/UserEventServiceClientTest.java | 4 +- .../SearchServiceClientHttpJsonTest.java | 5 + .../v2beta/SearchServiceClientTest.java | 7 + .../UserEventServiceClientHttpJsonTest.java | 4 +- .../v2beta/UserEventServiceClientTest.java | 4 +- .../cloud/retail/v2/ProductServiceGrpc.java | 220 +- .../retail/v2alpha/ModelServiceGrpc.java | 1078 ++ .../retail/v2alpha/ProductServiceGrpc.java | 216 +- .../retail/v2beta/ProductServiceGrpc.java | 200 +- .../v2/AddFulfillmentPlacesRequest.java | 21 +- .../AddFulfillmentPlacesRequestOrBuilder.java | 6 +- .../cloud/retail/v2/CompleteQueryRequest.java | 26 + .../v2/CompleteQueryRequestOrBuilder.java | 8 + .../retail/v2/CompleteQueryResponse.java | 126 +- .../v2/CompleteQueryResponseOrBuilder.java | 10 +- .../cloud/retail/v2/CreateProductRequest.java | 8 +- .../cloud/retail/v2/DeleteProductRequest.java | 8 +- .../cloud/retail/v2/GetProductRequest.java | 8 +- .../cloud/retail/v2/PredictRequest.java | 278 +- .../retail/v2/PredictRequestOrBuilder.java | 82 +- .../retail/v2/PredictionServiceProto.java | 71 +- .../v2/RemoveFulfillmentPlacesMetadata.java | 6 +- .../v2/RemoveFulfillmentPlacesRequest.java | 8 +- .../v2/RemoveFulfillmentPlacesResponse.java | 6 +- .../v2/RemoveLocalInventoriesMetadata.java | 6 +- .../v2/RemoveLocalInventoriesRequest.java | 8 +- .../v2/RemoveLocalInventoriesResponse.java | 14 +- .../google/cloud/retail/v2/SearchRequest.java | 430 +- .../retail/v2/SearchRequestOrBuilder.java | 12 +- .../cloud/retail/v2/SearchResponse.java | 268 +- .../retail/v2/SearchResponseOrBuilder.java | 4 +- .../cloud/retail/v2/SearchServiceProto.java | 170 +- .../cloud/retail/v2/SetInventoryMetadata.java | 6 +- .../cloud/retail/v2/SetInventoryRequest.java | 200 +- .../v2/SetInventoryRequestOrBuilder.java | 48 +- .../cloud/retail/v2/SetInventoryResponse.java | 6 +- .../cloud/retail/v2/UpdateProductRequest.java | 8 +- .../proto/google/cloud/retail/v2/common.proto | 10 +- .../cloud/retail/v2/completion_service.proto | 10 +- .../cloud/retail/v2/prediction_service.proto | 46 +- .../cloud/retail/v2/product_service.proto | 125 +- .../cloud/retail/v2/search_service.proto | 58 +- .../v2alpha/AddCatalogAttributeRequest.java | 14 +- .../AddCatalogAttributeRequestOrBuilder.java | 4 +- .../v2alpha/AddFulfillmentPlacesMetadata.java | 6 +- .../v2alpha/AddFulfillmentPlacesRequest.java | 29 +- .../AddFulfillmentPlacesRequestOrBuilder.java | 6 +- .../v2alpha/AddFulfillmentPlacesResponse.java | 6 +- .../v2alpha/AddLocalInventoriesMetadata.java | 6 +- .../v2alpha/AddLocalInventoriesRequest.java | 8 +- .../v2alpha/AddLocalInventoriesResponse.java | 14 +- .../retail/v2alpha/AttributeConfigLevel.java | 4 +- .../retail/v2alpha/BigQueryOutputResult.java | 817 ++ .../BigQueryOutputResultOrBuilder.java | 75 + .../retail/v2alpha/CatalogAttribute.java | 315 +- .../v2alpha/CatalogAttributeOrBuilder.java | 66 +- .../cloud/retail/v2alpha/CatalogProto.java | 125 +- .../cloud/retail/v2alpha/CommonProto.java | 100 +- .../retail/v2alpha/CompleteQueryRequest.java | 68 +- .../CompleteQueryRequestOrBuilder.java | 20 +- .../retail/v2alpha/CompleteQueryResponse.java | 110 +- .../CompleteQueryResponseOrBuilder.java | 10 +- .../retail/v2alpha/CompletionConfig.java | 204 +- .../v2alpha/CompletionConfigOrBuilder.java | 52 +- .../google/cloud/retail/v2alpha/Control.java | 14 +- .../retail/v2alpha/ControlOrBuilder.java | 4 +- .../retail/v2alpha/CreateControlRequest.java | 14 +- .../CreateControlRequestOrBuilder.java | 4 +- .../retail/v2alpha/CreateModelMetadata.java | 652 + .../v2alpha/CreateModelMetadataOrBuilder.java | 54 + .../retail/v2alpha/CreateModelRequest.java | 1036 ++ .../v2alpha/CreateModelRequestOrBuilder.java | 108 + .../retail/v2alpha/CreateProductRequest.java | 8 +- .../v2alpha/CreateServingConfigRequest.java | 14 +- .../CreateServingConfigRequestOrBuilder.java | 4 +- .../cloud/retail/v2alpha/CustomAttribute.java | 186 +- .../v2alpha/CustomAttributeOrBuilder.java | 62 +- .../retail/v2alpha/DeleteControlRequest.java | 14 +- .../DeleteControlRequestOrBuilder.java | 4 +- .../retail/v2alpha/DeleteModelRequest.java | 666 + .../v2alpha/DeleteModelRequestOrBuilder.java | 58 + .../retail/v2alpha/DeleteProductRequest.java | 8 +- .../retail/v2alpha/ExportConfigProto.java | 59 +- .../v2alpha/ExportProductsResponse.java | 302 +- .../ExportProductsResponseOrBuilder.java | 41 +- .../v2alpha/ExportUserEventsResponse.java | 314 +- .../ExportUserEventsResponseOrBuilder.java | 44 +- .../v2alpha/GetAttributesConfigRequest.java | 14 +- .../GetAttributesConfigRequestOrBuilder.java | 4 +- .../retail/v2alpha/GetControlRequest.java | 14 +- .../v2alpha/GetControlRequestOrBuilder.java | 4 +- .../retail/v2alpha/GetProductRequest.java | 8 +- .../retail/v2alpha/ImportConfigProto.java | 6 +- .../cloud/retail/v2alpha/ImportMetadata.java | 14 +- .../v2alpha/ImportMetadataOrBuilder.java | 4 +- .../retail/v2alpha/ImportProductsRequest.java | 181 +- .../ImportProductsRequestOrBuilder.java | 38 +- .../retail/v2alpha/ListControlsRequest.java | 14 +- .../v2alpha/ListControlsRequestOrBuilder.java | 4 +- .../retail/v2alpha/ListModelsRequest.java | 946 ++ .../v2alpha/ListModelsRequestOrBuilder.java | 99 + .../retail/v2alpha/ListModelsResponse.java | 1129 ++ .../v2alpha/ListModelsResponseOrBuilder.java | 101 + .../google/cloud/retail/v2alpha/Model.java | 10572 ++++++++++++++++ .../cloud/retail/v2alpha/ModelName.java | 257 + .../cloud/retail/v2alpha/ModelOrBuilder.java | 601 + .../cloud/retail/v2alpha/ModelProto.java | 207 + .../retail/v2alpha/ModelServiceProto.java | 278 + .../cloud/retail/v2alpha/OutputResult.java | 966 ++ .../retail/v2alpha/OutputResultOrBuilder.java | 78 + .../retail/v2alpha/PauseModelRequest.java | 666 + .../v2alpha/PauseModelRequestOrBuilder.java | 58 + .../cloud/retail/v2alpha/PredictRequest.java | 376 +- .../v2alpha/PredictRequestOrBuilder.java | 111 +- .../cloud/retail/v2alpha/PredictResponse.java | 64 +- .../v2alpha/PredictionServiceProto.java | 77 +- .../cloud/retail/v2alpha/PriceInfo.java | 24 +- .../retail/v2alpha/PriceInfoOrBuilder.java | 6 +- .../google/cloud/retail/v2alpha/Product.java | 48 +- .../retail/v2alpha/ProductLevelConfig.java | 112 +- .../v2alpha/ProductLevelConfigOrBuilder.java | 32 +- .../retail/v2alpha/ProductOrBuilder.java | 12 +- .../retail/v2alpha/PurgeConfigProto.java | 21 +- .../v2alpha/PurgeUserEventsRequest.java | 28 +- .../PurgeUserEventsRequestOrBuilder.java | 8 +- .../RecommendationsFilteringOption.java | 183 + .../RemoveCatalogAttributeRequest.java | 14 +- ...emoveCatalogAttributeRequestOrBuilder.java | 4 +- .../RemoveFulfillmentPlacesMetadata.java | 6 +- .../RemoveFulfillmentPlacesRequest.java | 29 +- ...moveFulfillmentPlacesRequestOrBuilder.java | 6 +- .../RemoveFulfillmentPlacesResponse.java | 6 +- .../RemoveLocalInventoriesMetadata.java | 6 +- .../RemoveLocalInventoriesRequest.java | 8 +- .../RemoveLocalInventoriesResponse.java | 14 +- .../ReplaceCatalogAttributeRequest.java | 14 +- ...placeCatalogAttributeRequestOrBuilder.java | 4 +- .../retail/v2alpha/ResumeModelRequest.java | 652 + .../v2alpha/ResumeModelRequestOrBuilder.java | 54 + .../com/google/cloud/retail/v2alpha/Rule.java | 28 +- .../cloud/retail/v2alpha/SearchRequest.java | 2966 ++++- .../v2alpha/SearchRequestOrBuilder.java | 237 +- .../cloud/retail/v2alpha/SearchResponse.java | 310 +- .../v2alpha/SearchResponseOrBuilder.java | 16 +- .../retail/v2alpha/SearchServiceProto.java | 220 +- .../retail/v2alpha/SearchSolutionUseCase.java | 10 +- .../cloud/retail/v2alpha/ServingConfig.java | 131 +- .../v2alpha/ServingConfigOrBuilder.java | 40 +- .../retail/v2alpha/SetInventoryMetadata.java | 6 +- .../retail/v2alpha/SetInventoryRequest.java | 200 +- .../v2alpha/SetInventoryRequestOrBuilder.java | 48 +- .../retail/v2alpha/SetInventoryResponse.java | 6 +- .../retail/v2alpha/TuneModelMetadata.java | 652 + .../v2alpha/TuneModelMetadataOrBuilder.java | 54 + .../retail/v2alpha/TuneModelRequest.java | 667 + .../v2alpha/TuneModelRequestOrBuilder.java | 58 + .../retail/v2alpha/TuneModelResponse.java | 458 + .../v2alpha/TuneModelResponseOrBuilder.java | 24 + .../retail/v2alpha/UpdateModelRequest.java | 1037 ++ .../v2alpha/UpdateModelRequestOrBuilder.java | 104 + .../retail/v2alpha/UpdateProductRequest.java | 56 +- .../UpdateProductRequestOrBuilder.java | 12 + .../cloud/retail/v2alpha/UserEvent.java | 104 +- .../retail/v2alpha/UserEventOrBuilder.java | 25 +- .../google/cloud/retail/v2alpha/UserInfo.java | 35 +- .../retail/v2alpha/UserInfoOrBuilder.java | 10 +- .../google/cloud/retail/v2alpha/catalog.proto | 72 +- .../retail/v2alpha/catalog_service.proto | 8 +- .../google/cloud/retail/v2alpha/common.proto | 82 +- .../retail/v2alpha/completion_service.proto | 21 +- .../google/cloud/retail/v2alpha/control.proto | 2 +- .../retail/v2alpha/control_service.proto | 8 +- .../cloud/retail/v2alpha/export_config.proto | 26 +- .../cloud/retail/v2alpha/import_config.proto | 20 +- .../google/cloud/retail/v2alpha/model.proto | 432 + .../cloud/retail/v2alpha/model_service.proto | 241 + .../retail/v2alpha/prediction_service.proto | 54 +- .../google/cloud/retail/v2alpha/product.proto | 4 +- .../retail/v2alpha/product_service.proto | 156 +- .../cloud/retail/v2alpha/purge_config.proto | 5 +- .../cloud/retail/v2alpha/search_service.proto | 165 +- .../cloud/retail/v2alpha/serving_config.proto | 11 +- .../v2alpha/serving_config_service.proto | 2 +- .../cloud/retail/v2alpha/user_event.proto | 9 +- .../v2beta/AddCatalogAttributeRequest.java | 14 +- .../AddCatalogAttributeRequestOrBuilder.java | 4 +- .../v2beta/AddFulfillmentPlacesMetadata.java | 6 +- .../v2beta/AddFulfillmentPlacesRequest.java | 29 +- .../AddFulfillmentPlacesRequestOrBuilder.java | 6 +- .../v2beta/AddFulfillmentPlacesResponse.java | 6 +- .../v2beta/AddLocalInventoriesMetadata.java | 6 +- .../v2beta/AddLocalInventoriesRequest.java | 8 +- .../v2beta/AddLocalInventoriesResponse.java | 14 +- .../retail/v2beta/AttributeConfigLevel.java | 4 +- .../retail/v2beta/BigQueryOutputResult.java | 817 ++ .../v2beta/BigQueryOutputResultOrBuilder.java | 75 + .../cloud/retail/v2beta/CatalogAttribute.java | 311 +- .../v2beta/CatalogAttributeOrBuilder.java | 64 +- .../cloud/retail/v2beta/CatalogProto.java | 124 +- .../cloud/retail/v2beta/CommonProto.java | 100 +- .../retail/v2beta/CompleteQueryRequest.java | 68 +- .../v2beta/CompleteQueryRequestOrBuilder.java | 20 +- .../retail/v2beta/CompleteQueryResponse.java | 110 +- .../CompleteQueryResponseOrBuilder.java | 10 +- .../cloud/retail/v2beta/CompletionConfig.java | 204 +- .../v2beta/CompletionConfigOrBuilder.java | 52 +- .../google/cloud/retail/v2beta/Control.java | 14 +- .../cloud/retail/v2beta/ControlOrBuilder.java | 4 +- .../retail/v2beta/CreateControlRequest.java | 14 +- .../v2beta/CreateControlRequestOrBuilder.java | 4 +- .../retail/v2beta/CreateProductRequest.java | 8 +- .../v2beta/CreateServingConfigRequest.java | 14 +- .../CreateServingConfigRequestOrBuilder.java | 4 +- .../cloud/retail/v2beta/CustomAttribute.java | 186 +- .../v2beta/CustomAttributeOrBuilder.java | 62 +- .../retail/v2beta/DeleteControlRequest.java | 14 +- .../v2beta/DeleteControlRequestOrBuilder.java | 4 +- .../retail/v2beta/DeleteProductRequest.java | 8 +- .../retail/v2beta/ExportConfigProto.java | 59 +- .../retail/v2beta/ExportProductsResponse.java | 302 +- .../ExportProductsResponseOrBuilder.java | 41 +- .../v2beta/ExportUserEventsResponse.java | 314 +- .../ExportUserEventsResponseOrBuilder.java | 44 +- .../v2beta/GetAttributesConfigRequest.java | 14 +- .../GetAttributesConfigRequestOrBuilder.java | 4 +- .../retail/v2beta/GetControlRequest.java | 14 +- .../v2beta/GetControlRequestOrBuilder.java | 4 +- .../retail/v2beta/GetProductRequest.java | 8 +- .../cloud/retail/v2beta/ImportMetadata.java | 14 +- .../v2beta/ImportMetadataOrBuilder.java | 4 +- .../retail/v2beta/ImportProductsRequest.java | 70 +- .../ImportProductsRequestOrBuilder.java | 20 +- .../retail/v2beta/ListControlsRequest.java | 14 +- .../v2beta/ListControlsRequestOrBuilder.java | 4 +- .../cloud/retail/v2beta/OutputResult.java | 966 ++ .../retail/v2beta/OutputResultOrBuilder.java | 78 + .../cloud/retail/v2beta/PredictRequest.java | 341 +- .../v2beta/PredictRequestOrBuilder.java | 101 +- .../cloud/retail/v2beta/PredictResponse.java | 64 +- .../retail/v2beta/PredictionServiceProto.java | 77 +- .../google/cloud/retail/v2beta/PriceInfo.java | 24 +- .../retail/v2beta/PriceInfoOrBuilder.java | 6 +- .../google/cloud/retail/v2beta/Product.java | 48 +- .../retail/v2beta/ProductLevelConfig.java | 112 +- .../v2beta/ProductLevelConfigOrBuilder.java | 32 +- .../cloud/retail/v2beta/ProductOrBuilder.java | 12 +- .../cloud/retail/v2beta/PurgeConfigProto.java | 22 +- .../retail/v2beta/PurgeUserEventsRequest.java | 28 +- .../PurgeUserEventsRequestOrBuilder.java | 8 +- .../RecommendationsFilteringOption.java | 183 + .../v2beta/RemoveCatalogAttributeRequest.java | 14 +- ...emoveCatalogAttributeRequestOrBuilder.java | 4 +- .../RemoveFulfillmentPlacesMetadata.java | 6 +- .../RemoveFulfillmentPlacesRequest.java | 29 +- ...moveFulfillmentPlacesRequestOrBuilder.java | 6 +- .../RemoveFulfillmentPlacesResponse.java | 6 +- .../RemoveLocalInventoriesMetadata.java | 6 +- .../v2beta/RemoveLocalInventoriesRequest.java | 8 +- .../RemoveLocalInventoriesResponse.java | 14 +- .../ReplaceCatalogAttributeRequest.java | 14 +- ...placeCatalogAttributeRequestOrBuilder.java | 4 +- .../com/google/cloud/retail/v2beta/Rule.java | 28 +- .../cloud/retail/v2beta/SearchRequest.java | 2955 ++++- .../retail/v2beta/SearchRequestOrBuilder.java | 237 +- .../cloud/retail/v2beta/SearchResponse.java | 310 +- .../v2beta/SearchResponseOrBuilder.java | 16 +- .../retail/v2beta/SearchServiceProto.java | 212 +- .../retail/v2beta/SearchSolutionUseCase.java | 10 +- .../cloud/retail/v2beta/ServingConfig.java | 131 +- .../retail/v2beta/ServingConfigOrBuilder.java | 40 +- .../retail/v2beta/SetInventoryMetadata.java | 6 +- .../retail/v2beta/SetInventoryRequest.java | 200 +- .../v2beta/SetInventoryRequestOrBuilder.java | 48 +- .../retail/v2beta/SetInventoryResponse.java | 6 +- .../retail/v2beta/UpdateProductRequest.java | 56 +- .../v2beta/UpdateProductRequestOrBuilder.java | 12 + .../google/cloud/retail/v2beta/UserEvent.java | 104 +- .../retail/v2beta/UserEventOrBuilder.java | 25 +- .../google/cloud/retail/v2beta/UserInfo.java | 35 +- .../retail/v2beta/UserInfoOrBuilder.java | 10 +- .../google/cloud/retail/v2beta/catalog.proto | 71 +- .../cloud/retail/v2beta/catalog_service.proto | 8 +- .../google/cloud/retail/v2beta/common.proto | 82 +- .../retail/v2beta/completion_service.proto | 21 +- .../google/cloud/retail/v2beta/control.proto | 2 +- .../cloud/retail/v2beta/control_service.proto | 8 +- .../cloud/retail/v2beta/export_config.proto | 26 +- .../cloud/retail/v2beta/import_config.proto | 11 +- .../retail/v2beta/prediction_service.proto | 52 +- .../google/cloud/retail/v2beta/product.proto | 4 +- .../cloud/retail/v2beta/product_service.proto | 152 +- .../cloud/retail/v2beta/purge_config.proto | 5 +- .../cloud/retail/v2beta/search_service.proto | 160 +- .../cloud/retail/v2beta/serving_config.proto | 11 +- .../v2beta/serving_config_service.proto | 2 +- .../cloud/retail/v2beta/user_event.proto | 9 +- .../SyncCreateSetCredentialsProvider.java | 41 + .../SyncCreateSetCredentialsProvider1.java | 40 + .../create/SyncCreateSetEndpoint.java | 38 + .../createmodel/AsyncCreateModel.java | 49 + .../createmodel/AsyncCreateModelLRO.java | 50 + .../createmodel/SyncCreateModel.java | 45 + .../SyncCreateModelCatalognameModel.java | 40 + .../SyncCreateModelStringModel.java | 40 + .../deletemodel/AsyncDeleteModel.java | 46 + .../deletemodel/SyncDeleteModel.java | 43 + .../deletemodel/SyncDeleteModelModelname.java | 39 + .../deletemodel/SyncDeleteModelString.java | 39 + .../listmodels/AsyncListModels.java | 50 + .../listmodels/AsyncListModelsPaged.java | 58 + .../listmodels/SyncListModels.java | 47 + .../listmodels/SyncListModelsCatalogname.java | 41 + .../listmodels/SyncListModelsString.java | 41 + .../pausemodel/AsyncPauseModel.java | 46 + .../pausemodel/SyncPauseModel.java | 43 + .../pausemodel/SyncPauseModelModelname.java | 39 + .../pausemodel/SyncPauseModelString.java | 39 + .../resumemodel/AsyncResumeModel.java | 42 + .../resumemodel/SyncResumeModel.java | 39 + .../resumemodel/SyncResumeModelString.java | 38 + .../tunemodel/AsyncTuneModel.java | 46 + .../tunemodel/AsyncTuneModelLRO.java | 48 + .../tunemodel/SyncTuneModel.java | 43 + .../tunemodel/SyncTuneModelModelname.java | 39 + .../tunemodel/SyncTuneModelString.java | 39 + .../updatemodel/AsyncUpdateModel.java | 47 + .../updatemodel/SyncUpdateModel.java | 44 + .../SyncUpdateModelModelFieldmask.java | 40 + .../pausemodel/SyncPauseModel.java | 45 + .../importproducts/AsyncImportProducts.java | 1 + .../AsyncImportProductsLRO.java | 1 + .../importproducts/SyncImportProducts.java | 1 + .../search/AsyncSearch.java | 3 + .../search/AsyncSearchPaged.java | 3 + .../search/SyncSearch.java | 3 + .../pausemodel/SyncPauseModel.java | 46 + .../purgeuserevents/AsyncPurgeUserEvents.java | 3 +- .../AsyncPurgeUserEventsLRO.java | 3 +- .../purgeuserevents/SyncPurgeUserEvents.java | 3 +- .../search/AsyncSearch.java | 3 + .../search/AsyncSearchPaged.java | 3 + .../search/SyncSearch.java | 3 + .../purgeuserevents/AsyncPurgeUserEvents.java | 3 +- .../AsyncPurgeUserEventsLRO.java | 3 +- .../purgeuserevents/SyncPurgeUserEvents.java | 3 +- 386 files changed, 49441 insertions(+), 5114 deletions(-) create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceCallableFactory.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceStub.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceCallableFactory.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStub.java create mode 100644 google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java create mode 100644 google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelService.java create mode 100644 google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelServiceImpl.java create mode 100644 google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java create mode 100644 google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java create mode 100644 grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceGrpc.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResultOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadataOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponseOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelName.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceProto.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResultOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RecommendationsFilteringOption.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadataOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponseOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequestOrBuilder.java create mode 100644 proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto create mode 100644 proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model_service.proto create mode 100644 proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java create mode 100644 proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResultOrBuilder.java create mode 100644 proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java create mode 100644 proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResultOrBuilder.java create mode 100644 proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RecommendationsFilteringOption.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java create mode 100644 samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java index d0759f63..7004c90b 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java @@ -964,17 +964,17 @@ public final UnaryCallable importProductsCalla * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory - * field value(s) will overwrite any existing value(s) while ignoring the last update time for - * this field. Furthermore, the last update time for the specified inventory fields will be - * overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. * *

If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any @@ -985,9 +985,10 @@ public final UnaryCallable importProductsCalla * existing inventory information will be preserved. * *

Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], - * and [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * *

This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1015,8 +1016,8 @@ public final UnaryCallable importProductsCalla * updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. * - *

If [SetInventoryRequest.inventory.name][] is empty or invalid, an INVALID_ARGUMENT error - * is returned. + *

If [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] is empty or + * invalid, an INVALID_ARGUMENT error is returned. *

If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether or not it @@ -1033,7 +1034,7 @@ public final UnaryCallable importProductsCalla *

  • Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] *
  • Specifies only the desired fulfillment types and corresponding place IDs to update in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * *

    The caller can clear all place IDs from a subset of fulfillment types in the following * ways: @@ -1041,9 +1042,9 @@ public final UnaryCallable importProductsCalla *

  • Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] *
  • Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] *
  • Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * *

    The last update time is recorded for the following inventory fields: *

    *

    If a full overwrite of inventory information while ignoring timestamps is needed, - * [UpdateProduct][] should be invoked instead. + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] should + * be invoked instead. * @param setMask Indicates which inventory fields in the provided * [Product][google.cloud.retail.v2.Product] to update. *

    At least one field must be provided. @@ -1078,17 +1080,17 @@ public final OperationFuture setInve * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory - * field value(s) will overwrite any existing value(s) while ignoring the last update time for - * this field. Furthermore, the last update time for the specified inventory fields will be - * overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any @@ -1099,9 +1101,10 @@ public final OperationFuture setInve * existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], - * and [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1141,17 +1144,17 @@ public final OperationFuture setInve * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory - * field value(s) will overwrite any existing value(s) while ignoring the last update time for - * this field. Furthermore, the last update time for the specified inventory fields will be - * overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any @@ -1162,9 +1165,10 @@ public final OperationFuture setInve * existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], - * and [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1204,17 +1208,17 @@ public final OperationFuture setInve * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory - * field value(s) will overwrite any existing value(s) while ignoring the last update time for - * this field. Furthermore, the last update time for the specified inventory fields will be - * overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any @@ -1225,9 +1229,10 @@ public final OperationFuture setInve * existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], - * and [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1265,8 +1270,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1311,8 +1316,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1356,8 +1361,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1401,8 +1406,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1446,8 +1451,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1490,8 +1495,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1536,8 +1541,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1581,8 +1586,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1626,8 +1631,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1673,8 +1678,8 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1717,13 +1722,13 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1768,13 +1773,13 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1818,13 +1823,13 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1868,13 +1873,13 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1918,13 +1923,13 @@ public final UnaryCallable setInventoryCallable( * the request is valid, the update will be enqueued and processed downstream. As a consequence, * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1964,13 +1969,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2013,13 +2018,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2061,13 +2066,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2108,13 +2113,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2157,13 +2162,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    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/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java index e9f4a1d9..13f12693 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java @@ -67,6 +67,8 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { serializer.putPathParam(fields, "placement", request.getPlacement()); return fields; }) + .setAdditionalPaths( + "/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:predict") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java index 7caaa740..41876506 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java @@ -68,6 +68,8 @@ public class HttpJsonSearchServiceStub extends SearchServiceStub { serializer.putPathParam(fields, "placement", request.getPlacement()); return fields; }) + .setAdditionalPaths( + "/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java index 4ba69f59..7e07233d 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java @@ -958,7 +958,7 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque * } * * @param name Required. Full AttributesConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + * `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) { @@ -985,7 +985,7 @@ public final AttributesConfig getAttributesConfig(AttributesConfigName name) { * } * * @param name Required. Full AttributesConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + * `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) { diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java index 54b7dba9..e067826b 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java @@ -189,7 +189,7 @@ public ControlServiceStub getStub() { * } * * @param parent Required. Full resource name of parent catalog. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. @@ -227,7 +227,7 @@ public final Control createControl(CatalogName parent, Control control, String c * } * * @param parent Required. Full resource name of parent catalog. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. @@ -322,7 +322,7 @@ public final UnaryCallable createControlCallable( * } * * @param name Required. The resource name of the Control to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + * `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) { @@ -350,7 +350,7 @@ public final void deleteControl(ControlName 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} + * `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) { @@ -525,7 +525,7 @@ public final UnaryCallable updateControlCallable( * } * * @param name Required. The resource name of the Control to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + * `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) { @@ -550,7 +550,7 @@ public final Control getControl(ControlName 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} + * `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) { @@ -627,7 +627,7 @@ public final UnaryCallable getControlCallable() { * } * * @param parent Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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) { @@ -656,7 +656,7 @@ public final ListControlsPagedResponse listControls(CatalogName parent) { * } * * @param parent Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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) { diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java new file mode 100644 index 00000000..5adbfa93 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java @@ -0,0 +1,1067 @@ +/* + * 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.v2alpha; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.stub.ModelServiceStub; +import com.google.cloud.retail.v2alpha.stub.ModelServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for performing CRUD operations on models. Recommendation models + * contain all the metadata necessary to generate a set of models for the Predict() api. A model is + * queried indirectly via a ServingConfig, which associates a model with a given Placement (e.g. + * Frequently Bought Together on Home Page). + * + *

    This service allows customers to e.g.: + * + *

    + * + *

    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 (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    + *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    + *   Model response = modelServiceClient.pauseModel(name);
    + * }
    + * }
    + * + *

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

    The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

      + *
    1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
    2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
    3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
    + * + *

    See the individual methods for example code. + * + *

    Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

    This class can be customized by passing in a custom instance of ModelServiceSettings 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.
    + * ModelServiceSettings modelServiceSettings =
    + *     ModelServiceSettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
    + * }
    + * + *

    To customize the endpoint: + * + *

    {@code
    + * // This snippet has been automatically generated for illustrative purposes only.
    + * // It may require modifications to work in your environment.
    + * ModelServiceSettings modelServiceSettings =
    + *     ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
    + * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
    + * }
    + * + *

    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.
    + * ModelServiceSettings modelServiceSettings =
    + *     ModelServiceSettings.newBuilder()
    + *         .setTransportChannelProvider(
    + *             ModelServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
    + *         .build();
    + * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ModelServiceClient implements BackgroundResource { + private final ModelServiceSettings settings; + private final ModelServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ModelServiceClient with default settings. */ + public static final ModelServiceClient create() throws IOException { + return create(ModelServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ModelServiceClient, 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 ModelServiceClient create(ModelServiceSettings settings) throws IOException { + return new ModelServiceClient(settings); + } + + /** + * Constructs an instance of ModelServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ModelServiceSettings). + */ + public static final ModelServiceClient create(ModelServiceStub stub) { + return new ModelServiceClient(stub); + } + + /** + * Constructs an instance of ModelServiceClient, 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 ModelServiceClient(ModelServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ModelServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ModelServiceClient(ModelServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ModelServiceSettings getSettings() { + return settings; + } + + public ModelServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    +   *   Model model = Model.newBuilder().build();
    +   *   Model response = modelServiceClient.createModelAsync(parent, model).get();
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource under which to create the model. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * @param model Required. The payload of the [Model] to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createModelAsync( + CatalogName parent, Model model) { + CreateModelRequest request = + CreateModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setModel(model) + .build(); + return createModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    +   *   Model model = Model.newBuilder().build();
    +   *   Model response = modelServiceClient.createModelAsync(parent, model).get();
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource under which to create the model. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * @param model Required. The payload of the [Model] to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createModelAsync( + String parent, Model model) { + CreateModelRequest request = + CreateModelRequest.newBuilder().setParent(parent).setModel(model).build(); + return createModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   CreateModelRequest request =
    +   *       CreateModelRequest.newBuilder()
    +   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
    +   *           .setModel(Model.newBuilder().build())
    +   *           .setDryRun(true)
    +   *           .build();
    +   *   Model response = modelServiceClient.createModelAsync(request).get();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createModelAsync( + CreateModelRequest request) { + return createModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   CreateModelRequest request =
    +   *       CreateModelRequest.newBuilder()
    +   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
    +   *           .setModel(Model.newBuilder().build())
    +   *           .setDryRun(true)
    +   *           .build();
    +   *   OperationFuture future =
    +   *       modelServiceClient.createModelOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Model response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + createModelOperationCallable() { + return stub.createModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   CreateModelRequest request =
    +   *       CreateModelRequest.newBuilder()
    +   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
    +   *           .setModel(Model.newBuilder().build())
    +   *           .setDryRun(true)
    +   *           .build();
    +   *   ApiFuture future = modelServiceClient.createModelCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable createModelCallable() { + return stub.createModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    +   *   Model response = modelServiceClient.pauseModel(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the model to pause. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model pauseModel(ModelName name) { + PauseModelRequest request = + PauseModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return pauseModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
    +   *   Model response = modelServiceClient.pauseModel(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the model to pause. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model pauseModel(String name) { + PauseModelRequest request = PauseModelRequest.newBuilder().setName(name).build(); + return pauseModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   PauseModelRequest request =
    +   *       PauseModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   Model response = modelServiceClient.pauseModel(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 Model pauseModel(PauseModelRequest request) { + return pauseModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   PauseModelRequest request =
    +   *       PauseModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   ApiFuture future = modelServiceClient.pauseModelCallable().futureCall(request);
    +   *   // Do something.
    +   *   Model response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable pauseModelCallable() { + return stub.pauseModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   String name = "name3373707";
    +   *   Model response = modelServiceClient.resumeModel(name);
    +   * }
    +   * }
    + * + * @param name Required. The name of the model to resume. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model resumeModel(String name) { + ResumeModelRequest request = ResumeModelRequest.newBuilder().setName(name).build(); + return resumeModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
    +   *   Model response = modelServiceClient.resumeModel(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 Model resumeModel(ResumeModelRequest request) { + return resumeModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes the training of an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
    +   *   ApiFuture future = modelServiceClient.resumeModelCallable().futureCall(request);
    +   *   // Do something.
    +   *   Model response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable resumeModelCallable() { + return stub.resumeModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    +   *   modelServiceClient.deleteModel(name);
    +   * }
    +   * }
    + * + * @param name Required. The resource name of the [Model] to delete. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteModel(ModelName name) { + DeleteModelRequest request = + DeleteModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
    +   *   modelServiceClient.deleteModel(name);
    +   * }
    +   * }
    + * + * @param name Required. The resource name of the [Model] to delete. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteModel(String name) { + DeleteModelRequest request = DeleteModelRequest.newBuilder().setName(name).build(); + deleteModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   DeleteModelRequest request =
    +   *       DeleteModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   modelServiceClient.deleteModel(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 deleteModel(DeleteModelRequest request) { + deleteModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   DeleteModelRequest request =
    +   *       DeleteModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   ApiFuture future = modelServiceClient.deleteModelCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deleteModelCallable() { + return stub.deleteModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    +   *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent for which to list models. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(CatalogName parent) { + ListModelsRequest request = + ListModelsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    +   *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent for which to list models. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(String parent) { + ListModelsRequest request = ListModelsRequest.newBuilder().setParent(parent).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ListModelsRequest request =
    +   *       ListModelsRequest.newBuilder()
    +   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Model element : modelServiceClient.listModels(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 ListModelsPagedResponse listModels(ListModelsRequest request) { + return listModelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ListModelsRequest request =
    +   *       ListModelsRequest.newBuilder()
    +   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future = modelServiceClient.listModelsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Model element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listModelsPagedCallable() { + return stub.listModelsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ListModelsRequest request =
    +   *       ListModelsRequest.newBuilder()
    +   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListModelsResponse response = modelServiceClient.listModelsCallable().call(request);
    +   *     for (Model element : response.getModelsList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable listModelsCallable() { + return stub.listModelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update of model metadata. Only fields that currently can be updated are: filtering_option, + * periodic_tuning_state. If other values are provided, this API method will ignore them. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   Model model = Model.newBuilder().build();
    +   *   FieldMask updateMask = FieldMask.newBuilder().build();
    +   *   Model response = modelServiceClient.updateModel(model, updateMask);
    +   * }
    +   * }
    + * + * @param model Required. The body of the updated [Model]. + * @param updateMask Optional. Indicates which fields in the provided 'model' to update. If not + * set, will by default update all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model updateModel(Model model, FieldMask updateMask) { + UpdateModelRequest request = + UpdateModelRequest.newBuilder().setModel(model).setUpdateMask(updateMask).build(); + return updateModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update of model metadata. Only fields that currently can be updated are: filtering_option, + * periodic_tuning_state. If other values are provided, this API method will ignore them. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   UpdateModelRequest request =
    +   *       UpdateModelRequest.newBuilder()
    +   *           .setModel(Model.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   Model response = modelServiceClient.updateModel(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 Model updateModel(UpdateModelRequest request) { + return updateModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update of model metadata. Only fields that currently can be updated are: filtering_option, + * periodic_tuning_state. If other values are provided, this API method will ignore them. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   UpdateModelRequest request =
    +   *       UpdateModelRequest.newBuilder()
    +   *           .setModel(Model.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future = modelServiceClient.updateModelCallable().futureCall(request);
    +   *   // Do something.
    +   *   Model response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updateModelCallable() { + return stub.updateModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    +   *   TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The resource name of the model to tune. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture tuneModelAsync( + ModelName name) { + TuneModelRequest request = + TuneModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return tuneModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
    +   *   TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
    +   * }
    +   * }
    + * + * @param name Required. The resource name of the model to tune. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture tuneModelAsync(String name) { + TuneModelRequest request = TuneModelRequest.newBuilder().setName(name).build(); + return tuneModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   TuneModelRequest request =
    +   *       TuneModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   TuneModelResponse response = modelServiceClient.tuneModelAsync(request).get();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture tuneModelAsync( + TuneModelRequest request) { + return tuneModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   TuneModelRequest request =
    +   *       TuneModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       modelServiceClient.tuneModelOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   TuneModelResponse response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + tuneModelOperationCallable() { + return stub.tuneModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated for illustrative purposes only.
    +   * // It may require modifications to work in your environment.
    +   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    +   *   TuneModelRequest request =
    +   *       TuneModelRequest.newBuilder()
    +   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
    +   *           .build();
    +   *   ApiFuture future = modelServiceClient.tuneModelCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable tuneModelCallable() { + return stub.tuneModelCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListModelsPagedResponse + extends AbstractPagedListResponse< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListModelsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListModelsPagedResponse(ListModelsPage page) { + super(page, ListModelsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelsPage + extends AbstractPage { + + private ListModelsPage( + PageContext context, + ListModelsResponse response) { + super(context, response); + } + + private static ListModelsPage createEmptyPage() { + return new ListModelsPage(null, null); + } + + @Override + protected ListModelsPage createPage( + PageContext context, + ListModelsResponse response) { + return new ListModelsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + private ListModelsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelsFixedSizeCollection createEmptyCollection() { + return new ListModelsFixedSizeCollection(null, 0); + } + + @Override + protected ListModelsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java new file mode 100644 index 00000000..40cfd2f4 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java @@ -0,0 +1,294 @@ +/* + * 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.v2alpha; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.retail.v2alpha.stub.ModelServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ModelServiceClient}. + * + *

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

      + *
    • The default service address (retail.googleapis.com) and default port (443) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the total timeout of pauseModel to 30 seconds: + * + *

    {@code
    + * // This snippet has been automatically generated for illustrative purposes only.
    + * // It may require modifications to work in your environment.
    + * ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
    + * modelServiceSettingsBuilder
    + *     .pauseModelSettings()
    + *     .setRetrySettings(
    + *         modelServiceSettingsBuilder
    + *             .pauseModelSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .build());
    + * ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
    + * }
    + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ModelServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createModel. */ + public UnaryCallSettings createModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).createModelSettings(); + } + + /** Returns the object with the settings used for calls to createModel. */ + public OperationCallSettings + createModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).createModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to pauseModel. */ + public UnaryCallSettings pauseModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).pauseModelSettings(); + } + + /** Returns the object with the settings used for calls to resumeModel. */ + public UnaryCallSettings resumeModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).resumeModelSettings(); + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).deleteModelSettings(); + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return ((ModelServiceStubSettings) getStubSettings()).listModelsSettings(); + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).updateModelSettings(); + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public UnaryCallSettings tuneModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).tuneModelSettings(); + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public OperationCallSettings + tuneModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).tuneModelOperationSettings(); + } + + public static final ModelServiceSettings create(ModelServiceStubSettings stub) + throws IOException { + return new ModelServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ModelServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ModelServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ModelServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ModelServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ModelServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ModelServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ModelServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ModelServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ModelServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ModelServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ModelServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ModelServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ModelServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ModelServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ModelServiceStubSettings.newHttpJsonBuilder()); + } + + public ModelServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ModelServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createModel. */ + public UnaryCallSettings.Builder createModelSettings() { + return getStubSettingsBuilder().createModelSettings(); + } + + /** Returns the builder for the settings used for calls to createModel. */ + public OperationCallSettings.Builder + createModelOperationSettings() { + return getStubSettingsBuilder().createModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to pauseModel. */ + public UnaryCallSettings.Builder pauseModelSettings() { + return getStubSettingsBuilder().pauseModelSettings(); + } + + /** Returns the builder for the settings used for calls to resumeModel. */ + public UnaryCallSettings.Builder resumeModelSettings() { + return getStubSettingsBuilder().resumeModelSettings(); + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return getStubSettingsBuilder().deleteModelSettings(); + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return getStubSettingsBuilder().listModelsSettings(); + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return getStubSettingsBuilder().updateModelSettings(); + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + public UnaryCallSettings.Builder tuneModelSettings() { + return getStubSettingsBuilder().tuneModelSettings(); + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + public OperationCallSettings.Builder + tuneModelOperationSettings() { + return getStubSettingsBuilder().tuneModelOperationSettings(); + } + + @Override + public ModelServiceSettings build() throws IOException { + return new ModelServiceSettings(this); + } + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java index 4e9395d0..e2031ece 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java @@ -653,6 +653,9 @@ public final UnaryCallable listProduc * fields are NOT supported. If not set, all supported fields (the fields that are neither * immutable nor output only) are updated. *

    If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + *

    The attribute key can be updated by setting the mask path as "attributes.${key_name}". + * If a key name is present in the mask but not in the patching product from the request, this + * key will be deleted after the update. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Product updateProduct(Product product, FieldMask updateMask) { @@ -858,8 +861,8 @@ public final UnaryCallable deleteProductCallable() * processed offline. Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, this operation * could take hours to complete. To get a sample of @@ -900,8 +903,8 @@ public final OperationFuture purge * processed offline. Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, this operation * could take hours to complete. To get a sample of @@ -942,8 +945,8 @@ public final OperationFuture purge * processed offline. Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, this operation * could take hours to complete. To get a sample of @@ -978,8 +981,7 @@ public final UnaryCallable purgeProductsCallabl /** * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s. * - *

    Request processing may be synchronous. No partial updating is supported. Non-existing items - * are created. + *

    Request processing may be synchronous. Non-existing items are created. * *

    Note that it is possible for a subset of the [Product][google.cloud.retail.v2alpha.Product]s * to be successfully updated. @@ -999,6 +1001,7 @@ public final UnaryCallable purgeProductsCallabl * .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + * .setSkipDefaultBranchProtection(true) * .build(); * ImportProductsResponse response = productServiceClient.importProductsAsync(request).get(); * } @@ -1016,8 +1019,7 @@ public final OperationFuture importProdu /** * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s. * - *

    Request processing may be synchronous. No partial updating is supported. Non-existing items - * are created. + *

    Request processing may be synchronous. Non-existing items are created. * *

    Note that it is possible for a subset of the [Product][google.cloud.retail.v2alpha.Product]s * to be successfully updated. @@ -1037,6 +1039,7 @@ public final OperationFuture importProdu * .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + * .setSkipDefaultBranchProtection(true) * .build(); * OperationFuture future = * productServiceClient.importProductsOperationCallable().futureCall(request); @@ -1054,8 +1057,7 @@ public final OperationFuture importProdu /** * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s. * - *

    Request processing may be synchronous. No partial updating is supported. Non-existing items - * are created. + *

    Request processing may be synchronous. Non-existing items are created. * *

    Note that it is possible for a subset of the [Product][google.cloud.retail.v2alpha.Product]s * to be successfully updated. @@ -1075,6 +1077,7 @@ public final OperationFuture importProdu * .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + * .setSkipDefaultBranchProtection(true) * .build(); * ApiFuture future = * productServiceClient.importProductsCallable().futureCall(request); @@ -1097,17 +1100,18 @@ public final UnaryCallable importProductsCalla * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], then @@ -1118,9 +1122,10 @@ public final UnaryCallable importProductsCalla * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1148,8 +1153,8 @@ public final UnaryCallable importProductsCalla * updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. * - *

    If [SetInventoryRequest.inventory.name][] is empty or invalid, an INVALID_ARGUMENT error - * is returned. + *

    If [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] is + * empty or invalid, an INVALID_ARGUMENT error is returned. *

    If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of whether or not it @@ -1166,7 +1171,7 @@ public final UnaryCallable importProductsCalla *

  • Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] *
  • Specifies only the desired fulfillment types and corresponding place IDs to update in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * *

    The caller can clear all place IDs from a subset of fulfillment types in the following * ways: @@ -1174,9 +1179,9 @@ public final UnaryCallable importProductsCalla *

  • Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] *
  • Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] *
  • Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * *

    The last update time is recorded for the following inventory fields: *

    *

    If a full overwrite of inventory information while ignoring timestamps is needed, - * [UpdateProduct][] should be invoked instead. + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * @param setMask Indicates which inventory fields in the provided * [Product][google.cloud.retail.v2alpha.Product] to update. *

    At least one field must be provided. @@ -1211,17 +1217,18 @@ public final OperationFuture setInve * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], then @@ -1232,9 +1239,10 @@ public final OperationFuture setInve * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1274,17 +1282,18 @@ public final OperationFuture setInve * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], then @@ -1295,9 +1304,10 @@ public final OperationFuture setInve * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1337,17 +1347,18 @@ public final OperationFuture setInve * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], then @@ -1358,9 +1369,10 @@ public final OperationFuture setInve * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1398,8 +1410,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the added place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1444,8 +1456,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the added place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1489,8 +1501,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the added place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1534,8 +1546,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the added place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1579,8 +1591,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the added place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1623,8 +1635,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the removed place IDs are not immediately * manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1669,8 +1681,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the removed place IDs are not immediately * manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1714,8 +1726,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the removed place IDs are not immediately * manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1759,8 +1771,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the removed place IDs are not immediately * manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1806,8 +1818,8 @@ public final UnaryCallable setInventoryCallable( * information. If the request is valid, the update will be enqueued and processed downstream. As * a consequence, when a response is returned, the removed place IDs are not immediately * manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1850,13 +1862,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1901,13 +1913,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1951,13 +1963,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2001,13 +2013,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2051,13 +2063,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2097,13 +2109,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2146,13 +2158,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2194,13 +2206,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2241,13 +2253,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2290,13 +2302,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on - * local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    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/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java index 4a99248f..dd0e6a07 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java @@ -68,6 +68,8 @@ * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -224,6 +226,8 @@ public SearchServiceStub getStub() { * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -272,6 +276,8 @@ public final SearchPagedResponse search(SearchRequest request) { * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * ApiFuture future = * searchServiceClient.searchPagedCallable().futureCall(request); @@ -320,6 +326,8 @@ public final UnaryCallable searchPagedCallab * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * while (true) { * SearchResponse response = searchServiceClient.searchCallable().call(request); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java index c4d433e3..dde3e417 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java @@ -198,7 +198,7 @@ public ServingConfigServiceStub getStub() { * } * * @param parent Required. Full resource name of parent. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. @@ -240,7 +240,7 @@ public final ServingConfig createServingConfig( * } * * @param parent Required. Full resource name of parent. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java index 788c587c..7eef5484 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java @@ -324,7 +324,7 @@ public final UnaryCallable collectUserEventCa * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { * PurgeUserEventsRequest request = * PurgeUserEventsRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) * .setFilter("filter-1274492040") * .setForce(true) * .build(); @@ -354,7 +354,7 @@ public final OperationFuture purgeUserEv * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { * PurgeUserEventsRequest request = * PurgeUserEventsRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) * .setFilter("filter-1274492040") * .setForce(true) * .build(); @@ -384,7 +384,7 @@ public final OperationFuture purgeUserEv * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { * PurgeUserEventsRequest request = * PurgeUserEventsRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) * .setFilter("filter-1274492040") * .setForce(true) * .build(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json index d9c9f227..2cfd38ec 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/gapic_metadata.json @@ -86,6 +86,36 @@ } } }, + "ModelService": { + "clients": { + "grpc": { + "libraryClient": "ModelServiceClient", + "rpcs": { + "CreateModel": { + "methods": ["createModelAsync", "createModelAsync", "createModelAsync", "createModelOperationCallable", "createModelCallable"] + }, + "DeleteModel": { + "methods": ["deleteModel", "deleteModel", "deleteModel", "deleteModelCallable"] + }, + "ListModels": { + "methods": ["listModels", "listModels", "listModels", "listModelsPagedCallable", "listModelsCallable"] + }, + "PauseModel": { + "methods": ["pauseModel", "pauseModel", "pauseModel", "pauseModelCallable"] + }, + "ResumeModel": { + "methods": ["resumeModel", "resumeModel", "resumeModelCallable"] + }, + "TuneModel": { + "methods": ["tuneModelAsync", "tuneModelAsync", "tuneModelAsync", "tuneModelOperationCallable", "tuneModelCallable"] + }, + "UpdateModel": { + "methods": ["updateModel", "updateModel", "updateModelCallable"] + } + } + } + } + }, "PredictionService": { "clients": { "grpc": { diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java index c63031f5..59c6d0ca 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java @@ -79,6 +79,33 @@ * } * } * + *

    ======================= ModelServiceClient ======================= + * + *

    Service Description: Service for performing CRUD operations on models. Recommendation models + * contain all the metadata necessary to generate a set of models for the Predict() api. A model is + * queried indirectly via a ServingConfig, which associates a model with a given Placement (e.g. + * Frequently Bought Together on Home Page). + * + *

    This service allows customers to e.g.: + * + *

    + * + *

    Sample for ModelServiceClient: + * + *

    {@code
    + * // This snippet has been automatically generated for illustrative purposes only.
    + * // It may require modifications to work in your environment.
    + * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    + *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    + *   Model response = modelServiceClient.pauseModel(name);
    + * }
    + * }
    + * *

    ======================= PredictionServiceClient ======================= * *

    Service Description: Service for making recommendation prediction. @@ -156,6 +183,8 @@ * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceCallableFactory.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceCallableFactory.java new file mode 100644 index 00000000..2981039f --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ModelService service API. + * + *

    This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcModelServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceStub.java new file mode 100644 index 00000000..91277436 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/GrpcModelServiceStub.java @@ -0,0 +1,375 @@ +/* + * 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.v2alpha.stub; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.CreateModelMetadata; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.DeleteModelRequest; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.ListModelsResponse; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.PauseModelRequest; +import com.google.cloud.retail.v2alpha.ResumeModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelMetadata; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelResponse; +import com.google.cloud.retail.v2alpha.UpdateModelRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ModelService service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcModelServiceStub extends ModelServiceStub { + private static final MethodDescriptor createModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/CreateModel") + .setRequestMarshaller(ProtoUtils.marshaller(CreateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor pauseModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/PauseModel") + .setRequestMarshaller(ProtoUtils.marshaller(PauseModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor resumeModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/ResumeModel") + .setRequestMarshaller(ProtoUtils.marshaller(ResumeModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/DeleteModel") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listModelsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/ListModels") + .setRequestMarshaller(ProtoUtils.marshaller(ListModelsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListModelsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/UpdateModel") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor tuneModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/TuneModel") + .setRequestMarshaller(ProtoUtils.marshaller(TuneModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createModelCallable; + private final OperationCallable + createModelOperationCallable; + private final UnaryCallable pauseModelCallable; + private final UnaryCallable resumeModelCallable; + private final UnaryCallable deleteModelCallable; + private final UnaryCallable listModelsCallable; + private final UnaryCallable listModelsPagedCallable; + private final UnaryCallable updateModelCallable; + private final UnaryCallable tuneModelCallable; + private final OperationCallable + tuneModelOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcModelServiceStub create(ModelServiceStubSettings settings) + throws IOException { + return new GrpcModelServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcModelServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcModelServiceStub(ModelServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcModelServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcModelServiceStub( + ModelServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcModelServiceStub, 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 GrpcModelServiceStub(ModelServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcModelServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcModelServiceStub, 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 GrpcModelServiceStub( + ModelServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings pauseModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pauseModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings resumeModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resumeModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listModelsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listModelsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("model.name", String.valueOf(request.getModel().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings tuneModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(tuneModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createModelCallable = + callableFactory.createUnaryCallable( + createModelTransportSettings, settings.createModelSettings(), clientContext); + this.createModelOperationCallable = + callableFactory.createOperationCallable( + createModelTransportSettings, + settings.createModelOperationSettings(), + clientContext, + operationsStub); + this.pauseModelCallable = + callableFactory.createUnaryCallable( + pauseModelTransportSettings, settings.pauseModelSettings(), clientContext); + this.resumeModelCallable = + callableFactory.createUnaryCallable( + resumeModelTransportSettings, settings.resumeModelSettings(), clientContext); + this.deleteModelCallable = + callableFactory.createUnaryCallable( + deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); + this.listModelsCallable = + callableFactory.createUnaryCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.listModelsPagedCallable = + callableFactory.createPagedCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.updateModelCallable = + callableFactory.createUnaryCallable( + updateModelTransportSettings, settings.updateModelSettings(), clientContext); + this.tuneModelCallable = + callableFactory.createUnaryCallable( + tuneModelTransportSettings, settings.tuneModelSettings(), clientContext); + this.tuneModelOperationCallable = + callableFactory.createOperationCallable( + tuneModelTransportSettings, + settings.tuneModelOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createModelCallable() { + return createModelCallable; + } + + @Override + public OperationCallable + createModelOperationCallable() { + return createModelOperationCallable; + } + + @Override + public UnaryCallable pauseModelCallable() { + return pauseModelCallable; + } + + @Override + public UnaryCallable resumeModelCallable() { + return resumeModelCallable; + } + + @Override + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + + @Override + public UnaryCallable listModelsCallable() { + return listModelsCallable; + } + + @Override + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + + @Override + public UnaryCallable updateModelCallable() { + return updateModelCallable; + } + + @Override + public UnaryCallable tuneModelCallable() { + return tuneModelCallable; + } + + @Override + public OperationCallable + tuneModelOperationCallable() { + return tuneModelOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceCallableFactory.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceCallableFactory.java new file mode 100644 index 00000000..0da68493 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * 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.v2alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ModelService service API. + * + *

    This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonModelServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java new file mode 100644 index 00000000..8a23548f --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java @@ -0,0 +1,563 @@ +/* + * 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.v2alpha.stub; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.CreateModelMetadata; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.DeleteModelRequest; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.ListModelsResponse; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.PauseModelRequest; +import com.google.cloud.retail.v2alpha.ResumeModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelMetadata; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelResponse; +import com.google.cloud.retail.v2alpha.UpdateModelRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ModelService service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonModelServiceStub extends ModelServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(TuneModelMetadata.getDescriptor()) + .add(Model.getDescriptor()) + .add(TuneModelResponse.getDescriptor()) + .add(CreateModelMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/CreateModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/models", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "dryRun", request.getDryRun()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("model", request.getModel())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateModelRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor pauseModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/PauseModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}:pause", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Model.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor resumeModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/ResumeModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}:resume", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Model.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/DeleteModel") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listModelsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/ListModels") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/models", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListModelsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/UpdateModel") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{model.name=projects/*/locations/*/catalogs/*/models/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "model.name", request.getModel().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> ProtoRestSerializer.create().toBody("model", request.getModel())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Model.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor tuneModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2alpha.ModelService/TuneModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}:tune", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (TuneModelRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable createModelCallable; + private final OperationCallable + createModelOperationCallable; + private final UnaryCallable pauseModelCallable; + private final UnaryCallable resumeModelCallable; + private final UnaryCallable deleteModelCallable; + private final UnaryCallable listModelsCallable; + private final UnaryCallable listModelsPagedCallable; + private final UnaryCallable updateModelCallable; + private final UnaryCallable tuneModelCallable; + private final OperationCallable + tuneModelOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonModelServiceStub create(ModelServiceStubSettings settings) + throws IOException { + return new HttpJsonModelServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonModelServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonModelServiceStub( + ModelServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonModelServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonModelServiceStub( + ModelServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonModelServiceStub, 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 HttpJsonModelServiceStub(ModelServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonModelServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonModelServiceStub, 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 HttpJsonModelServiceStub( + ModelServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings pauseModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(pauseModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings resumeModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(resumeModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listModelsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listModelsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings tuneModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(tuneModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createModelCallable = + callableFactory.createUnaryCallable( + createModelTransportSettings, settings.createModelSettings(), clientContext); + this.createModelOperationCallable = + callableFactory.createOperationCallable( + createModelTransportSettings, + settings.createModelOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.pauseModelCallable = + callableFactory.createUnaryCallable( + pauseModelTransportSettings, settings.pauseModelSettings(), clientContext); + this.resumeModelCallable = + callableFactory.createUnaryCallable( + resumeModelTransportSettings, settings.resumeModelSettings(), clientContext); + this.deleteModelCallable = + callableFactory.createUnaryCallable( + deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); + this.listModelsCallable = + callableFactory.createUnaryCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.listModelsPagedCallable = + callableFactory.createPagedCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.updateModelCallable = + callableFactory.createUnaryCallable( + updateModelTransportSettings, settings.updateModelSettings(), clientContext); + this.tuneModelCallable = + callableFactory.createUnaryCallable( + tuneModelTransportSettings, settings.tuneModelSettings(), clientContext); + this.tuneModelOperationCallable = + callableFactory.createOperationCallable( + tuneModelTransportSettings, + settings.tuneModelOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createModelMethodDescriptor); + methodDescriptors.add(pauseModelMethodDescriptor); + methodDescriptors.add(resumeModelMethodDescriptor); + methodDescriptors.add(deleteModelMethodDescriptor); + methodDescriptors.add(listModelsMethodDescriptor); + methodDescriptors.add(updateModelMethodDescriptor); + methodDescriptors.add(tuneModelMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createModelCallable() { + return createModelCallable; + } + + @Override + public OperationCallable + createModelOperationCallable() { + return createModelOperationCallable; + } + + @Override + public UnaryCallable pauseModelCallable() { + return pauseModelCallable; + } + + @Override + public UnaryCallable resumeModelCallable() { + return resumeModelCallable; + } + + @Override + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + + @Override + public UnaryCallable listModelsCallable() { + return listModelsCallable; + } + + @Override + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + + @Override + public UnaryCallable updateModelCallable() { + return updateModelCallable; + } + + @Override + public UnaryCallable tuneModelCallable() { + return tuneModelCallable; + } + + @Override + public OperationCallable + tuneModelOperationCallable() { + return tuneModelOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java index 502fde4e..04c6a2aa 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java @@ -67,6 +67,8 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { serializer.putPathParam(fields, "placement", request.getPlacement()); return fields; }) + .setAdditionalPaths( + "/v2alpha/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:predict") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java index 03335485..6c5ffb32 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java @@ -68,6 +68,8 @@ public class HttpJsonSearchServiceStub extends SearchServiceStub { serializer.putPathParam(fields, "placement", request.getPlacement()); return fields; }) + .setAdditionalPaths( + "/v2alpha/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStub.java new file mode 100644 index 00000000..42a206e8 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStub.java @@ -0,0 +1,104 @@ +/* + * 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.v2alpha.stub; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.CreateModelMetadata; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.DeleteModelRequest; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.ListModelsResponse; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.PauseModelRequest; +import com.google.cloud.retail.v2alpha.ResumeModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelMetadata; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelResponse; +import com.google.cloud.retail.v2alpha.UpdateModelRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ModelService service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ModelServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createModelOperationCallable()"); + } + + public UnaryCallable createModelCallable() { + throw new UnsupportedOperationException("Not implemented: createModelCallable()"); + } + + public UnaryCallable pauseModelCallable() { + throw new UnsupportedOperationException("Not implemented: pauseModelCallable()"); + } + + public UnaryCallable resumeModelCallable() { + throw new UnsupportedOperationException("Not implemented: resumeModelCallable()"); + } + + public UnaryCallable deleteModelCallable() { + throw new UnsupportedOperationException("Not implemented: deleteModelCallable()"); + } + + public UnaryCallable listModelsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsPagedCallable()"); + } + + public UnaryCallable listModelsCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsCallable()"); + } + + public UnaryCallable updateModelCallable() { + throw new UnsupportedOperationException("Not implemented: updateModelCallable()"); + } + + public OperationCallable + tuneModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: tuneModelOperationCallable()"); + } + + public UnaryCallable tuneModelCallable() { + throw new UnsupportedOperationException("Not implemented: tuneModelCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java new file mode 100644 index 00000000..f6cd13e1 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java @@ -0,0 +1,631 @@ +/* + * 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.v2alpha.stub; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2alpha.CreateModelMetadata; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.DeleteModelRequest; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.ListModelsResponse; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.PauseModelRequest; +import com.google.cloud.retail.v2alpha.ResumeModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelMetadata; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelResponse; +import com.google.cloud.retail.v2alpha.UpdateModelRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ModelServiceStub}. + * + *

    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 pauseModel to 30 seconds: + * + *

    {@code
    + * // This snippet has been automatically generated for illustrative purposes only.
    + * // It may require modifications to work in your environment.
    + * ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
    + *     ModelServiceStubSettings.newBuilder();
    + * modelServiceSettingsBuilder
    + *     .pauseModelSettings()
    + *     .setRetrySettings(
    + *         modelServiceSettingsBuilder
    + *             .pauseModelSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .build());
    + * ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
    + * }
    + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ModelServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createModelSettings; + private final OperationCallSettings + createModelOperationSettings; + private final UnaryCallSettings pauseModelSettings; + private final UnaryCallSettings resumeModelSettings; + private final UnaryCallSettings deleteModelSettings; + private final PagedCallSettings + listModelsSettings; + private final UnaryCallSettings updateModelSettings; + private final UnaryCallSettings tuneModelSettings; + private final OperationCallSettings + tuneModelOperationSettings; + + private static final PagedListDescriptor + LIST_MODELS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelsRequest injectToken(ListModelsRequest payload, String token) { + return ListModelsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListModelsRequest injectPageSize(ListModelsRequest payload, int pageSize) { + return ListModelsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListModelsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListModelsResponse payload) { + return payload.getModelsList() == null + ? ImmutableList.of() + : payload.getModelsList(); + } + }; + + private static final PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + LIST_MODELS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListModelsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MODELS_PAGE_STR_DESC, request, context); + return ListModelsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createModel. */ + public UnaryCallSettings createModelSettings() { + return createModelSettings; + } + + /** Returns the object with the settings used for calls to createModel. */ + public OperationCallSettings + createModelOperationSettings() { + return createModelOperationSettings; + } + + /** Returns the object with the settings used for calls to pauseModel. */ + public UnaryCallSettings pauseModelSettings() { + return pauseModelSettings; + } + + /** Returns the object with the settings used for calls to resumeModel. */ + public UnaryCallSettings resumeModelSettings() { + return resumeModelSettings; + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return updateModelSettings; + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public UnaryCallSettings tuneModelSettings() { + return tuneModelSettings; + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public OperationCallSettings + tuneModelOperationSettings() { + return tuneModelOperationSettings; + } + + public ModelServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcModelServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonModelServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "retail.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "retail.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ModelServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ModelServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ModelServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ModelServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createModelSettings = settingsBuilder.createModelSettings().build(); + createModelOperationSettings = settingsBuilder.createModelOperationSettings().build(); + pauseModelSettings = settingsBuilder.pauseModelSettings().build(); + resumeModelSettings = settingsBuilder.resumeModelSettings().build(); + deleteModelSettings = settingsBuilder.deleteModelSettings().build(); + listModelsSettings = settingsBuilder.listModelsSettings().build(); + updateModelSettings = settingsBuilder.updateModelSettings().build(); + tuneModelSettings = settingsBuilder.tuneModelSettings().build(); + tuneModelOperationSettings = settingsBuilder.tuneModelOperationSettings().build(); + } + + /** Builder for ModelServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createModelSettings; + private final OperationCallSettings.Builder + createModelOperationSettings; + private final UnaryCallSettings.Builder pauseModelSettings; + private final UnaryCallSettings.Builder resumeModelSettings; + private final UnaryCallSettings.Builder deleteModelSettings; + private final PagedCallSettings.Builder< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + listModelsSettings; + private final UnaryCallSettings.Builder updateModelSettings; + private final UnaryCallSettings.Builder tuneModelSettings; + private final OperationCallSettings.Builder< + TuneModelRequest, TuneModelResponse, TuneModelMetadata> + tuneModelOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createModelOperationSettings = OperationCallSettings.newBuilder(); + pauseModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resumeModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listModelsSettings = PagedCallSettings.newBuilder(LIST_MODELS_PAGE_STR_FACT); + updateModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + tuneModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + tuneModelOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createModelSettings, + pauseModelSettings, + resumeModelSettings, + deleteModelSettings, + listModelsSettings, + updateModelSettings, + tuneModelSettings); + initDefaults(this); + } + + protected Builder(ModelServiceStubSettings settings) { + super(settings); + + createModelSettings = settings.createModelSettings.toBuilder(); + createModelOperationSettings = settings.createModelOperationSettings.toBuilder(); + pauseModelSettings = settings.pauseModelSettings.toBuilder(); + resumeModelSettings = settings.resumeModelSettings.toBuilder(); + deleteModelSettings = settings.deleteModelSettings.toBuilder(); + listModelsSettings = settings.listModelsSettings.toBuilder(); + updateModelSettings = settings.updateModelSettings.toBuilder(); + tuneModelSettings = settings.tuneModelSettings.toBuilder(); + tuneModelOperationSettings = settings.tuneModelOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createModelSettings, + pauseModelSettings, + resumeModelSettings, + deleteModelSettings, + listModelsSettings, + updateModelSettings, + tuneModelSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .pauseModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .resumeModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .deleteModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .listModelsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .tuneModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Model.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateModelMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .tuneModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(TuneModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(TuneModelMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createModel. */ + public UnaryCallSettings.Builder createModelSettings() { + return createModelSettings; + } + + /** Returns the builder for the settings used for calls to createModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createModelOperationSettings() { + return createModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to pauseModel. */ + public UnaryCallSettings.Builder pauseModelSettings() { + return pauseModelSettings; + } + + /** Returns the builder for the settings used for calls to resumeModel. */ + public UnaryCallSettings.Builder resumeModelSettings() { + return resumeModelSettings; + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return updateModelSettings; + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + public UnaryCallSettings.Builder tuneModelSettings() { + return tuneModelSettings; + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + tuneModelOperationSettings() { + return tuneModelOperationSettings; + } + + @Override + public ModelServiceStubSettings build() throws IOException { + return new ModelServiceStubSettings(this); + } + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java index 2e084492..87fea367 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java @@ -526,7 +526,7 @@ public static class Builder extends StubSettings.BuildernewArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_2_codes", + "retry_policy_3_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -559,7 +559,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportProductsResponse.class)) diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java index 33f425bf..d739dde8 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java @@ -316,7 +316,7 @@ public static class Builder extends StubSettings.BuildernewArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "retry_policy_3_codes", + "retry_policy_4_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -360,7 +360,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportUserEventsResponse.class)) diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java index c9e39df8..f66631bb 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java @@ -958,7 +958,7 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque * } * * @param name Required. Full AttributesConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + * `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) { @@ -985,7 +985,7 @@ public final AttributesConfig getAttributesConfig(AttributesConfigName name) { * } * * @param name Required. Full AttributesConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + * `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) { diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java index f4639666..e5f27422 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java @@ -189,7 +189,7 @@ public ControlServiceStub getStub() { * } * * @param parent Required. Full resource name of parent catalog. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. @@ -227,7 +227,7 @@ public final Control createControl(CatalogName parent, Control control, String c * } * * @param parent Required. Full resource name of parent catalog. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. @@ -322,7 +322,7 @@ public final UnaryCallable createControlCallable( * } * * @param name Required. The resource name of the Control to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + * `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) { @@ -350,7 +350,7 @@ public final void deleteControl(ControlName 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} + * `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) { @@ -525,7 +525,7 @@ public final UnaryCallable updateControlCallable( * } * * @param name Required. The resource name of the Control to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + * `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) { @@ -550,7 +550,7 @@ public final Control getControl(ControlName 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} + * `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) { @@ -627,7 +627,7 @@ public final UnaryCallable getControlCallable() { * } * * @param parent Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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) { @@ -656,7 +656,7 @@ public final ListControlsPagedResponse listControls(CatalogName parent) { * } * * @param parent Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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) { diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java index f4e90684..585162e4 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java @@ -650,6 +650,9 @@ public final UnaryCallable listProduc * fields are NOT supported. If not set, all supported fields (the fields that are neither * immutable nor output only) are updated. *

    If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + *

    The attribute key can be updated by setting the mask path as "attributes.${key_name}". + * If a key name is present in the mask but not in the patching product from the request, this + * key will be deleted after the update. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Product updateProduct(Product product, FieldMask updateMask) { @@ -850,8 +853,7 @@ public final UnaryCallable deleteProductCallable() /** * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. * - *

    Request processing may be synchronous. No partial updating is supported. Non-existing items - * are created. + *

    Request processing may be synchronous. Non-existing items are created. * *

    Note that it is possible for a subset of the [Product][google.cloud.retail.v2beta.Product]s * to be successfully updated. @@ -888,8 +890,7 @@ public final OperationFuture importProdu /** * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. * - *

    Request processing may be synchronous. No partial updating is supported. Non-existing items - * are created. + *

    Request processing may be synchronous. Non-existing items are created. * *

    Note that it is possible for a subset of the [Product][google.cloud.retail.v2beta.Product]s * to be successfully updated. @@ -926,8 +927,7 @@ public final OperationFuture importProdu /** * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. * - *

    Request processing may be synchronous. No partial updating is supported. Non-existing items - * are created. + *

    Request processing may be synchronous. Non-existing items are created. * *

    Note that it is possible for a subset of the [Product][google.cloud.retail.v2beta.Product]s * to be successfully updated. @@ -969,17 +969,18 @@ public final UnaryCallable importProductsCalla * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then @@ -990,9 +991,10 @@ public final UnaryCallable importProductsCalla * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1020,8 +1022,8 @@ public final UnaryCallable importProductsCalla * updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. * - *

    If [SetInventoryRequest.inventory.name][] is empty or invalid, an INVALID_ARGUMENT error - * is returned. + *

    If [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] is + * empty or invalid, an INVALID_ARGUMENT error is returned. *

    If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of whether or not it @@ -1038,7 +1040,7 @@ public final UnaryCallable importProductsCalla *

  • Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] *
  • Specifies only the desired fulfillment types and corresponding place IDs to update in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * *

    The caller can clear all place IDs from a subset of fulfillment types in the following * ways: @@ -1046,9 +1048,9 @@ public final UnaryCallable importProductsCalla *

  • Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] *
  • Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] *
  • Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * *

    The last update time is recorded for the following inventory fields: *

    *

    If a full overwrite of inventory information while ignoring timestamps is needed, - * [UpdateProduct][] should be invoked instead. + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * @param setMask Indicates which inventory fields in the provided * [Product][google.cloud.retail.v2beta.Product] to update. *

    At least one field must be provided. @@ -1083,17 +1086,18 @@ public final OperationFuture setInve * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then @@ -1104,9 +1108,10 @@ public final OperationFuture setInve * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1146,17 +1151,18 @@ public final OperationFuture setInve * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then @@ -1167,9 +1173,10 @@ public final OperationFuture setInve * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1209,17 +1216,18 @@ public final OperationFuture setInve * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    When inventory is updated with - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the specified - * inventory field value(s) will overwrite any existing value(s) while ignoring the last update - * time for this field. Furthermore, the last update time for the specified inventory fields will - * be overwritten to the time of the - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] request. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the + * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update time for the specified inventory + * fields will be overwritten to the time of the + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * request. * *

    If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then @@ -1230,9 +1238,10 @@ public final OperationFuture setInve * any existing inventory information will be preserved. * *

    Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], - * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], + * and + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1270,8 +1279,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the added place IDs are not immediately manifested in * the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1316,8 +1325,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the added place IDs are not immediately manifested in * the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1361,8 +1370,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the added place IDs are not immediately manifested in * the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1406,8 +1415,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the added place IDs are not immediately manifested in * the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1451,8 +1460,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the added place IDs are not immediately manifested in * the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1495,8 +1504,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the removed place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1541,8 +1550,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the removed place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1586,8 +1595,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the removed place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1631,8 +1640,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the removed place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1678,8 +1687,8 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, the removed place IDs are not immediately manifested * in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1722,13 +1731,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1773,13 +1782,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1823,13 +1832,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1873,13 +1882,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1923,13 +1932,13 @@ public final UnaryCallable setInventoryCallable( * If the request is valid, the update will be enqueued and processed downstream. As a * consequence, when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -1969,13 +1978,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2018,13 +2027,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2066,13 +2075,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2113,13 +2122,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    This feature is only available for users who have Retail Search enabled. Please enable * Retail Search on Cloud Console before using this feature. @@ -2162,13 +2171,13 @@ public final UnaryCallable addLocalInvent *

    This process is asynchronous. If the request is valid, the removal will be enqueued and * processed downstream. As a consequence, when a response is returned, removals are not * immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * *

    Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local - * inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no + * effect on local inventories. * *

    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/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java index c2c045a2..2fc1ffd6 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java @@ -68,6 +68,8 @@ * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -224,6 +226,8 @@ public SearchServiceStub getStub() { * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -272,6 +276,8 @@ public final SearchPagedResponse search(SearchRequest request) { * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * ApiFuture future = * searchServiceClient.searchPagedCallable().futureCall(request); @@ -320,6 +326,8 @@ public final UnaryCallable searchPagedCallab * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * while (true) { * SearchResponse response = searchServiceClient.searchCallable().call(request); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java index 393fbcc8..c9ed82ae 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java @@ -198,7 +198,7 @@ public ServingConfigServiceStub getStub() { * } * * @param parent Required. Full resource name of parent. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. @@ -240,7 +240,7 @@ public final ServingConfig createServingConfig( * } * * @param parent Required. Full resource name of parent. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `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. diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java index eb9f8d5d..317ccaf7 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java @@ -324,7 +324,7 @@ public final UnaryCallable collectUserEventCa * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { * PurgeUserEventsRequest request = * PurgeUserEventsRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) * .setFilter("filter-1274492040") * .setForce(true) * .build(); @@ -354,7 +354,7 @@ public final OperationFuture purgeUserEv * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { * PurgeUserEventsRequest request = * PurgeUserEventsRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) * .setFilter("filter-1274492040") * .setForce(true) * .build(); @@ -384,7 +384,7 @@ public final OperationFuture purgeUserEv * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { * PurgeUserEventsRequest request = * PurgeUserEventsRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) * .setFilter("filter-1274492040") * .setForce(true) * .build(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java index 3c8101af..a28b6961 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java @@ -156,6 +156,8 @@ * .addAllVariantRollupKeys(new ArrayList()) * .addAllPageCategories(new ArrayList()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .putAllLabels(new HashMap()) + * .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java index 56364869..7ae0aeb2 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java @@ -67,6 +67,8 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { serializer.putPathParam(fields, "placement", request.getPlacement()); return fields; }) + .setAdditionalPaths( + "/v2beta/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:predict") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java index 01eb416d..6b5ab770 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java @@ -68,6 +68,8 @@ public class HttpJsonSearchServiceStub extends SearchServiceStub { serializer.putPathParam(fields, "placement", request.getPlacement()); return fields; }) + .setAdditionalPaths( + "/v2beta/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelService.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelService.java new file mode 100644 index 00000000..e61fe0db --- /dev/null +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelService.java @@ -0,0 +1,59 @@ +/* + * 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.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockModelService implements MockGrpcService { + private final MockModelServiceImpl serviceImpl; + + public MockModelService() { + serviceImpl = new MockModelServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelServiceImpl.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelServiceImpl.java new file mode 100644 index 00000000..d768577a --- /dev/null +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/MockModelServiceImpl.java @@ -0,0 +1,203 @@ +/* + * 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.v2alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.retail.v2alpha.ModelServiceGrpc.ModelServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockModelServiceImpl extends ModelServiceImplBase { + private List requests; + private Queue responses; + + public MockModelServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createModel(CreateModelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void pauseModel(PauseModelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext(((Model) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PauseModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Model.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resumeModel(ResumeModelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext(((Model) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResumeModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Model.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteModel(DeleteModelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listModels( + ListModelsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListModelsResponse) { + requests.add(request); + responseObserver.onNext(((ListModelsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListModels, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListModelsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateModel(UpdateModelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Model) { + requests.add(request); + responseObserver.onNext(((Model) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Model.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void tuneModel(TuneModelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TuneModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java new file mode 100644 index 00000000..e053a98e --- /dev/null +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientHttpJsonTest.java @@ -0,0 +1,722 @@ +/* + * 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.v2alpha; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.retail.v2alpha.stub.HttpJsonModelServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ModelServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static ModelServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonModelServiceStub.getMethodDescriptors(), + ModelServiceSettings.getDefaultEndpoint()); + ModelServiceSettings settings = + ModelServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ModelServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ModelServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = Model.newBuilder().build(); + + Model actualResponse = client.createModelAsync(parent, model).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createModelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = Model.newBuilder().build(); + client.createModelAsync(parent, model).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createModelTest2() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267"; + Model model = Model.newBuilder().build(); + + Model actualResponse = client.createModelAsync(parent, model).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createModelExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267"; + Model model = Model.newBuilder().build(); + client.createModelAsync(parent, model).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void pauseModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + + Model actualResponse = client.pauseModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void pauseModelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + client.pauseModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pauseModelTest2() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + + Model actualResponse = client.pauseModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void pauseModelExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + client.pauseModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumeModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + + Model actualResponse = client.resumeModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resumeModelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + client.resumeModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteModelTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + + client.deleteModel(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteModelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + client.deleteModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteModelTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + + client.deleteModel(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteModelExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + client.deleteModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listModelsTest() throws Exception { + Model responsesElement = Model.newBuilder().build(); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder() + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listModelsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + client.listModels(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listModelsTest2() throws Exception { + Model responsesElement = Model.newBuilder().build(); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder() + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267"; + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listModelsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267"; + client.listModels(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Model model = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Model actualResponse = client.updateModel(model, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateModelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Model model = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateModel(model, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void tuneModelTest() throws Exception { + TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("tuneModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + + TuneModelResponse actualResponse = client.tuneModelAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void tuneModelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + client.tuneModelAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void tuneModelTest2() throws Exception { + TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("tuneModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + + TuneModelResponse actualResponse = client.tuneModelAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void tuneModelExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594"; + client.tuneModelAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java new file mode 100644 index 00000000..0333fb70 --- /dev/null +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ModelServiceClientTest.java @@ -0,0 +1,637 @@ +/* + * 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.v2alpha; + +import static com.google.cloud.retail.v2alpha.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ModelServiceClientTest { + private static MockModelService mockModelService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ModelServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockModelService = new MockModelService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockModelService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ModelServiceSettings settings = + ModelServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ModelServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = Model.newBuilder().build(); + + Model actualResponse = client.createModelAsync(parent, model).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateModelRequest actualRequest = ((CreateModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = Model.newBuilder().build(); + client.createModelAsync(parent, model).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createModelTest2() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Model model = Model.newBuilder().build(); + + Model actualResponse = client.createModelAsync(parent, model).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateModelRequest actualRequest = ((CreateModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + Model model = Model.newBuilder().build(); + client.createModelAsync(parent, model).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void pauseModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + + Model actualResponse = client.pauseModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PauseModelRequest actualRequest = ((PauseModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pauseModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + client.pauseModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pauseModelTest2() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + String name = "name3373707"; + + Model actualResponse = client.pauseModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PauseModelRequest actualRequest = ((PauseModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pauseModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; + client.pauseModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumeModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + String name = "name3373707"; + + Model actualResponse = client.resumeModel(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResumeModelRequest actualRequest = ((ResumeModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumeModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; + client.resumeModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteModelTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockModelService.addResponse(expectedResponse); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + + client.deleteModel(name); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + client.deleteModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteModelTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockModelService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteModel(name); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; + client.deleteModel(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listModelsTest() throws Exception { + Model responsesElement = Model.newBuilder().build(); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder() + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + client.listModels(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listModelsTest2() throws Exception { + Model responsesElement = Model.newBuilder().build(); + ListModelsResponse expectedResponse = + ListModelsResponse.newBuilder() + .setNextPageToken("") + .addAllModels(Arrays.asList(responsesElement)) + .build(); + mockModelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListModelsPagedResponse pagedListResponse = client.listModels(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0)); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listModelsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listModels(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateModelTest() throws Exception { + Model expectedResponse = + Model.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setType("type3575610") + .setOptimizationObjective("optimizationObjective-1014459828") + .setLastTuneTime(Timestamp.newBuilder().build()) + .setTuningOperation("tuningOperation-1269747150") + .setFilteringOption(RecommendationsFilteringOption.forNumber(0)) + .addAllServingConfigLists(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + Model model = Model.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Model actualResponse = client.updateModel(model, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateModelRequest actualRequest = ((UpdateModelRequest) actualRequests.get(0)); + + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + Model model = Model.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateModel(model, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void tuneModelTest() throws Exception { + TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("tuneModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + + TuneModelResponse actualResponse = client.tuneModelAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TuneModelRequest actualRequest = ((TuneModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void tuneModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + client.tuneModelAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void tuneModelTest2() throws Exception { + TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("tuneModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String name = "name3373707"; + + TuneModelResponse actualResponse = client.tuneModelAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TuneModelRequest actualRequest = ((TuneModelRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void tuneModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String name = "name3373707"; + client.tuneModelAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientHttpJsonTest.java index 41f64d76..82361b8b 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientHttpJsonTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientHttpJsonTest.java @@ -807,6 +807,7 @@ public void importProductsTest() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); ImportProductsResponse actualResponse = client.importProductsAsync(request).get(); @@ -844,6 +845,7 @@ public void importProductsExceptionTest() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); client.importProductsAsync(request).get(); Assert.fail("No exception raised"); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java index b2b10a97..993e6318 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/ProductServiceClientTest.java @@ -687,6 +687,7 @@ public void importProductsTest() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); ImportProductsResponse actualResponse = client.importProductsAsync(request).get(); @@ -704,6 +705,8 @@ public void importProductsTest() throws Exception { Assert.assertEquals(request.getReconciliationMode(), actualRequest.getReconciliationMode()); Assert.assertEquals( request.getNotificationPubsubTopic(), actualRequest.getNotificationPubsubTopic()); + Assert.assertEquals( + request.getSkipDefaultBranchProtection(), actualRequest.getSkipDefaultBranchProtection()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -725,6 +728,7 @@ public void importProductsExceptionTest() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); client.importProductsAsync(request).get(); Assert.fail("No exception raised"); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientHttpJsonTest.java index 508ee667..2e73df70 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientHttpJsonTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientHttpJsonTest.java @@ -32,6 +32,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import javax.annotation.Generated; import org.junit.After; @@ -107,6 +108,8 @@ public void searchTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); SearchPagedResponse pagedListResponse = client.search(request); @@ -162,6 +165,8 @@ public void searchExceptionTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); client.search(request); Assert.fail("No exception raised"); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java index 9c8842a3..af1acc50 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/SearchServiceClientTest.java @@ -31,6 +31,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -109,6 +110,8 @@ public void searchTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); SearchPagedResponse pagedListResponse = client.search(request); @@ -144,6 +147,8 @@ public void searchTest() throws Exception { Assert.assertEquals(request.getPageCategoriesList(), actualRequest.getPageCategoriesList()); Assert.assertEquals(request.getSearchMode(), actualRequest.getSearchMode()); Assert.assertEquals(request.getPersonalizationSpec(), actualRequest.getPersonalizationSpec()); + Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap()); + Assert.assertEquals(request.getSpellCorrectionSpec(), actualRequest.getSpellCorrectionSpec()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -177,6 +182,8 @@ public void searchExceptionTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); client.search(request); Assert.fail("No exception raised"); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientHttpJsonTest.java index 27f1e1c4..247db4c9 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientHttpJsonTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientHttpJsonTest.java @@ -223,7 +223,7 @@ public void purgeUserEventsTest() throws Exception { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("projects/project-6267/locations/location-6267/catalogs/catalog-6267") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); @@ -256,7 +256,7 @@ public void purgeUserEventsExceptionTest() throws Exception { try { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("projects/project-6267/locations/location-6267/catalogs/catalog-6267") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java index afc2182f..25ab78ff 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2alpha/UserEventServiceClientTest.java @@ -220,7 +220,7 @@ public void purgeUserEventsTest() throws Exception { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); @@ -249,7 +249,7 @@ public void purgeUserEventsExceptionTest() throws Exception { try { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientHttpJsonTest.java index c2e28c52..ef252a01 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientHttpJsonTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientHttpJsonTest.java @@ -32,6 +32,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import javax.annotation.Generated; import org.junit.After; @@ -107,6 +108,8 @@ public void searchTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); SearchPagedResponse pagedListResponse = client.search(request); @@ -162,6 +165,8 @@ public void searchExceptionTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); client.search(request); Assert.fail("No exception raised"); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientTest.java index 6459a01e..bd0b0a38 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/SearchServiceClientTest.java @@ -31,6 +31,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -109,6 +110,8 @@ public void searchTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); SearchPagedResponse pagedListResponse = client.search(request); @@ -143,6 +146,8 @@ public void searchTest() throws Exception { Assert.assertEquals(request.getPageCategoriesList(), actualRequest.getPageCategoriesList()); Assert.assertEquals(request.getSearchMode(), actualRequest.getSearchMode()); Assert.assertEquals(request.getPersonalizationSpec(), actualRequest.getPersonalizationSpec()); + Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap()); + Assert.assertEquals(request.getSpellCorrectionSpec(), actualRequest.getSpellCorrectionSpec()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -176,6 +181,8 @@ public void searchExceptionTest() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); client.search(request); Assert.fail("No exception raised"); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientHttpJsonTest.java index 3cb9e378..a40fb222 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientHttpJsonTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientHttpJsonTest.java @@ -223,7 +223,7 @@ public void purgeUserEventsTest() throws Exception { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("projects/project-6267/locations/location-6267/catalogs/catalog-6267") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); @@ -256,7 +256,7 @@ public void purgeUserEventsExceptionTest() throws Exception { try { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("projects/project-6267/locations/location-6267/catalogs/catalog-6267") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientTest.java index c9813309..892e3134 100644 --- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientTest.java +++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/UserEventServiceClientTest.java @@ -220,7 +220,7 @@ public void purgeUserEventsTest() throws Exception { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); @@ -249,7 +249,7 @@ public void purgeUserEventsExceptionTest() throws Exception { try { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java b/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java index cb02d5cb..e922cc86 100644 --- a/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java +++ b/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductServiceGrpc.java @@ -674,17 +674,20 @@ public void importProducts( * enqueued and processed downstream. As a consequence, when a response is * returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], + * the specified inventory field value(s) will overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last * update time for the specified inventory fields will be overwritten to the * time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], @@ -693,10 +696,10 @@ public void importProducts( * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], * then any existing inventory information will be preserved. * Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], * and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -720,8 +723,9 @@ public void setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -745,8 +749,9 @@ public void addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -771,12 +776,14 @@ public void removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -799,12 +806,14 @@ public void addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1021,17 +1030,20 @@ public void importProducts( * enqueued and processed downstream. As a consequence, when a response is * returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], + * the specified inventory field value(s) will overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last * update time for the specified inventory fields will be overwritten to the * time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], @@ -1040,10 +1052,10 @@ public void importProducts( * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], * then any existing inventory information will be preserved. * Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], * and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1069,8 +1081,9 @@ public void setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1096,8 +1109,9 @@ public void addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1124,12 +1138,14 @@ public void removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1154,12 +1170,14 @@ public void addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1289,17 +1307,20 @@ public com.google.longrunning.Operation importProducts( * enqueued and processed downstream. As a consequence, when a response is * returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], + * the specified inventory field value(s) will overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last * update time for the specified inventory fields will be overwritten to the * time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], @@ -1308,10 +1329,10 @@ public com.google.longrunning.Operation importProducts( * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], * then any existing inventory information will be preserved. * Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], * and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1334,8 +1355,9 @@ public com.google.longrunning.Operation setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1358,8 +1380,9 @@ public com.google.longrunning.Operation addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1383,12 +1406,14 @@ public com.google.longrunning.Operation removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1410,12 +1435,14 @@ public com.google.longrunning.Operation addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1543,17 +1570,20 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * When inventory is updated with - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], + * the specified inventory field value(s) will overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last * update time for the specified inventory fields will be overwritten to the * time of the - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * or + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], @@ -1562,10 +1592,10 @@ protected ProductServiceFutureStub build( * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], * then any existing inventory information will be preserved. * Pre-existing inventory information can only be updated with - * [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], * and - * [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1588,8 +1618,9 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1612,8 +1643,9 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1637,12 +1669,14 @@ protected ProductServiceFutureStub build( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1664,12 +1698,14 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2.Product] queried by - * [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - * [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - * effect on local inventories. + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + * and + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * has no effect on local inventories. * 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/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceGrpc.java b/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceGrpc.java new file mode 100644 index 00000000..48fdf2cb --- /dev/null +++ b/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceGrpc.java @@ -0,0 +1,1078 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.retail.v2alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
    + * Service for performing CRUD operations on models.
    + * Recommendation models contain all the metadata necessary to generate a set of
    + * models for the Predict() api. A model is queried
    + * indirectly via a ServingConfig, which associates a model with a
    + * given Placement (e.g. Frequently Bought Together on Home Page).
    + * This service allows customers to e.g.:
    + * * Initiate training of a model.
    + * * Pause training of an existing model.
    + * * List all the available models along with their metadata.
    + * * Control their tuning schedule.
    + * 
    + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/retail/v2alpha/model_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ModelServiceGrpc { + + private ModelServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.retail.v2alpha.ModelService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateModel", + requestType = com.google.cloud.retail.v2alpha.CreateModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod; + if ((getCreateModelMethod = ModelServiceGrpc.getCreateModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getCreateModelMethod = ModelServiceGrpc.getCreateModelMethod) == null) { + ModelServiceGrpc.getCreateModelMethod = + getCreateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.CreateModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("CreateModel")) + .build(); + } + } + } + return getCreateModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.PauseModelRequest, com.google.cloud.retail.v2alpha.Model> + getPauseModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PauseModel", + requestType = com.google.cloud.retail.v2alpha.PauseModelRequest.class, + responseType = com.google.cloud.retail.v2alpha.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.PauseModelRequest, com.google.cloud.retail.v2alpha.Model> + getPauseModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.PauseModelRequest, + com.google.cloud.retail.v2alpha.Model> + getPauseModelMethod; + if ((getPauseModelMethod = ModelServiceGrpc.getPauseModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getPauseModelMethod = ModelServiceGrpc.getPauseModelMethod) == null) { + ModelServiceGrpc.getPauseModelMethod = + getPauseModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PauseModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.PauseModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("PauseModel")) + .build(); + } + } + } + return getPauseModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ResumeModelRequest, com.google.cloud.retail.v2alpha.Model> + getResumeModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResumeModel", + requestType = com.google.cloud.retail.v2alpha.ResumeModelRequest.class, + responseType = com.google.cloud.retail.v2alpha.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ResumeModelRequest, com.google.cloud.retail.v2alpha.Model> + getResumeModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ResumeModelRequest, + com.google.cloud.retail.v2alpha.Model> + getResumeModelMethod; + if ((getResumeModelMethod = ModelServiceGrpc.getResumeModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getResumeModelMethod = ModelServiceGrpc.getResumeModelMethod) == null) { + ModelServiceGrpc.getResumeModelMethod = + getResumeModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResumeModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ResumeModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("ResumeModel")) + .build(); + } + } + } + return getResumeModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.DeleteModelRequest, com.google.protobuf.Empty> + getDeleteModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteModel", + requestType = com.google.cloud.retail.v2alpha.DeleteModelRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.DeleteModelRequest, com.google.protobuf.Empty> + getDeleteModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.DeleteModelRequest, com.google.protobuf.Empty> + getDeleteModelMethod; + if ((getDeleteModelMethod = ModelServiceGrpc.getDeleteModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getDeleteModelMethod = ModelServiceGrpc.getDeleteModelMethod) == null) { + ModelServiceGrpc.getDeleteModelMethod = + getDeleteModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.DeleteModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("DeleteModel")) + .build(); + } + } + } + return getDeleteModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListModelsRequest, + com.google.cloud.retail.v2alpha.ListModelsResponse> + getListModelsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListModels", + requestType = com.google.cloud.retail.v2alpha.ListModelsRequest.class, + responseType = com.google.cloud.retail.v2alpha.ListModelsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListModelsRequest, + com.google.cloud.retail.v2alpha.ListModelsResponse> + getListModelsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.ListModelsRequest, + com.google.cloud.retail.v2alpha.ListModelsResponse> + getListModelsMethod; + if ((getListModelsMethod = ModelServiceGrpc.getListModelsMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getListModelsMethod = ModelServiceGrpc.getListModelsMethod) == null) { + ModelServiceGrpc.getListModelsMethod = + getListModelsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListModels")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ListModelsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.ListModelsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("ListModels")) + .build(); + } + } + } + return getListModelsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateModelRequest, com.google.cloud.retail.v2alpha.Model> + getUpdateModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateModel", + requestType = com.google.cloud.retail.v2alpha.UpdateModelRequest.class, + responseType = com.google.cloud.retail.v2alpha.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateModelRequest, com.google.cloud.retail.v2alpha.Model> + getUpdateModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.UpdateModelRequest, + com.google.cloud.retail.v2alpha.Model> + getUpdateModelMethod; + if ((getUpdateModelMethod = ModelServiceGrpc.getUpdateModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getUpdateModelMethod = ModelServiceGrpc.getUpdateModelMethod) == null) { + ModelServiceGrpc.getUpdateModelMethod = + getUpdateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.UpdateModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("UpdateModel")) + .build(); + } + } + } + return getUpdateModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.TuneModelRequest, com.google.longrunning.Operation> + getTuneModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TuneModel", + requestType = com.google.cloud.retail.v2alpha.TuneModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.TuneModelRequest, com.google.longrunning.Operation> + getTuneModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2alpha.TuneModelRequest, com.google.longrunning.Operation> + getTuneModelMethod; + if ((getTuneModelMethod = ModelServiceGrpc.getTuneModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getTuneModelMethod = ModelServiceGrpc.getTuneModelMethod) == null) { + ModelServiceGrpc.getTuneModelMethod = + getTuneModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TuneModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2alpha.TuneModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("TuneModel")) + .build(); + } + } + } + return getTuneModelMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ModelServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceStub(channel, callOptions); + } + }; + return ModelServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ModelServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceBlockingStub(channel, callOptions); + } + }; + return ModelServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ModelServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceFutureStub(channel, callOptions); + } + }; + return ModelServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
    +   * Service for performing CRUD operations on models.
    +   * Recommendation models contain all the metadata necessary to generate a set of
    +   * models for the Predict() api. A model is queried
    +   * indirectly via a ServingConfig, which associates a model with a
    +   * given Placement (e.g. Frequently Bought Together on Home Page).
    +   * This service allows customers to e.g.:
    +   * * Initiate training of a model.
    +   * * Pause training of an existing model.
    +   * * List all the available models along with their metadata.
    +   * * Control their tuning schedule.
    +   * 
    + */ + public abstract static class ModelServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
    +     * Creates a new model.
    +     * 
    + */ + public void createModel( + com.google.cloud.retail.v2alpha.CreateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateModelMethod(), responseObserver); + } + + /** + * + * + *
    +     * Pauses the training of an existing model.
    +     * 
    + */ + public void pauseModel( + com.google.cloud.retail.v2alpha.PauseModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPauseModelMethod(), responseObserver); + } + + /** + * + * + *
    +     * Resumes the training of an existing model.
    +     * 
    + */ + public void resumeModel( + com.google.cloud.retail.v2alpha.ResumeModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumeModelMethod(), responseObserver); + } + + /** + * + * + *
    +     * Deletes an existing model.
    +     * 
    + */ + public void deleteModel( + com.google.cloud.retail.v2alpha.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteModelMethod(), responseObserver); + } + + /** + * + * + *
    +     * Lists all the models linked to this event store.
    +     * 
    + */ + public void listModels( + com.google.cloud.retail.v2alpha.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListModelsMethod(), responseObserver); + } + + /** + * + * + *
    +     * Update of model metadata. Only fields that
    +     * currently can be updated are: filtering_option, periodic_tuning_state.
    +     * If other values are provided, this API method will ignore them.
    +     * 
    + */ + public void updateModel( + com.google.cloud.retail.v2alpha.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateModelMethod(), responseObserver); + } + + /** + * + * + *
    +     * Tunes an existing model.
    +     * 
    + */ + public void tuneModel( + com.google.cloud.retail.v2alpha.TuneModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTuneModelMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.CreateModelRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_MODEL))) + .addMethod( + getPauseModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.PauseModelRequest, + com.google.cloud.retail.v2alpha.Model>(this, METHODID_PAUSE_MODEL))) + .addMethod( + getResumeModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.ResumeModelRequest, + com.google.cloud.retail.v2alpha.Model>(this, METHODID_RESUME_MODEL))) + .addMethod( + getDeleteModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.DeleteModelRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_MODEL))) + .addMethod( + getListModelsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.ListModelsRequest, + com.google.cloud.retail.v2alpha.ListModelsResponse>( + this, METHODID_LIST_MODELS))) + .addMethod( + getUpdateModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.UpdateModelRequest, + com.google.cloud.retail.v2alpha.Model>(this, METHODID_UPDATE_MODEL))) + .addMethod( + getTuneModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2alpha.TuneModelRequest, + com.google.longrunning.Operation>(this, METHODID_TUNE_MODEL))) + .build(); + } + } + + /** + * + * + *
    +   * Service for performing CRUD operations on models.
    +   * Recommendation models contain all the metadata necessary to generate a set of
    +   * models for the Predict() api. A model is queried
    +   * indirectly via a ServingConfig, which associates a model with a
    +   * given Placement (e.g. Frequently Bought Together on Home Page).
    +   * This service allows customers to e.g.:
    +   * * Initiate training of a model.
    +   * * Pause training of an existing model.
    +   * * List all the available models along with their metadata.
    +   * * Control their tuning schedule.
    +   * 
    + */ + public static final class ModelServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ModelServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a new model.
    +     * 
    + */ + public void createModel( + com.google.cloud.retail.v2alpha.CreateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Pauses the training of an existing model.
    +     * 
    + */ + public void pauseModel( + com.google.cloud.retail.v2alpha.PauseModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPauseModelMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
    +     * Resumes the training of an existing model.
    +     * 
    + */ + public void resumeModel( + com.google.cloud.retail.v2alpha.ResumeModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumeModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Deletes an existing model.
    +     * 
    + */ + public void deleteModel( + com.google.cloud.retail.v2alpha.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Lists all the models linked to this event store.
    +     * 
    + */ + public void listModels( + com.google.cloud.retail.v2alpha.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListModelsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
    +     * Update of model metadata. Only fields that
    +     * currently can be updated are: filtering_option, periodic_tuning_state.
    +     * If other values are provided, this API method will ignore them.
    +     * 
    + */ + public void updateModel( + com.google.cloud.retail.v2alpha.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Tunes an existing model.
    +     * 
    + */ + public void tuneModel( + com.google.cloud.retail.v2alpha.TuneModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTuneModelMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + * + *
    +   * Service for performing CRUD operations on models.
    +   * Recommendation models contain all the metadata necessary to generate a set of
    +   * models for the Predict() api. A model is queried
    +   * indirectly via a ServingConfig, which associates a model with a
    +   * given Placement (e.g. Frequently Bought Together on Home Page).
    +   * This service allows customers to e.g.:
    +   * * Initiate training of a model.
    +   * * Pause training of an existing model.
    +   * * List all the available models along with their metadata.
    +   * * Control their tuning schedule.
    +   * 
    + */ + public static final class ModelServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ModelServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a new model.
    +     * 
    + */ + public com.google.longrunning.Operation createModel( + com.google.cloud.retail.v2alpha.CreateModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Pauses the training of an existing model.
    +     * 
    + */ + public com.google.cloud.retail.v2alpha.Model pauseModel( + com.google.cloud.retail.v2alpha.PauseModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPauseModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Resumes the training of an existing model.
    +     * 
    + */ + public com.google.cloud.retail.v2alpha.Model resumeModel( + com.google.cloud.retail.v2alpha.ResumeModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumeModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes an existing model.
    +     * 
    + */ + public com.google.protobuf.Empty deleteModel( + com.google.cloud.retail.v2alpha.DeleteModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists all the models linked to this event store.
    +     * 
    + */ + public com.google.cloud.retail.v2alpha.ListModelsResponse listModels( + com.google.cloud.retail.v2alpha.ListModelsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListModelsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Update of model metadata. Only fields that
    +     * currently can be updated are: filtering_option, periodic_tuning_state.
    +     * If other values are provided, this API method will ignore them.
    +     * 
    + */ + public com.google.cloud.retail.v2alpha.Model updateModel( + com.google.cloud.retail.v2alpha.UpdateModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Tunes an existing model.
    +     * 
    + */ + public com.google.longrunning.Operation tuneModel( + com.google.cloud.retail.v2alpha.TuneModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTuneModelMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
    +   * Service for performing CRUD operations on models.
    +   * Recommendation models contain all the metadata necessary to generate a set of
    +   * models for the Predict() api. A model is queried
    +   * indirectly via a ServingConfig, which associates a model with a
    +   * given Placement (e.g. Frequently Bought Together on Home Page).
    +   * This service allows customers to e.g.:
    +   * * Initiate training of a model.
    +   * * Pause training of an existing model.
    +   * * List all the available models along with their metadata.
    +   * * Control their tuning schedule.
    +   * 
    + */ + public static final class ModelServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ModelServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a new model.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + createModel(com.google.cloud.retail.v2alpha.CreateModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Pauses the training of an existing model.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + pauseModel(com.google.cloud.retail.v2alpha.PauseModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPauseModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Resumes the training of an existing model.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + resumeModel(com.google.cloud.retail.v2alpha.ResumeModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResumeModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Deletes an existing model.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + deleteModel(com.google.cloud.retail.v2alpha.DeleteModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Lists all the models linked to this event store.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2alpha.ListModelsResponse> + listModels(com.google.cloud.retail.v2alpha.ListModelsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListModelsMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Update of model metadata. Only fields that
    +     * currently can be updated are: filtering_option, periodic_tuning_state.
    +     * If other values are provided, this API method will ignore them.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + updateModel(com.google.cloud.retail.v2alpha.UpdateModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Tunes an existing model.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + tuneModel(com.google.cloud.retail.v2alpha.TuneModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTuneModelMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_MODEL = 0; + private static final int METHODID_PAUSE_MODEL = 1; + private static final int METHODID_RESUME_MODEL = 2; + private static final int METHODID_DELETE_MODEL = 3; + private static final int METHODID_LIST_MODELS = 4; + private static final int METHODID_UPDATE_MODEL = 5; + private static final int METHODID_TUNE_MODEL = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ModelServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ModelServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_MODEL: + serviceImpl.createModel( + (com.google.cloud.retail.v2alpha.CreateModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PAUSE_MODEL: + serviceImpl.pauseModel( + (com.google.cloud.retail.v2alpha.PauseModelRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RESUME_MODEL: + serviceImpl.resumeModel( + (com.google.cloud.retail.v2alpha.ResumeModelRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_MODEL: + serviceImpl.deleteModel( + (com.google.cloud.retail.v2alpha.DeleteModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_MODELS: + serviceImpl.listModels( + (com.google.cloud.retail.v2alpha.ListModelsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_MODEL: + serviceImpl.updateModel( + (com.google.cloud.retail.v2alpha.UpdateModelRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_TUNE_MODEL: + serviceImpl.tuneModel( + (com.google.cloud.retail.v2alpha.TuneModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class ModelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ModelServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ModelService"); + } + } + + private static final class ModelServiceFileDescriptorSupplier + extends ModelServiceBaseDescriptorSupplier { + ModelServiceFileDescriptorSupplier() {} + } + + private static final class ModelServiceMethodDescriptorSupplier + extends ModelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ModelServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ModelServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ModelServiceFileDescriptorSupplier()) + .addMethod(getCreateModelMethod()) + .addMethod(getPauseModelMethod()) + .addMethod(getResumeModelMethod()) + .addMethod(getDeleteModelMethod()) + .addMethod(getListModelsMethod()) + .addMethod(getUpdateModelMethod()) + .addMethod(getTuneModelMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java b/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java index dc55b473..d0a568a0 100644 --- a/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java +++ b/grpc-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceGrpc.java @@ -719,8 +719,9 @@ public void deleteProduct( * [Product][google.cloud.retail.v2alpha.Product]s, this operation could take * hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. To get a sample of * [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set @@ -740,7 +741,7 @@ public void purgeProducts( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2alpha.Product]s to be successfully updated.
    @@ -766,19 +767,20 @@ public void importProducts(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2alpha.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * or
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product],
    @@ -787,10 +789,10 @@ public void importProducts(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -814,8 +816,9 @@ public void setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -839,8 +842,9 @@ public void addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -865,12 +869,13 @@ public void removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -894,12 +899,13 @@ public void addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1101,8 +1107,9 @@ public void deleteProduct( * [Product][google.cloud.retail.v2alpha.Product]s, this operation could take * hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. To get a sample of * [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set @@ -1124,7 +1131,7 @@ public void purgeProducts( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2alpha.Product]s to be successfully updated.
    @@ -1152,19 +1159,20 @@ public void importProducts(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2alpha.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * or
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product],
    @@ -1173,10 +1181,10 @@ public void importProducts(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -1202,8 +1210,9 @@ public void setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1229,8 +1238,9 @@ public void addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1257,12 +1267,13 @@ public void removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1288,12 +1299,13 @@ public void addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1405,8 +1417,9 @@ public com.google.protobuf.Empty deleteProduct( * [Product][google.cloud.retail.v2alpha.Product]s, this operation could take * hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. To get a sample of * [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set @@ -1425,7 +1438,7 @@ public com.google.longrunning.Operation purgeProducts( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2alpha.Product]s to be successfully updated.
    @@ -1450,19 +1463,20 @@ public com.google.longrunning.Operation importProducts(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2alpha.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * or
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product],
    @@ -1471,10 +1485,10 @@ public com.google.longrunning.Operation importProducts(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -1497,8 +1511,9 @@ public com.google.longrunning.Operation setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1521,8 +1536,9 @@ public com.google.longrunning.Operation addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1546,12 +1562,13 @@ public com.google.longrunning.Operation removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1574,12 +1591,13 @@ public com.google.longrunning.Operation addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1692,8 +1710,9 @@ protected ProductServiceFutureStub build( * [Product][google.cloud.retail.v2alpha.Product]s, this operation could take * hours to complete. Before the operation completes, some * [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, * this operation could take hours to complete. To get a sample of * [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set @@ -1712,7 +1731,7 @@ protected ProductServiceFutureStub build( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2alpha.Product]s to be successfully updated.
    @@ -1737,19 +1756,20 @@ protected ProductServiceFutureStub build(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2alpha.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
          * or
    -     * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product],
    @@ -1758,10 +1778,10 @@ protected ProductServiceFutureStub build(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -1784,8 +1804,9 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1808,8 +1829,9 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1834,12 +1856,13 @@ protected ProductServiceFutureStub build( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1862,12 +1885,13 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2alpha.Product] queried by - * [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] * has no effect on local inventories. * 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/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java index 416d9a72..4fb66ba5 100644 --- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java @@ -668,7 +668,7 @@ public void deleteProduct( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2beta.Product]s to be successfully updated.
    @@ -694,18 +694,20 @@ public void importProducts(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2beta.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * or
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product],
    @@ -714,10 +716,10 @@ public void importProducts(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -741,8 +743,9 @@ public void setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -766,8 +769,9 @@ public void addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -792,12 +796,13 @@ public void removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -821,12 +826,13 @@ public void addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1016,7 +1022,7 @@ public void deleteProduct( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2beta.Product]s to be successfully updated.
    @@ -1044,18 +1050,20 @@ public void importProducts(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2beta.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * or
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product],
    @@ -1064,10 +1072,10 @@ public void importProducts(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -1093,8 +1101,9 @@ public void setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1120,8 +1129,9 @@ public void addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1148,12 +1158,13 @@ public void removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1179,12 +1190,13 @@ public void addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1290,7 +1302,7 @@ public com.google.protobuf.Empty deleteProduct( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2beta.Product]s to be successfully updated.
    @@ -1315,18 +1327,20 @@ public com.google.longrunning.Operation importProducts(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2beta.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * or
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product],
    @@ -1335,10 +1349,10 @@ public com.google.longrunning.Operation importProducts(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -1361,8 +1375,9 @@ public com.google.longrunning.Operation setInventory( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1385,8 +1400,9 @@ public com.google.longrunning.Operation addFulfillmentPlaces( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1410,12 +1426,13 @@ public com.google.longrunning.Operation removeFulfillmentPlaces( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1438,12 +1455,13 @@ public com.google.longrunning.Operation addLocalInventories( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1550,7 +1568,7 @@ protected ProductServiceFutureStub build( * *
          * Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s.
    -     * Request processing may be synchronous. No partial updating is supported.
    +     * Request processing may be synchronous.
          * Non-existing items are created.
          * Note that it is possible for a subset of the
          * [Product][google.cloud.retail.v2beta.Product]s to be successfully updated.
    @@ -1575,18 +1593,20 @@ protected ProductServiceFutureStub build(
          * enqueued and processed downstream. As a consequence, when a response is
          * returned, updates are not immediately manifested in the
          * [Product][google.cloud.retail.v2beta.Product] queried by
    -     * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    -     * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    +     * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
    +     * or
    +     * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
          * When inventory is updated with
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
          * and
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
          * the specified inventory field value(s) will overwrite any existing value(s)
          * while ignoring the last update time for this field. Furthermore, the last
          * update time for the specified inventory fields will be overwritten to the
          * time of the
    -     * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or
    -     * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
    +     * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +     * or
    +     * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
          * request.
          * If no inventory fields are set in
          * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product],
    @@ -1595,10 +1615,10 @@ protected ProductServiceFutureStub build(
          * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask],
          * then any existing inventory information will be preserved.
          * Pre-existing inventory information can only be updated with
    -     * [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    -     * [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
    +     * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
    +     * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces],
          * and
    -     * [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
    +     * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
          * This feature is only available for users who have Retail Search enabled.
          * Please enable Retail Search on Cloud Console before using this feature.
          * 
    @@ -1621,8 +1641,9 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, the added place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1645,8 +1666,9 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, the removed place IDs are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. * @@ -1671,12 +1693,13 @@ protected ProductServiceFutureStub build( * and processed downstream. As a consequence, when a response is returned, * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be modified using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * This feature is only available for users who have Retail Search enabled. * Please enable Retail Search on Cloud Console before using this feature. @@ -1699,12 +1722,13 @@ protected ProductServiceFutureStub build( * enqueued and processed downstream. As a consequence, when a response is * returned, removals are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by - * [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - * [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + * or + * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. * Local inventory information can only be removed using this method. - * [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and - * [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. * 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/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java index 01f62d8d..17798996 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java @@ -241,7 +241,8 @@ public com.google.protobuf.ByteString getProductBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -278,7 +279,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1058,7 +1060,8 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1094,7 +1097,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1130,7 +1134,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1165,7 +1170,8 @@ public Builder setType(java.lang.String value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1196,7 +1202,8 @@ public Builder clearType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequestOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequestOrBuilder.java index b357332f..8ea567d8 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequestOrBuilder.java @@ -80,7 +80,8 @@ public interface AddFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -106,7 +107,8 @@ public interface AddFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java index b54874fe..6d49619f 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java @@ -338,6 +338,8 @@ public com.google.protobuf.ByteString getVisitorIdBytes() { * * *
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -357,6 +359,8 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -376,6 +380,8 @@ public int getLanguageCodesCount() {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -396,6 +402,8 @@ public java.lang.String getLanguageCodes(int index) {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -1379,6 +1387,8 @@ private void ensureLanguageCodesIsMutable() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1398,6 +1408,8 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1417,6 +1429,8 @@ public int getLanguageCodesCount() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1437,6 +1451,8 @@ public java.lang.String getLanguageCodes(int index) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1457,6 +1473,8 @@ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1484,6 +1502,8 @@ public Builder setLanguageCodes(int index, java.lang.String value) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1510,6 +1530,8 @@ public Builder addLanguageCodes(java.lang.String value) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1533,6 +1555,8 @@ public Builder addAllLanguageCodes(java.lang.Iterable values)
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1555,6 +1579,8 @@ public Builder clearLanguageCodes() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java
    index b306a3ca..f8e8fd6e 100644
    --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java
    +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequestOrBuilder.java
    @@ -122,6 +122,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -139,6 +141,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -156,6 +160,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -174,6 +180,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java
    index 63d64471..7f49f10a 100644
    --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java
    +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java
    @@ -188,8 +188,9 @@ public interface CompletionResultOrBuilder
          * * For "user-data", the attributes are additional custom attributes
          * ingested through BigQuery.
          * * For "cloud-retail", the attributes are product attributes generated
    -     * by Cloud Retail. This is an experimental feature. Contact Retail Search
    -     * support team if you are interested in enabling it.
    +     * by Cloud Retail. It requires
    +     * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details]
    +     * is imported properly.
          * 
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -203,8 +204,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -221,8 +223,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -236,8 +239,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -256,8 +260,9 @@ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -478,8 +483,9 @@ public int getAttributesCount() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -506,8 +512,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -525,8 +532,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -549,8 +557,9 @@ public com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1090,8 +1099,9 @@ public int getAttributesCount() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1118,8 +1128,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1137,8 +1148,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1161,8 +1173,9 @@ public com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1192,8 +1205,9 @@ public Builder clearAttributes() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1219,8 +1233,9 @@ public Builder removeAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -1245,8 +1260,9 @@ public Builder putAttributes( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. This is an experimental feature. Contact Retail Search - * support team if you are interested in enabling it. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2; @@ -2140,7 +2156,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2170,7 +2186,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2201,7 +2217,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2230,7 +2246,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2260,7 +2276,7 @@ public com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRe * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3291,7 +3307,7 @@ private void ensureRecentSearchResultsIsMutable() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3324,7 +3340,7 @@ private void ensureRecentSearchResultsIsMutable() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3356,7 +3372,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3389,7 +3405,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3428,7 +3444,7 @@ public Builder setRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3466,7 +3482,7 @@ public Builder setRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3505,7 +3521,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3544,7 +3560,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3581,7 +3597,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3619,7 +3635,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3657,7 +3673,7 @@ public Builder addAllRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3692,7 +3708,7 @@ public Builder clearRecentSearchResults() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3727,7 +3743,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3756,7 +3772,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3789,7 +3805,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3823,7 +3839,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3855,7 +3871,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3888,7 +3904,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java index eda70420..96c407c8 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponseOrBuilder.java @@ -139,7 +139,7 @@ public interface CompleteQueryResponseOrBuilder * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -166,7 +166,7 @@ public interface CompleteQueryResponseOrBuilder * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -193,7 +193,7 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -219,7 +219,7 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -247,7 +247,7 @@ com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult getRecentSea * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java index 0cec394d..a99dba33 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [CreateProduct][] method.
    + * Request message for
    + * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.CreateProductRequest} @@ -497,7 +499,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [CreateProduct][] method.
    +   * Request message for
    +   * [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.CreateProductRequest} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java index a9fbff01..ce447a68 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [DeleteProduct][] method.
    + * Request message for
    + * [ProductService.DeleteProduct][google.cloud.retail.v2.ProductService.DeleteProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.DeleteProductRequest} @@ -361,7 +363,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [DeleteProduct][] method.
    +   * Request message for
    +   * [ProductService.DeleteProduct][google.cloud.retail.v2.ProductService.DeleteProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.DeleteProductRequest} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java index ad31113e..9c6d09c5 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [GetProduct][] method.
    + * Request message for
    + * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.GetProductRequest} @@ -343,7 +345,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [GetProduct][] method.
    +   * Request message for
    +   * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.GetProductRequest} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java index 880e4414..6e705aa9 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java @@ -202,13 +202,18 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -232,13 +237,18 @@ public java.lang.String getPlacement() { * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -354,10 +364,10 @@ public com.google.cloud.retail.v2.UserEventOrBuilder getUserEventOrBuilder() { * * *
    -   * Maximum number of results to return per page. Set this property
    -   * to the number of prediction results needed. If zero, the service will
    -   * choose a reasonable default. The maximum allowed value is 100. Values
    -   * above 100 will be coerced to 100.
    +   * Maximum number of results to return. Set this property to the number of
    +   * prediction results needed. If zero, the service will choose a reasonable
    +   * default. The maximum allowed value is 100. Values above 100 will be coerced
    +   * to 100.
        * 
    * * int32 page_size = 3; @@ -375,14 +385,17 @@ public int getPageSize() { * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return The pageToken. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -398,14 +411,17 @@ public java.lang.String getPageToken() { * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return The bytes for pageToken. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -447,6 +463,12 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) *
    * * string filter = 5; @@ -492,6 +514,12 @@ public java.lang.String getFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -587,6 +615,8 @@ public int getParamsCount() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -631,6 +661,8 @@ public java.util.Map getParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -666,6 +698,8 @@ public java.util.Map getParamsMap() * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -706,6 +740,8 @@ public com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -1357,13 +1393,18 @@ public Builder mergeFrom( * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1386,13 +1427,18 @@ public java.lang.String getPlacement() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1415,13 +1461,18 @@ public com.google.protobuf.ByteString getPlacementBytes() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1443,13 +1494,18 @@ public Builder setPlacement(java.lang.String value) { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1467,13 +1523,18 @@ public Builder clearPlacement() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1808,10 +1869,10 @@ public com.google.cloud.retail.v2.UserEventOrBuilder getUserEventOrBuilder() { * * *
    -     * Maximum number of results to return per page. Set this property
    -     * to the number of prediction results needed. If zero, the service will
    -     * choose a reasonable default. The maximum allowed value is 100. Values
    -     * above 100 will be coerced to 100.
    +     * Maximum number of results to return. Set this property to the number of
    +     * prediction results needed. If zero, the service will choose a reasonable
    +     * default. The maximum allowed value is 100. Values above 100 will be coerced
    +     * to 100.
          * 
    * * int32 page_size = 3; @@ -1826,10 +1887,10 @@ public int getPageSize() { * * *
    -     * Maximum number of results to return per page. Set this property
    -     * to the number of prediction results needed. If zero, the service will
    -     * choose a reasonable default. The maximum allowed value is 100. Values
    -     * above 100 will be coerced to 100.
    +     * Maximum number of results to return. Set this property to the number of
    +     * prediction results needed. If zero, the service will choose a reasonable
    +     * default. The maximum allowed value is 100. Values above 100 will be coerced
    +     * to 100.
          * 
    * * int32 page_size = 3; @@ -1847,10 +1908,10 @@ public Builder setPageSize(int value) { * * *
    -     * Maximum number of results to return per page. Set this property
    -     * to the number of prediction results needed. If zero, the service will
    -     * choose a reasonable default. The maximum allowed value is 100. Values
    -     * above 100 will be coerced to 100.
    +     * Maximum number of results to return. Set this property to the number of
    +     * prediction results needed. If zero, the service will choose a reasonable
    +     * default. The maximum allowed value is 100. Values above 100 will be coerced
    +     * to 100.
          * 
    * * int32 page_size = 3; @@ -1869,13 +1930,16 @@ public Builder clearPageSize() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return The pageToken. */ + @java.lang.Deprecated public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { @@ -1891,13 +1955,16 @@ public java.lang.String getPageToken() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return The bytes for pageToken. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { @@ -1913,14 +1980,17 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @param value The pageToken to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -1934,13 +2004,16 @@ public Builder setPageToken(java.lang.String value) { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); @@ -1951,14 +2024,17 @@ public Builder clearPageToken() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @param value The bytes for pageToken to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1998,6 +2074,12 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2042,6 +2124,12 @@ public java.lang.String getFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2086,6 +2174,12 @@ public com.google.protobuf.ByteString getFilterBytes() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2129,6 +2223,12 @@ public Builder setFilter(java.lang.String value) { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2168,6 +2268,12 @@ public Builder clearFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2300,6 +2406,8 @@ public int getParamsCount() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2344,6 +2452,8 @@ public java.util.Map getParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2379,6 +2489,8 @@ public java.util.Map getParamsMap() * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2419,6 +2531,8 @@ public com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2466,6 +2580,8 @@ public Builder clearParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2509,6 +2625,8 @@ public java.util.Map getMutablePara * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2551,6 +2669,8 @@ public Builder putParams(java.lang.String key, com.google.protobuf.Value value) * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequestOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequestOrBuilder.java index d59a5886..af9af73c 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequestOrBuilder.java @@ -28,13 +28,18 @@ public interface PredictRequestOrBuilder * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -47,13 +52,18 @@ public interface PredictRequestOrBuilder * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -143,10 +153,10 @@ public interface PredictRequestOrBuilder * * *
    -   * Maximum number of results to return per page. Set this property
    -   * to the number of prediction results needed. If zero, the service will
    -   * choose a reasonable default. The maximum allowed value is 100. Values
    -   * above 100 will be coerced to 100.
    +   * Maximum number of results to return. Set this property to the number of
    +   * prediction results needed. If zero, the service will choose a reasonable
    +   * default. The maximum allowed value is 100. Values above 100 will be coerced
    +   * to 100.
        * 
    * * int32 page_size = 3; @@ -159,25 +169,31 @@ public interface PredictRequestOrBuilder * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return The pageToken. */ + @java.lang.Deprecated java.lang.String getPageToken(); /** * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2/prediction_service.proto;l=94 * @return The bytes for pageToken. */ + @java.lang.Deprecated com.google.protobuf.ByteString getPageTokenBytes(); /** @@ -207,6 +223,12 @@ public interface PredictRequestOrBuilder * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -241,6 +263,12 @@ public interface PredictRequestOrBuilder * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -292,6 +320,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -324,6 +354,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -359,6 +391,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -391,6 +425,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -428,6 +464,8 @@ com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictionServiceProto.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictionServiceProto.java index dbd1beae..15a908a5 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictionServiceProto.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictionServiceProto.java @@ -64,40 +64,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ice.proto\022\026google.cloud.retail.v2\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\'google/cloud/retail/v2/user_event.pro" - + "to\032\034google/protobuf/struct.proto\"\260\003\n\016Pre" - + "dictRequest\022\026\n\tplacement\030\001 \001(\tB\003\340A\002\022:\n\nu" - + "ser_event\030\002 \001(\0132!.google.cloud.retail.v2" - + ".UserEventB\003\340A\002\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npa" - + "ge_token\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022\025\n\rvalida" - + "te_only\030\006 \001(\010\022B\n\006params\030\007 \003(\01322.google.c" - + "loud.retail.v2.PredictRequest.ParamsEntr" - + "y\022B\n\006labels\030\010 \003(\01322.google.cloud.retail." - + "v2.PredictRequest.LabelsEntry\032E\n\013ParamsE" + + "o\032\031google/api/resource.proto\032\'google/clo" + + "ud/retail/v2/user_event.proto\032\034google/pr" + + "otobuf/struct.proto\"\264\003\n\016PredictRequest\022\026" + + "\n\tplacement\030\001 \001(\tB\003\340A\002\022:\n\nuser_event\030\002 \001" + + "(\0132!.google.cloud.retail.v2.UserEventB\003\340" + + "A\002\022\021\n\tpage_size\030\003 \001(\005\022\026\n\npage_token\030\004 \001(" + + "\tB\002\030\001\022\016\n\006filter\030\005 \001(\t\022\025\n\rvalidate_only\030\006" + + " \001(\010\022B\n\006params\030\007 \003(\01322.google.cloud.reta" + + "il.v2.PredictRequest.ParamsEntry\022B\n\006labe" + + "ls\030\010 \003(\01322.google.cloud.retail.v2.Predic" + + "tRequest.LabelsEntry\032E\n\013ParamsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobu" + + "f.Value:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\"\347\002\n\017PredictResponse\022I" + + "\n\007results\030\001 \003(\01328.google.cloud.retail.v2" + + ".PredictResponse.PredictionResult\022\031\n\021att" + + "ribution_token\030\002 \001(\t\022\023\n\013missing_ids\030\003 \003(" + + "\t\022\025\n\rvalidate_only\030\004 \001(\010\032\301\001\n\020PredictionR" + + "esult\022\n\n\002id\030\001 \001(\t\022X\n\010metadata\030\002 \003(\0132F.go" + + "ogle.cloud.retail.v2.PredictResponse.Pre" + + "dictionResult.MetadataEntry\032G\n\rMetadataE" + "ntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.googl" - + "e.protobuf.Value:\0028\001\032-\n\013LabelsEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\347\002\n\017PredictR" - + "esponse\022I\n\007results\030\001 \003(\01328.google.cloud." - + "retail.v2.PredictResponse.PredictionResu" - + "lt\022\031\n\021attribution_token\030\002 \001(\t\022\023\n\013missing" - + "_ids\030\003 \003(\t\022\025\n\rvalidate_only\030\004 \001(\010\032\301\001\n\020Pr" - + "edictionResult\022\n\n\002id\030\001 \001(\t\022X\n\010metadata\030\002" - + " \003(\0132F.google.cloud.retail.v2.PredictRes" - + "ponse.PredictionResult.MetadataEntry\032G\n\r" - + "MetadataEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(" - + "\0132\026.google.protobuf.Value:\0028\0012\216\002\n\021Predic" - + "tionService\022\255\001\n\007Predict\022&.google.cloud.r" - + "etail.v2.PredictRequest\032\'.google.cloud.r" - + "etail.v2.PredictResponse\"Q\202\323\344\223\002K\"F/v2/{p" - + "lacement=projects/*/locations/*/catalogs" - + "/*/placements/*}:predict:\001*\032I\312A\025retail.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\313\001\n\032com.google.cl" - + "oud.retail.v2B\026PredictionServiceProtoP\001Z" - + " * Metadata related to the progress of the RemoveFulfillmentPlaces operation. * Currently empty because there is no meaningful metadata populated from the - * [RemoveFulfillmentPlaces][] method. + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] + * method. * * * Protobuf type {@code google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata} @@ -264,7 +265,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the RemoveFulfillmentPlaces operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [RemoveFulfillmentPlaces][] method.
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java index e37b48f8..f10822cb 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [RemoveFulfillmentPlaces][] method.
    + * Request message for
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveFulfillmentPlacesRequest} @@ -679,7 +681,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [RemoveFulfillmentPlaces][] method.
    +   * Request message for
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveFulfillmentPlacesRequest} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java index 60a9d65e..39c5a24d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
    - * is no meaningful response populated from the [RemoveFulfillmentPlaces][]
    + * is no meaningful response populated from the
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
      * method.
      * 
    * @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
    -   * is no meaningful response populated from the [RemoveFulfillmentPlaces][]
    +   * is no meaningful response populated from the
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java index 5f521091..8d500920 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the RemoveLocalInventories operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [RemoveLocalInventories][] method.
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveLocalInventoriesMetadata} @@ -264,7 +265,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the RemoveLocalInventories operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [RemoveLocalInventories][] method.
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveLocalInventoriesMetadata} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java index 76c4ee81..9d1e064f 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [RemoveLocalInventories][] method.
    + * Request message for
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveLocalInventoriesRequest} @@ -554,7 +556,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [RemoveLocalInventories][] method.
    +   * Request message for
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.RemoveLocalInventoriesRequest} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java index 087efafb..5b035e9b 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java @@ -22,8 +22,11 @@ * * *
    - * Response of the [RemoveLocalInventories][] API.  Currently empty because
    - * there is no meaningful response populated from the [RemoveLocalInventories][]
    + * Response of the
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
    + * API.  Currently empty because there is no meaningful response populated from
    + * the
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
      * method.
      * 
    * @@ -262,8 +265,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Response of the [RemoveLocalInventories][] API.  Currently empty because
    -   * there is no meaningful response populated from the [RemoveLocalInventories][]
    +   * Response of the
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
    +   * API.  Currently empty because there is no meaningful response populated from
    +   * the
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java index 245f46e1..62baac33 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java @@ -1324,11 +1324,29 @@ public interface FacetKeyOrBuilder * * *
    -       * The order in which [Facet.values][] are returned.
    +       * True to make facet keys case insensitive when getting faceting
    +       * values with prefixes or contains; false otherwise.
    +       * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + boolean getCaseInsensitive(); + + /** + * + * + *
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -1349,11 +1367,15 @@ public interface FacetKeyOrBuilder
            *
            *
            * 
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -1382,9 +1404,11 @@ public interface FacetKeyOrBuilder
            * detail syntax and limitations. Notice that there is no limitation on
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -1411,9 +1435,11 @@ public interface FacetKeyOrBuilder
            * detail syntax and limitations. Notice that there is no limitation on
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -1429,6 +1455,20 @@ public interface FacetKeyOrBuilder
            * @return The bytes for query.
            */
           com.google.protobuf.ByteString getQueryBytes();
    +
    +      /**
    +       *
    +       *
    +       * 
    +       * Returns the min and max value for each numerical facet intervals.
    +       * Ignored for textual facets.
    +       * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + boolean getReturnMinMax(); } /** * @@ -1551,6 +1591,16 @@ private FacetKey( contains_.add(s); break; } + case 80: + { + caseInsensitive_ = input.readBool(); + break; + } + case 88: + { + returnMinMax_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -2073,17 +2123,40 @@ public com.google.protobuf.ByteString getContainsBytes(int index) { return contains_.getByteString(index); } + public static final int CASE_INSENSITIVE_FIELD_NUMBER = 10; + private boolean caseInsensitive_; + /** + * + * + *
    +       * True to make facet keys case insensitive when getting faceting
    +       * values with prefixes or contains; false otherwise.
    +       * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + public static final int ORDER_BY_FIELD_NUMBER = 4; private volatile java.lang.Object orderBy_; /** * * *
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -2115,11 +2188,15 @@ public java.lang.String getOrderBy() {
            *
            *
            * 
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -2161,9 +2238,11 @@ public com.google.protobuf.ByteString getOrderByBytes() {
            * detail syntax and limitations. Notice that there is no limitation on
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -2201,9 +2280,11 @@ public java.lang.String getQuery() {
            * detail syntax and limitations. Notice that there is no limitation on
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -2231,6 +2312,25 @@ public com.google.protobuf.ByteString getQueryBytes() {
             }
           }
     
    +      public static final int RETURN_MIN_MAX_FIELD_NUMBER = 11;
    +      private boolean returnMinMax_;
    +      /**
    +       *
    +       *
    +       * 
    +       * Returns the min and max value for each numerical facet intervals.
    +       * Ignored for textual facets.
    +       * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + @java.lang.Override + public boolean getReturnMinMax() { + return returnMinMax_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2267,6 +2367,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < contains_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, contains_.getRaw(i)); } + if (caseInsensitive_ != false) { + output.writeBool(10, caseInsensitive_); + } + if (returnMinMax_ != false) { + output.writeBool(11, returnMinMax_); + } unknownFields.writeTo(output); } @@ -2312,6 +2418,12 @@ public int getSerializedSize() { size += dataSize; size += 1 * getContainsList().size(); } + if (caseInsensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, caseInsensitive_); + } + if (returnMinMax_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnMinMax_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2333,8 +2445,10 @@ public boolean equals(final java.lang.Object obj) { if (!getRestrictedValuesList().equals(other.getRestrictedValuesList())) return false; if (!getPrefixesList().equals(other.getPrefixesList())) return false; if (!getContainsList().equals(other.getContainsList())) return false; + if (getCaseInsensitive() != other.getCaseInsensitive()) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getQuery().equals(other.getQuery())) return false; + if (getReturnMinMax() != other.getReturnMinMax()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2364,10 +2478,14 @@ public int hashCode() { hash = (37 * hash) + CONTAINS_FIELD_NUMBER; hash = (53 * hash) + getContainsList().hashCode(); } + hash = (37 * hash) + CASE_INSENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseInsensitive()); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + RETURN_MIN_MAX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnMinMax()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2532,10 +2650,14 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); contains_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); + caseInsensitive_ = false; + orderBy_ = ""; query_ = ""; + returnMinMax_ = false; + return this; } @@ -2590,8 +2712,10 @@ public com.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey buildPartial( bitField0_ = (bitField0_ & ~0x00000008); } result.contains_ = contains_; + result.caseInsensitive_ = caseInsensitive_; result.orderBy_ = orderBy_; result.query_ = query_; + result.returnMinMax_ = returnMinMax_; onBuilt(); return result; } @@ -2707,6 +2831,9 @@ public Builder mergeFrom( } onChanged(); } + if (other.getCaseInsensitive() != false) { + setCaseInsensitive(other.getCaseInsensitive()); + } if (!other.getOrderBy().isEmpty()) { orderBy_ = other.orderBy_; onChanged(); @@ -2715,6 +2842,9 @@ public Builder mergeFrom( query_ = other.query_; onChanged(); } + if (other.getReturnMinMax() != false) { + setReturnMinMax(other.getReturnMinMax()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4129,16 +4259,75 @@ public Builder addContainsBytes(com.google.protobuf.ByteString value) { return this; } + private boolean caseInsensitive_; + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @param value The caseInsensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseInsensitive(boolean value) { + + caseInsensitive_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @return This builder for chaining. + */ + public Builder clearCaseInsensitive() { + + caseInsensitive_ = false; + onChanged(); + return this; + } + private java.lang.Object orderBy_ = ""; /** * * *
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4169,11 +4358,15 @@ public java.lang.String getOrderBy() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4204,11 +4397,15 @@ public com.google.protobuf.ByteString getOrderByBytes() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4238,11 +4435,15 @@ public Builder setOrderBy(java.lang.String value) {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4268,11 +4469,15 @@ public Builder clearOrderBy() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4312,9 +4517,11 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
              * detail syntax and limitations. Notice that there is no limitation on
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4351,9 +4558,11 @@ public java.lang.String getQuery() {
              * detail syntax and limitations. Notice that there is no limitation on
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4390,9 +4599,11 @@ public com.google.protobuf.ByteString getQueryBytes() {
              * detail syntax and limitations. Notice that there is no limitation on
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4428,9 +4639,11 @@ public Builder setQuery(java.lang.String value) {
              * detail syntax and limitations. Notice that there is no limitation on
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4462,9 +4675,11 @@ public Builder clearQuery() {
              * detail syntax and limitations. Notice that there is no limitation on
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4491,6 +4706,61 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
               return this;
             }
     
    +        private boolean returnMinMax_;
    +        /**
    +         *
    +         *
    +         * 
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + @java.lang.Override + public boolean getReturnMinMax() { + return returnMinMax_; + } + /** + * + * + *
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @param value The returnMinMax to set. + * @return This builder for chaining. + */ + public Builder setReturnMinMax(boolean value) { + + returnMinMax_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @return This builder for chaining. + */ + public Builder clearReturnMinMax() { + + returnMinMax_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -9289,7 +9559,8 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Unspecified query expansion condition. This defaults to
    +       * Unspecified query expansion condition. In this case, server behavior
    +       * defaults to
            * [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
            * 
    * @@ -9325,7 +9596,8 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Unspecified query expansion condition. This defaults to
    +       * Unspecified query expansion condition. In this case, server behavior
    +       * defaults to
            * [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
            * 
    * @@ -10206,7 +10478,7 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Default value. Defaults to
    +       * Default value. In this case, server behavior defaults to
            * [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO].
            * 
    * @@ -10240,7 +10512,7 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Default value. Defaults to
    +       * Default value. In this case, server behavior defaults to
            * [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO].
            * 
    * @@ -11019,7 +11291,8 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Unspecified spell correction mode. This defaults to
    +       * Unspecified spell correction mode. In this case, server behavior
    +       * defaults to
            * [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
            * 
    * @@ -11057,7 +11330,8 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Unspecified spell correction mode. This defaults to
    +       * Unspecified spell correction mode. In this case, server behavior
    +       * defaults to
            * [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
            * 
    * @@ -11711,7 +11985,9 @@ public com.google.protobuf.Parser getParserForType() { * * *
    -   * Required. The resource name of the search engine placement, such as
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
        * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
    @@ -11737,7 +12013,9 @@ public java.lang.String getPlacement() {
        *
        *
        * 
    -   * Required. The resource name of the search engine placement, such as
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
        * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
    @@ -12370,7 +12648,7 @@ public com.google.cloud.retail.v2.SearchRequest.FacetSpecOrBuilder getFacetSpecs
        * 
        *
        * @deprecated google.cloud.retail.v2.SearchRequest.dynamic_facet_spec is deprecated. See
    -   *     google/cloud/retail/v2/search_service.proto;l=553
    +   *     google/cloud/retail/v2/search_service.proto;l=575
        * @return Whether the dynamicFacetSpec field is set.
        */
       @java.lang.Override
    @@ -12393,7 +12671,7 @@ public boolean hasDynamicFacetSpec() {
        * 
        *
        * @deprecated google.cloud.retail.v2.SearchRequest.dynamic_facet_spec is deprecated. See
    -   *     google/cloud/retail/v2/search_service.proto;l=553
    +   *     google/cloud/retail/v2/search_service.proto;l=575
        * @return The dynamicFacetSpec.
        */
       @java.lang.Override
    @@ -14095,7 +14373,9 @@ public Builder mergeFrom(
          *
          *
          * 
    -     * Required. The resource name of the search engine placement, such as
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
          * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
    @@ -14120,7 +14400,9 @@ public java.lang.String getPlacement() {
          *
          *
          * 
    -     * Required. The resource name of the search engine placement, such as
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
          * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
    @@ -14145,7 +14427,9 @@ public com.google.protobuf.ByteString getPlacementBytes() {
          *
          *
          * 
    -     * Required. The resource name of the search engine placement, such as
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
          * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
    @@ -14169,7 +14453,9 @@ public Builder setPlacement(java.lang.String value) {
          *
          *
          * 
    -     * Required. The resource name of the search engine placement, such as
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
          * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
    @@ -14189,7 +14475,9 @@ public Builder clearPlacement() {
          *
          *
          * 
    -     * Required. The resource name of the search engine placement, such as
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
          * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
    @@ -15881,7 +16169,7 @@ public com.google.cloud.retail.v2.SearchRequest.FacetSpec.Builder addFacetSpecsB
          * 
          *
          * @deprecated google.cloud.retail.v2.SearchRequest.dynamic_facet_spec is deprecated. See
    -     *     google/cloud/retail/v2/search_service.proto;l=553
    +     *     google/cloud/retail/v2/search_service.proto;l=575
          * @return Whether the dynamicFacetSpec field is set.
          */
         @java.lang.Deprecated
    @@ -15903,7 +16191,7 @@ public boolean hasDynamicFacetSpec() {
          * 
          *
          * @deprecated google.cloud.retail.v2.SearchRequest.dynamic_facet_spec is deprecated. See
    -     *     google/cloud/retail/v2/search_service.proto;l=553
    +     *     google/cloud/retail/v2/search_service.proto;l=575
          * @return The dynamicFacetSpec.
          */
         @java.lang.Deprecated
    diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java
    index e55e41d9..0153a2d8 100644
    --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java
    +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequestOrBuilder.java
    @@ -27,7 +27,9 @@ public interface SearchRequestOrBuilder
        *
        *
        * 
    -   * Required. The resource name of the search engine placement, such as
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
        * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
    @@ -42,7 +44,9 @@ public interface SearchRequestOrBuilder
        *
        *
        * 
    -   * Required. The resource name of the search engine placement, such as
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
        * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
    @@ -455,7 +459,7 @@ public interface SearchRequestOrBuilder
        * 
        *
        * @deprecated google.cloud.retail.v2.SearchRequest.dynamic_facet_spec is deprecated. See
    -   *     google/cloud/retail/v2/search_service.proto;l=553
    +   *     google/cloud/retail/v2/search_service.proto;l=575
        * @return Whether the dynamicFacetSpec field is set.
        */
       @java.lang.Deprecated
    @@ -475,7 +479,7 @@ public interface SearchRequestOrBuilder
        * 
        *
        * @deprecated google.cloud.retail.v2.SearchRequest.dynamic_facet_spec is deprecated. See
    -   *     google/cloud/retail/v2/search_service.proto;l=553
    +   *     google/cloud/retail/v2/search_service.proto;l=575
        * @return The dynamicFacetSpec.
        */
       @java.lang.Deprecated
    diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java
    index e3130be9..8d2108ce 100644
    --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java
    +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java
    @@ -3166,6 +3166,40 @@ public interface FacetValueOrBuilder
            */
           long getCount();
     
    +      /**
    +       *
    +       *
    +       * 
    +       * The minimum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + double getMinValue(); + + /** + * + * + *
    +       * The maximum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + double getMaxValue(); + public com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue.FacetValueCase getFacetValueCase(); } @@ -3247,6 +3281,16 @@ private FacetValue( count_ = input.readInt64(); break; } + case 41: + { + minValue_ = input.readDouble(); + break; + } + case 49: + { + maxValue_ = input.readDouble(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -3470,6 +3514,50 @@ public long getCount() { return count_; } + public static final int MIN_VALUE_FIELD_NUMBER = 5; + private double minValue_; + /** + * + * + *
    +       * The minimum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 6; + private double maxValue_; + /** + * + * + *
    +       * The maximum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3493,6 +3581,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (count_ != 0L) { output.writeInt64(3, count_); } + if (java.lang.Double.doubleToRawLongBits(minValue_) != 0) { + output.writeDouble(5, minValue_); + } + if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { + output.writeDouble(6, maxValue_); + } unknownFields.writeTo(output); } @@ -3513,6 +3607,12 @@ public int getSerializedSize() { if (count_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); } + if (java.lang.Double.doubleToRawLongBits(minValue_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, minValue_); + } + if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, maxValue_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3530,6 +3630,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue) obj; if (getCount() != other.getCount()) return false; + if (java.lang.Double.doubleToLongBits(getMinValue()) + != java.lang.Double.doubleToLongBits(other.getMinValue())) return false; + if (java.lang.Double.doubleToLongBits(getMaxValue()) + != java.lang.Double.doubleToLongBits(other.getMaxValue())) return false; if (!getFacetValueCase().equals(other.getFacetValueCase())) return false; switch (facetValueCase_) { case 1: @@ -3554,6 +3658,16 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinValue())); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxValue())); switch (facetValueCase_) { case 1: hash = (37 * hash) + VALUE_FIELD_NUMBER; @@ -3716,6 +3830,10 @@ public Builder clear() { super.clear(); count_ = 0L; + minValue_ = 0D; + + maxValue_ = 0D; + facetValueCase_ = 0; facetValue_ = null; return this; @@ -3757,6 +3875,8 @@ public com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue buildPartial() } } result.count_ = count_; + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; result.facetValueCase_ = facetValueCase_; onBuilt(); return result; @@ -3814,6 +3934,12 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchResponse.Facet.FacetVa if (other.getCount() != 0L) { setCount(other.getCount()); } + if (other.getMinValue() != 0D) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != 0D) { + setMaxValue(other.getMaxValue()); + } switch (other.getFacetValueCase()) { case VALUE: { @@ -4272,6 +4398,134 @@ public Builder clearCount() { return this; } + private double minValue_; + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(double value) { + + minValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = 0D; + onChanged(); + return this; + } + + private double maxValue_; + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(double value) { + + maxValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = 0D; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -6291,7 +6545,7 @@ public int getTotalSize() { *
        * Contains the spell corrected query, if found. If the spell correction type
        * is AUTOMATIC, then the search results are based on corrected_query.
    -   * Otherwise the original query will be used for search.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -6316,7 +6570,7 @@ public java.lang.String getCorrectedQuery() { *
        * Contains the spell corrected query, if found. If the spell correction type
        * is AUTOMATIC, then the search results are based on corrected_query.
    -   * Otherwise the original query will be used for search.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -8103,7 +8357,7 @@ public Builder clearTotalSize() { *
          * Contains the spell corrected query, if found. If the spell correction type
          * is AUTOMATIC, then the search results are based on corrected_query.
    -     * Otherwise the original query will be used for search.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8127,7 +8381,7 @@ public java.lang.String getCorrectedQuery() { *
          * Contains the spell corrected query, if found. If the spell correction type
          * is AUTOMATIC, then the search results are based on corrected_query.
    -     * Otherwise the original query will be used for search.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8151,7 +8405,7 @@ public com.google.protobuf.ByteString getCorrectedQueryBytes() { *
          * Contains the spell corrected query, if found. If the spell correction type
          * is AUTOMATIC, then the search results are based on corrected_query.
    -     * Otherwise the original query will be used for search.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8174,7 +8428,7 @@ public Builder setCorrectedQuery(java.lang.String value) { *
          * Contains the spell corrected query, if found. If the spell correction type
          * is AUTOMATIC, then the search results are based on corrected_query.
    -     * Otherwise the original query will be used for search.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8193,7 +8447,7 @@ public Builder clearCorrectedQuery() { *
          * Contains the spell corrected query, if found. If the spell correction type
          * is AUTOMATIC, then the search results are based on corrected_query.
    -     * Otherwise the original query will be used for search.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponseOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponseOrBuilder.java index 9ae9b716..07a4c07b 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponseOrBuilder.java @@ -150,7 +150,7 @@ public interface SearchResponseOrBuilder *
        * Contains the spell corrected query, if found. If the spell correction type
        * is AUTOMATIC, then the search results are based on corrected_query.
    -   * Otherwise the original query will be used for search.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -164,7 +164,7 @@ public interface SearchResponseOrBuilder *
        * Contains the spell corrected query, if found. If the spell correction type
        * is AUTOMATIC, then the search results are based on corrected_query.
    -   * Otherwise the original query will be used for search.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchServiceProto.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchServiceProto.java index 28b6899c..36664293 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchServiceProto.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchServiceProto.java @@ -112,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "etail/v2/common.proto\032$google/cloud/reta" + "il/v2/product.proto\032 google/protobuf/fie" + "ld_mask.proto\032\034google/protobuf/struct.pr" - + "oto\"\374\022\n\rSearchRequest\022\026\n\tplacement\030\001 \001(\t" + + "oto\"\256\023\n\rSearchRequest\022\026\n\tplacement\030\001 \001(\t" + "B\003\340A\002\0221\n\006branch\030\002 \001(\tB!\372A\036\n\034retail.googl" + "eapis.com/Branch\022\r\n\005query\030\003 \001(\t\022\027\n\nvisit" + "or_id\030\004 \001(\tB\003\340A\002\0223\n\tuser_info\030\005 \001(\0132 .go" @@ -136,88 +136,92 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "els\030\" \003(\01321.google.cloud.retail.v2.Searc" + "hRequest.LabelsEntry\022]\n\025spell_correction" + "_spec\030# \001(\01329.google.cloud.retail.v2.Sea" - + "rchRequest.SpellCorrectionSpecH\000\210\001\001\032\337\002\n\t" + + "rchRequest.SpellCorrectionSpecH\000\210\001\001\032\221\003\n\t" + "FacetSpec\022P\n\tfacet_key\030\001 \001(\01328.google.cl" + "oud.retail.v2.SearchRequest.FacetSpec.Fa" + "cetKeyB\003\340A\002\022\r\n\005limit\030\002 \001(\005\022\034\n\024excluded_f" + "ilter_keys\030\003 \003(\t\022\037\n\027enable_dynamic_posit" - + "ion\030\004 \001(\010\032\261\001\n\010FacetKey\022\020\n\003key\030\001 \001(\tB\003\340A\002" + + "ion\030\004 \001(\010\032\343\001\n\010FacetKey\022\020\n\003key\030\001 \001(\tB\003\340A\002" + "\0223\n\tintervals\030\002 \003(\0132 .google.cloud.retai" + "l.v2.Interval\022\031\n\021restricted_values\030\003 \003(\t" - + "\022\020\n\010prefixes\030\010 \003(\t\022\020\n\010contains\030\t \003(\t\022\020\n\010" - + "order_by\030\004 \001(\t\022\r\n\005query\030\005 \001(\t\032\226\001\n\020Dynami" - + "cFacetSpec\022I\n\004mode\030\001 \001(\0162;.google.cloud." - + "retail.v2.SearchRequest.DynamicFacetSpec" - + ".Mode\"7\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\014\n\010D" - + "ISABLED\020\001\022\013\n\007ENABLED\020\002\032\356\001\n\tBoostSpec\022a\n\025" - + "condition_boost_specs\030\001 \003(\0132B.google.clo" - + "ud.retail.v2.SearchRequest.BoostSpec.Con" - + "ditionBoostSpec\022\'\n\032skip_boost_spec_valid" - + "ation\030\002 \001(\010H\000\210\001\001\0326\n\022ConditionBoostSpec\022\021" - + "\n\tcondition\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002B\035\n\033_ski" - + "p_boost_spec_validation\032\313\001\n\022QueryExpansi" - + "onSpec\022U\n\tcondition\030\001 \001(\0162B.google.cloud" - + ".retail.v2.SearchRequest.QueryExpansionS" - + "pec.Condition\022\036\n\026pin_unexpanded_results\030" - + "\002 \001(\010\">\n\tCondition\022\031\n\025CONDITION_UNSPECIF" - + "IED\020\000\022\014\n\010DISABLED\020\001\022\010\n\004AUTO\020\003\032\231\001\n\023Person" - + "alizationSpec\022L\n\004mode\030\001 \001(\0162>.google.clo" - + "ud.retail.v2.SearchRequest.Personalizati" - + "onSpec.Mode\"4\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020" - + "\000\022\010\n\004AUTO\020\001\022\014\n\010DISABLED\020\002\032\240\001\n\023SpellCorre" - + "ctionSpec\022L\n\004mode\030\001 \001(\0162>.google.cloud.r" - + "etail.v2.SearchRequest.SpellCorrectionSp" - + "ec.Mode\";\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\023\n" - + "\017SUGGESTION_ONLY\020\001\022\010\n\004AUTO\020\002\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"[\n\nS" - + "earchMode\022\033\n\027SEARCH_MODE_UNSPECIFIED\020\000\022\027" - + "\n\023PRODUCT_SEARCH_ONLY\020\001\022\027\n\023FACETED_SEARC" - + "H_ONLY\020\002B\030\n\026_spell_correction_spec\"\231\n\n\016S" - + "earchResponse\022D\n\007results\030\001 \003(\01323.google." - + "cloud.retail.v2.SearchResponse.SearchRes" - + "ult\022<\n\006facets\030\002 \003(\0132,.google.cloud.retai" - + "l.v2.SearchResponse.Facet\022\022\n\ntotal_size\030" - + "\003 \001(\005\022\027\n\017corrected_query\030\004 \001(\t\022\031\n\021attrib" - + "ution_token\030\005 \001(\t\022\027\n\017next_page_token\030\006 \001" - + "(\t\022W\n\024query_expansion_info\030\007 \001(\01329.googl" - + "e.cloud.retail.v2.SearchResponse.QueryEx" - + "pansionInfo\022\024\n\014redirect_uri\030\n \001(\t\022\030\n\020app" - + "lied_controls\030\014 \003(\t\022i\n\035invalid_condition" - + "_boost_specs\030\016 \003(\0132B.google.cloud.retail" - + ".v2.SearchRequest.BoostSpec.ConditionBoo" - + "stSpec\032\370\003\n\014SearchResult\022\n\n\002id\030\001 \001(\t\0220\n\007p" - + "roduct\030\002 \001(\0132\037.google.cloud.retail.v2.Pr" - + "oduct\022\036\n\026matching_variant_count\030\003 \001(\005\022o\n" - + "\027matching_variant_fields\030\004 \003(\0132N.google." - + "cloud.retail.v2.SearchResponse.SearchRes" - + "ult.MatchingVariantFieldsEntry\022k\n\025varian" - + "t_rollup_values\030\005 \003(\0132L.google.cloud.ret" - + "ail.v2.SearchResponse.SearchResult.Varia" - + "ntRollupValuesEntry\032X\n\032MatchingVariantFi" - + "eldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032." - + "google.protobuf.FieldMask:\0028\001\032R\n\030Variant" - + "RollupValuesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030" - + "\002 \001(\0132\026.google.protobuf.Value:\0028\001\032\347\001\n\005Fa" - + "cet\022\013\n\003key\030\001 \001(\t\022G\n\006values\030\002 \003(\01327.googl" - + "e.cloud.retail.v2.SearchResponse.Facet.F" - + "acetValue\022\025\n\rdynamic_facet\030\003 \001(\010\032q\n\nFace" - + "tValue\022\017\n\005value\030\001 \001(\tH\000\0224\n\010interval\030\002 \001(" - + "\0132 .google.cloud.retail.v2.IntervalH\000\022\r\n" - + "\005count\030\003 \001(\003B\r\n\013facet_value\032I\n\022QueryExpa" - + "nsionInfo\022\026\n\016expanded_query\030\001 \001(\010\022\033\n\023pin" - + "ned_result_count\030\002 \001(\0032\206\002\n\rSearchService" - + "\022\251\001\n\006Search\022%.google.cloud.retail.v2.Sea" - + "rchRequest\032&.google.cloud.retail.v2.Sear" - + "chResponse\"P\202\323\344\223\002J\"E/v2/{placement=proje" - + "cts/*/locations/*/catalogs/*/placements/" - + "*}:search:\001*\032I\312A\025retail.googleapis.com\322A" - + ".https://www.googleapis.com/auth/cloud-p" - + "latformB\307\001\n\032com.google.cloud.retail.v2B\022" - + "SearchServiceProtoP\001Z\n\tCondition\022\031\n\025CONDITIO" + + "N_UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\010\n\004AUTO\020\003\032" + + "\231\001\n\023PersonalizationSpec\022L\n\004mode\030\001 \001(\0162>." + + "google.cloud.retail.v2.SearchRequest.Per" + + "sonalizationSpec.Mode\"4\n\004Mode\022\024\n\020MODE_UN" + + "SPECIFIED\020\000\022\010\n\004AUTO\020\001\022\014\n\010DISABLED\020\002\032\240\001\n\023" + + "SpellCorrectionSpec\022L\n\004mode\030\001 \001(\0162>.goog" + + "le.cloud.retail.v2.SearchRequest.SpellCo" + + "rrectionSpec.Mode\";\n\004Mode\022\024\n\020MODE_UNSPEC" + + "IFIED\020\000\022\023\n\017SUGGESTION_ONLY\020\001\022\010\n\004AUTO\020\002\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"[\n\nSearchMode\022\033\n\027SEARCH_MODE_UNSPE" + + "CIFIED\020\000\022\027\n\023PRODUCT_SEARCH_ONLY\020\001\022\027\n\023FAC" + + "ETED_SEARCH_ONLY\020\002B\030\n\026_spell_correction_" + + "spec\"\300\n\n\016SearchResponse\022D\n\007results\030\001 \003(\013" + + "23.google.cloud.retail.v2.SearchResponse" + + ".SearchResult\022<\n\006facets\030\002 \003(\0132,.google.c" + + "loud.retail.v2.SearchResponse.Facet\022\022\n\nt" + + "otal_size\030\003 \001(\005\022\027\n\017corrected_query\030\004 \001(\t" + + "\022\031\n\021attribution_token\030\005 \001(\t\022\027\n\017next_page" + + "_token\030\006 \001(\t\022W\n\024query_expansion_info\030\007 \001" + + "(\01329.google.cloud.retail.v2.SearchRespon" + + "se.QueryExpansionInfo\022\024\n\014redirect_uri\030\n " + + "\001(\t\022\030\n\020applied_controls\030\014 \003(\t\022i\n\035invalid" + + "_condition_boost_specs\030\016 \003(\0132B.google.cl" + + "oud.retail.v2.SearchRequest.BoostSpec.Co" + + "nditionBoostSpec\032\370\003\n\014SearchResult\022\n\n\002id\030" + + "\001 \001(\t\0220\n\007product\030\002 \001(\0132\037.google.cloud.re" + + "tail.v2.Product\022\036\n\026matching_variant_coun" + + "t\030\003 \001(\005\022o\n\027matching_variant_fields\030\004 \003(\013" + + "2N.google.cloud.retail.v2.SearchResponse" + + ".SearchResult.MatchingVariantFieldsEntry" + + "\022k\n\025variant_rollup_values\030\005 \003(\0132L.google" + + ".cloud.retail.v2.SearchResponse.SearchRe" + + "sult.VariantRollupValuesEntry\032X\n\032Matchin" + + "gVariantFieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005valu" + + "e\030\002 \001(\0132\032.google.protobuf.FieldMask:\0028\001\032" + + "R\n\030VariantRollupValuesEntry\022\013\n\003key\030\001 \001(\t" + + "\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Value:" + + "\0028\001\032\216\002\n\005Facet\022\013\n\003key\030\001 \001(\t\022G\n\006values\030\002 \003" + + "(\01327.google.cloud.retail.v2.SearchRespon" + + "se.Facet.FacetValue\022\025\n\rdynamic_facet\030\003 \001" + + "(\010\032\227\001\n\nFacetValue\022\017\n\005value\030\001 \001(\tH\000\0224\n\010in" + + "terval\030\002 \001(\0132 .google.cloud.retail.v2.In" + + "tervalH\000\022\r\n\005count\030\003 \001(\003\022\021\n\tmin_value\030\005 \001" + + "(\001\022\021\n\tmax_value\030\006 \001(\001B\r\n\013facet_value\032I\n\022" + + "QueryExpansionInfo\022\026\n\016expanded_query\030\001 \001" + + "(\010\022\033\n\023pinned_result_count\030\002 \001(\0032\330\002\n\rSear" + + "chService\022\373\001\n\006Search\022%.google.cloud.reta" + + "il.v2.SearchRequest\032&.google.cloud.retai" + + "l.v2.SearchResponse\"\241\001\202\323\344\223\002\232\001\"E/v2/{plac" + + "ement=projects/*/locations/*/catalogs/*/" + + "placements/*}:search:\001*ZN\"I/v2/{placemen" + + "t=projects/*/locations/*/catalogs/*/serv" + + "ingConfigs/*}:search:\001*\032I\312A\025retail.googl" + + "eapis.com\322A.https://www.googleapis.com/a" + + "uth/cloud-platformB\307\001\n\032com.google.cloud." + + "retail.v2B\022SearchServiceProtoP\001Z * Metadata related to the progress of the SetInventory operation. * Currently empty because there is no meaningful metadata populated from the - * [SetInventory][] method. + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory] + * method. *
    * * Protobuf type {@code google.cloud.retail.v2.SetInventoryMetadata} @@ -262,7 +263,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the SetInventory operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [SetInventory][] method.
    +   * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.SetInventoryMetadata} diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java index 06087958..b3fe7dc5 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [SetInventory][] method.
    + * Request message for
    + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.SetInventoryRequest} @@ -168,8 +170,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -187,22 +190,25 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * .google.cloud.retail.v2.Product inventory = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -226,8 +232,9 @@ public boolean hasInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -245,22 +252,25 @@ public boolean hasInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * .google.cloud.retail.v2.Product inventory = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -286,8 +296,9 @@ public com.google.cloud.retail.v2.Product getInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -305,22 +316,25 @@ public com.google.cloud.retail.v2.Product getInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * .google.cloud.retail.v2.Product inventory = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -669,7 +683,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [SetInventory][] method.
    +   * Request message for
    +   * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.SetInventoryRequest} @@ -881,8 +897,9 @@ public Builder mergeFrom( * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -900,22 +917,25 @@ public Builder mergeFrom( * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -939,8 +959,9 @@ public boolean hasInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -958,22 +979,25 @@ public boolean hasInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1003,8 +1027,9 @@ public com.google.cloud.retail.v2.Product getInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1022,22 +1047,25 @@ public com.google.cloud.retail.v2.Product getInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1069,8 +1097,9 @@ public Builder setInventory(com.google.cloud.retail.v2.Product value) { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1088,22 +1117,25 @@ public Builder setInventory(com.google.cloud.retail.v2.Product value) { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1132,8 +1164,9 @@ public Builder setInventory(com.google.cloud.retail.v2.Product.Builder builderFo * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1151,22 +1184,25 @@ public Builder setInventory(com.google.cloud.retail.v2.Product.Builder builderFo * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1202,8 +1238,9 @@ public Builder mergeInventory(com.google.cloud.retail.v2.Product value) { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1221,22 +1258,25 @@ public Builder mergeInventory(com.google.cloud.retail.v2.Product value) { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1266,8 +1306,9 @@ public Builder clearInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1285,22 +1326,25 @@ public Builder clearInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1324,8 +1368,9 @@ public com.google.cloud.retail.v2.Product.Builder getInventoryBuilder() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1343,22 +1388,25 @@ public com.google.cloud.retail.v2.Product.Builder getInventoryBuilder() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * @@ -1386,8 +1434,9 @@ public com.google.cloud.retail.v2.ProductOrBuilder getInventoryOrBuilder() { * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -1405,22 +1454,25 @@ public com.google.cloud.retail.v2.ProductOrBuilder getInventoryOrBuilder() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequestOrBuilder.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequestOrBuilder.java index 9ecc0f3a..af25b933 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequestOrBuilder.java @@ -35,8 +35,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -54,22 +55,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * .google.cloud.retail.v2.Product inventory = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -90,8 +94,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -109,22 +114,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * .google.cloud.retail.v2.Product inventory = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -145,8 +153,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2.Product] named in * [Product.name][google.cloud.retail.v2.Product.name], regardless of whether @@ -164,22 +173,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2.Product.price_info] * * [Product.availability][google.cloud.retail.v2.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + * should be invoked instead. *
    * * .google.cloud.retail.v2.Product inventory = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java index 8c5e6bd3..4ba09040 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the SetInventoryRequest.  Currently empty because
    - * there is no meaningful response populated from the [SetInventory][]
    + * there is no meaningful response populated from the
    + * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory]
      * method.
      * 
    * @@ -261,7 +262,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the SetInventoryRequest.  Currently empty because
    -   * there is no meaningful response populated from the [SetInventory][]
    +   * there is no meaningful response populated from the
    +   * [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java index 30d82d35..666c184e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [UpdateProduct][] method.
    + * Request message for
    + * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2.UpdateProductRequest} @@ -493,7 +495,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [UpdateProduct][] method.
    +   * Request message for
    +   * [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2.UpdateProductRequest} diff --git a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto index 386a9aa6..57b054bc 100644 --- a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto +++ b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/common.proto @@ -219,9 +219,8 @@ message Interval { // The lower bound of the interval. If neither of the min fields are set, then // the lower bound is negative infinity. // - // This field must be not larger than - // [max][google.cloud.retail.v2.Interval.max]. Otherwise, an INVALID_ARGUMENT - // error is returned. + // This field must not be larger than max. + // Otherwise, an INVALID_ARGUMENT error is returned. oneof min { // Inclusive lower bound. double minimum = 1; @@ -233,9 +232,8 @@ message Interval { // The upper bound of the interval. If neither of the max fields are set, then // the upper bound is positive infinity. // - // This field must be not smaller than - // [min][google.cloud.retail.v2.Interval.min]. Otherwise, an INVALID_ARGUMENT - // error is returned. + // This field must be not smaller than min. + // Otherwise, an INVALID_ARGUMENT error is returned. oneof max { // Inclusive upper bound. double maximum = 3; diff --git a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto index 68306218..14cb26d7 100644 --- a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto +++ b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/completion_service.proto @@ -99,6 +99,9 @@ message CompleteQueryRequest { // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 7; + // Note that this field applies for `user-data` dataset only. For requests + // with `cloud-retail` dataset, setting this field has no effect. + // // The language filters applied to the output suggestions. If set, it should // contain the language of the query. If not set, suggestions are returned // without considering language restrictions. This is the BCP-47 language @@ -159,8 +162,9 @@ message CompleteQueryResponse { // ingested through BigQuery. // // * For "cloud-retail", the attributes are product attributes generated - // by Cloud Retail. This is an experimental feature. Contact Retail Search - // support team if you are interested in enabling it. + // by Cloud Retail. It requires + // [UserEvent.product_details][google.cloud.retail.v2.UserEvent.product_details] + // is imported properly. map attributes = 2; } @@ -195,7 +199,7 @@ message CompleteQueryResponse { // [CompleteQueryRequest.query][google.cloud.retail.v2.CompleteQueryRequest.query] // case insensitively. // - // * They are transformed to lower cases. + // * They are transformed to lower case. // // * They are UTF-8 safe. // diff --git a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/prediction_service.proto b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/prediction_service.proto index f1f1b4e1..26eaaf13 100644 --- a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/prediction_service.proto +++ b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/prediction_service.proto @@ -19,6 +19,7 @@ package google.cloud.retail.v2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/retail/v2/user_event.proto"; import "google/protobuf/struct.proto"; @@ -42,6 +43,10 @@ service PredictionService { option (google.api.http) = { post: "/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:predict" body: "*" + additional_bindings { + post: "/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:predict" + body: "*" + } }; } } @@ -49,14 +54,19 @@ service PredictionService { // Request message for Predict method. message PredictRequest { // Required. Full resource name of the format: - // {name=projects/*/locations/global/catalogs/default_catalog/placements/*} - // The ID of the Recommendations AI placement. Before you can request - // predictions from your model, you must create at least one placement for it. - // For more information, see [Managing - // placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). + // `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` + // or + // `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. + // We recommend using the `servingConfigs` resource. `placements` is a legacy + // resource. + // The ID of the Recommendations AI serving config or placement. + // Before you can request predictions from your model, you must create at + // least one serving config or placement for it. For more information, see + // [Managing serving configurations] + // (https://cloud.google.com/retail/docs/manage-configs). // - // The full list of available placements can be seen at - // https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + // The full list of available serving configs can be seen at + // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs string placement = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Context about the user, what they are looking at and what action @@ -75,14 +85,14 @@ message PredictRequest { // [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id] unset. UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; - // Maximum number of results to return per page. Set this property - // to the number of prediction results needed. If zero, the service will - // choose a reasonable default. The maximum allowed value is 100. Values - // above 100 will be coerced to 100. + // Maximum number of results to return. Set this property to the number of + // prediction results needed. If zero, the service will choose a reasonable + // default. The maximum allowed value is 100. Values above 100 will be coerced + // to 100. int32 page_size = 3; - // The previous PredictResponse.next_page_token. - string page_token = 4; + // This field is not used; leave it unset. + string page_token = 4 [deprecated = true]; // Filter for restricting prediction results with a length limit of 5,000 // characters. Accepts values for tags and the `filterOutOfStockItems` flag. @@ -113,6 +123,14 @@ message PredictRequest { // receive empty results instead. // Note that the API will never return items with storageStatus of "EXPIRED" // or "DELETED" regardless of filter choices. + // + // If `filterSyntaxV2` is set to true under the `params` field, then + // attribute-based expressions are expected instead of the above described + // tag-based syntax. Examples: + // + // * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + // * (availability: ANY("IN_STOCK")) AND + // (colors: ANY("Red") OR categories: ANY("Phones")) string filter = 5; // Use validate only mode for this prediction query. If set to true, a @@ -146,6 +164,8 @@ message PredictRequest { // 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives // request-level control and adjusts prediction results based on product // category. + // * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + // field is interpreteted according to the new, attribute-based syntax. map params = 7; // The labels applied to a resource must meet the following requirements: diff --git a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto index ba8d8d18..e278d81e 100644 --- a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto +++ b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/product_service.proto @@ -115,18 +115,21 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, updates are not immediately manifested in the // [Product][google.cloud.retail.v2.Product] queried by - // [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // // When inventory is updated with - // [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - // [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the - // specified inventory field value(s) will overwrite any existing value(s) + // [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + // and + // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], + // the specified inventory field value(s) will overwrite any existing value(s) // while ignoring the last update time for this field. Furthermore, the last // update time for the specified inventory fields will be overwritten to the // time of the - // [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or - // [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + // or + // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] // request. // // If no inventory fields are set in @@ -138,10 +141,10 @@ service ProductService { // then any existing inventory information will be preserved. // // Pre-existing inventory information can only be updated with - // [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], + // [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], // and - // [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -166,8 +169,9 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, the added place IDs are not immediately manifested in the // [Product][google.cloud.retail.v2.Product] queried by - // [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -193,8 +197,9 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, the removed place IDs are not immediately manifested in the // [Product][google.cloud.retail.v2.Product] queried by - // [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -221,13 +226,15 @@ service ProductService { // and processed downstream. As a consequence, when a response is returned, // updates are not immediately manifested in the // [Product][google.cloud.retail.v2.Product] queried by - // [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // // Local inventory information can only be modified using this method. - // [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - // [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - // effect on local inventories. + // [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + // and + // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -252,13 +259,15 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, removals are not immediately manifested in the // [Product][google.cloud.retail.v2.Product] queried by - // [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // // Local inventory information can only be removed using this method. - // [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and - // [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no - // effect on local inventories. + // [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] + // and + // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -276,7 +285,9 @@ service ProductService { } } -// Request message for [CreateProduct][] method. +// Request message for +// [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] +// method. message CreateProductRequest { // Required. The parent catalog resource name, such as // `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. @@ -306,7 +317,9 @@ message CreateProductRequest { string product_id = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [GetProduct][] method. +// Request message for +// [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] +// method. message GetProductRequest { // Required. Full resource name of [Product][google.cloud.retail.v2.Product], // such as @@ -324,7 +337,9 @@ message GetProductRequest { ]; } -// Request message for [UpdateProduct][] method. +// Request message for +// [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] +// method. message UpdateProductRequest { // Required. The product to update/create. // @@ -358,7 +373,9 @@ message UpdateProductRequest { bool allow_missing = 3; } -// Request message for [DeleteProduct][] method. +// Request message for +// [ProductService.DeleteProduct][google.cloud.retail.v2.ProductService.DeleteProduct] +// method. message DeleteProductRequest { // Required. Full resource name of [Product][google.cloud.retail.v2.Product], // such as @@ -487,10 +504,13 @@ message ListProductsResponse { string next_page_token = 2; } -// Request message for [SetInventory][] method. +// Request message for +// [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory] +// method. message SetInventoryRequest { // Required. The inventory information to update. The allowable fields to // update are: + // // * [Product.price_info][google.cloud.retail.v2.Product.price_info] // * [Product.availability][google.cloud.retail.v2.Product.availability] // * [Product.available_quantity][google.cloud.retail.v2.Product.available_quantity] @@ -498,8 +518,9 @@ message SetInventoryRequest { // The updated inventory fields must be specified in // [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask]. // - // If [SetInventoryRequest.inventory.name][] is empty or invalid, an - // INVALID_ARGUMENT error is returned. + // If + // [SetInventoryRequest.inventory.name][google.cloud.retail.v2.Product.name] + // is empty or invalid, an INVALID_ARGUMENT error is returned. // // If the caller does not have permission to update the // [Product][google.cloud.retail.v2.Product] named in @@ -522,7 +543,8 @@ message SetInventoryRequest { // * Adds "fulfillment_info" in // [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] // * Specifies only the desired fulfillment types and corresponding place IDs - // to update in [SetInventoryRequest.inventory.fulfillment_info][] + // to update in + // [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] // // The caller can clear all place IDs from a subset of fulfillment types in // the following ways: @@ -530,9 +552,9 @@ message SetInventoryRequest { // * Adds "fulfillment_info" in // [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask] // * Specifies only the desired fulfillment types to clear in - // [SetInventoryRequest.inventory.fulfillment_info][] + // [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] // * Checks that only the desired fulfillment info types have empty - // [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + // [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] // // The last update time is recorded for the following inventory fields: // * [Product.price_info][google.cloud.retail.v2.Product.price_info] @@ -541,7 +563,9 @@ message SetInventoryRequest { // * [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info] // // If a full overwrite of inventory information while ignoring timestamps is - // needed, [UpdateProduct][] should be invoked instead. + // needed, + // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] + // should be invoked instead. Product inventory = 1 [(google.api.field_behavior) = REQUIRED]; // Indicates which inventory fields in the provided @@ -569,11 +593,13 @@ message SetInventoryRequest { // Metadata related to the progress of the SetInventory operation. // Currently empty because there is no meaningful metadata populated from the -// [SetInventory][] method. +// [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory] +// method. message SetInventoryMetadata {} // Response of the SetInventoryRequest. Currently empty because -// there is no meaningful response populated from the [SetInventory][] +// there is no meaningful response populated from the +// [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory] // method. message SetInventoryResponse {} @@ -611,7 +637,8 @@ message AddFulfillmentPlacesRequest { // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // - // This field directly corresponds to [Product.fulfillment_info.type][]. + // This field directly corresponds to + // [Product.fulfillment_info.type][google.cloud.retail.v2.FulfillmentInfo.type]. string type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The IDs for this @@ -723,7 +750,9 @@ message AddLocalInventoriesMetadata {} // method. message AddLocalInventoriesResponse {} -// Request message for [RemoveLocalInventories][] method. +// Request message for +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] +// method. message RemoveLocalInventoriesRequest { // Required. Full resource name of [Product][google.cloud.retail.v2.Product], // such as @@ -757,15 +786,21 @@ message RemoveLocalInventoriesRequest { // Metadata related to the progress of the RemoveLocalInventories operation. // Currently empty because there is no meaningful metadata populated from the -// [RemoveLocalInventories][] method. +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] +// method. message RemoveLocalInventoriesMetadata {} -// Response of the [RemoveLocalInventories][] API. Currently empty because -// there is no meaningful response populated from the [RemoveLocalInventories][] +// Response of the +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] +// API. Currently empty because there is no meaningful response populated from +// the +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] // method. message RemoveLocalInventoriesResponse {} -// Request message for [RemoveFulfillmentPlaces][] method. +// Request message for +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] +// method. message RemoveFulfillmentPlacesRequest { // Required. Full resource name of [Product][google.cloud.retail.v2.Product], // such as @@ -829,10 +864,12 @@ message RemoveFulfillmentPlacesRequest { // Metadata related to the progress of the RemoveFulfillmentPlaces operation. // Currently empty because there is no meaningful metadata populated from the -// [RemoveFulfillmentPlaces][] method. +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] +// method. message RemoveFulfillmentPlacesMetadata {} // Response of the RemoveFulfillmentPlacesRequest. Currently empty because there -// is no meaningful response populated from the [RemoveFulfillmentPlaces][] +// is no meaningful response populated from the +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] // method. message RemoveFulfillmentPlacesResponse {} diff --git a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto index 82242742..4e666281 100644 --- a/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto +++ b/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/search_service.proto @@ -51,6 +51,10 @@ service SearchService { option (google.api.http) = { post: "/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" body: "*" + additional_bindings { + post: "/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search" + body: "*" + } }; } } @@ -151,14 +155,22 @@ message SearchRequest { // Only supported on textual fields. Maximum is 10. repeated string contains = 9; - // The order in which [Facet.values][] are returned. + // True to make facet keys case insensitive when getting faceting + // values with prefixes or contains; false otherwise. + bool case_insensitive = 10; + + // The order in which + // [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values] + // are returned. // // Allowed values are: // - // * "count desc", which means order by [Facet.FacetValue.count][] + // * "count desc", which means order by + // [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] // descending. // - // * "value desc", which means order by [Facet.FacetValue.value][] + // * "value desc", which means order by + // [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] // descending. // Only applies to textual facets. // @@ -179,9 +191,11 @@ message SearchRequest { // [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] // when query is specified. // - // In the response, [FacetValue.value][] will be always "1" and - // [FacetValue.count][] will be the number of results that matches the - // query. + // In the response, + // [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] + // will be always "1" and + // [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] + // will be the number of results that match the query. // // For example, you can set a customized facet for "shipToStore", // where @@ -192,6 +206,10 @@ message SearchRequest { // Then the facet will count the products that are both in stock and ship // to store "123". string query = 5; + + // Returns the min and max value for each numerical facet intervals. + // Ignored for textual facets. + bool return_min_max = 11; } // Required. The facet key specification. @@ -344,7 +362,8 @@ message SearchRequest { message QueryExpansionSpec { // Enum describing under which condition query expansion should occur. enum Condition { - // Unspecified query expansion condition. This defaults to + // Unspecified query expansion condition. In this case, server behavior + // defaults to // [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. CONDITION_UNSPECIFIED = 0; @@ -371,7 +390,7 @@ message SearchRequest { message PersonalizationSpec { // The personalization mode of each search request. enum Mode { - // Default value. Defaults to + // Default value. In this case, server behavior defaults to // [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. MODE_UNSPECIFIED = 0; @@ -391,7 +410,8 @@ message SearchRequest { message SpellCorrectionSpec { // Enum describing under which mode spell correction should occur. enum Mode { - // Unspecified spell correction mode. This defaults to + // Unspecified spell correction mode. In this case, server behavior + // defaults to // [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. MODE_UNSPECIFIED = 0; @@ -443,7 +463,9 @@ message SearchRequest { FACETED_SEARCH_ONLY = 2; } - // Required. The resource name of the search engine placement, such as + // Required. The resource name of the Retail Search serving config, such as + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` + // or the name of the legacy placement resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. // This field is used to identify the serving configuration name and the set // of models that will be used to make the search. @@ -777,6 +799,20 @@ message SearchResponse { // Number of items that have this facet value. int64 count = 3; + + // The minimum value in the + // [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval]. + // Only supported on numerical facets and returned if + // [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max] + // is true. + double min_value = 5; + + // The maximum value in the + // [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval]. + // Only supported on numerical facets and returned if + // [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max] + // is true. + double max_value = 6; } // The key for this facet. E.g., "colorFamilies" or "price" or @@ -818,7 +854,7 @@ message SearchResponse { // Contains the spell corrected query, if found. If the spell correction type // is AUTOMATIC, then the search results are based on corrected_query. - // Otherwise the original query will be used for search. + // Otherwise the original query is used for search. string corrected_query = 4; // A unique search token. This should be included in the diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java index e49b6049..eaa65b5e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java @@ -138,7 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -164,7 +164,7 @@ public java.lang.String getAttributesConfig() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -598,7 +598,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -623,7 +623,7 @@ public java.lang.String getAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -648,7 +648,7 @@ public com.google.protobuf.ByteString getAttributesConfigBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -672,7 +672,7 @@ public Builder setAttributesConfig(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -692,7 +692,7 @@ public Builder clearAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequestOrBuilder.java index 9499428e..f8e63889 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface AddCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface AddCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java index f20e548e..1f087cf5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the AddFulfillmentPlaces operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [AddFulfillmentPlaces][] method.
    + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata} @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the AddFulfillmentPlaces operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [AddFulfillmentPlaces][] method.
    +   * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java index 95ce3391..0ba58428 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [AddFulfillmentPlaces][] method.
    + * Request message for
    + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest} @@ -239,7 +241,8 @@ public com.google.protobuf.ByteString getProductBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -276,7 +279,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -692,7 +696,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [AddFulfillmentPlaces][] method.
    +   * Request message for
    +   * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest} @@ -1054,7 +1060,8 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1090,7 +1097,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1126,7 +1134,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1161,7 +1170,8 @@ public Builder setType(java.lang.String value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1192,7 +1202,8 @@ public Builder clearType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequestOrBuilder.java index f959aba0..4c2d7a45 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequestOrBuilder.java @@ -80,7 +80,8 @@ public interface AddFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -106,7 +107,8 @@ public interface AddFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java index 0daca1fa..8a973b23 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the AddFulfillmentPlacesRequest.  Currently empty because
    - * there is no meaningful response populated from the [AddFulfillmentPlaces][]
    + * there is no meaningful response populated from the
    + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
      * method.
      * 
    * @@ -262,7 +263,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the AddFulfillmentPlacesRequest.  Currently empty because
    -   * there is no meaningful response populated from the [AddFulfillmentPlaces][]
    +   * there is no meaningful response populated from the
    +   * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java index 2d319cbd..8fe940af 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the AddLocalInventories operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [AddLocalInventories][] method.
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddLocalInventoriesMetadata} @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the AddLocalInventories operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [AddLocalInventories][] method.
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddLocalInventoriesMetadata} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java index 4a878c01..724814d8 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [AddLocalInventories][] method.
    + * Request message for
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddLocalInventoriesRequest} @@ -681,7 +683,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [AddLocalInventories][] method.
    +   * Request message for
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.AddLocalInventoriesRequest} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java index 87832a31..57679e19 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java @@ -22,8 +22,11 @@ * * *
    - * Response of the [AddLocalInventories][] API.  Currently empty because
    - * there is no meaningful response populated from the [AddLocalInventories][]
    + * Response of the
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
    + * API.  Currently empty because there is no meaningful response populated from
    + * the
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
      * method.
      * 
    * @@ -261,8 +264,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Response of the [AddLocalInventories][] API.  Currently empty because
    -   * there is no meaningful response populated from the [AddLocalInventories][]
    +   * Response of the
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
    +   * API.  Currently empty because there is no meaningful response populated from
    +   * the
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributeConfigLevel.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributeConfigLevel.java index b9e85c8f..ddc64f6e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributeConfigLevel.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributeConfigLevel.java @@ -32,7 +32,7 @@ public enum AttributeConfigLevel implements com.google.protobuf.ProtocolMessageE * * *
    -   * Value used when unset. Defaults to
    +   * Value used when unset. In this case, server behavior defaults to
        * [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2alpha.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG].
        * 
    * @@ -68,7 +68,7 @@ public enum AttributeConfigLevel implements com.google.protobuf.ProtocolMessageE * * *
    -   * Value used when unset. Defaults to
    +   * Value used when unset. In this case, server behavior defaults to
        * [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2alpha.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG].
        * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java new file mode 100644 index 00000000..47fded68 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java @@ -0,0 +1,817 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/export_config.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * A BigQuery output result.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.BigQueryOutputResult} + */ +public final class BigQueryOutputResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.BigQueryOutputResult) + BigQueryOutputResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryOutputResult.newBuilder() to construct. + private BigQueryOutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryOutputResult() { + datasetId_ = ""; + tableId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryOutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryOutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tableId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.BigQueryOutputResult.class, + com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder.class); + } + + public static final int DATASET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object datasetId_; + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object tableId_; + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } + } + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.BigQueryOutputResult)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.BigQueryOutputResult other = + (com.google.cloud.retail.v2alpha.BigQueryOutputResult) obj; + + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.BigQueryOutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * A BigQuery output result.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.BigQueryOutputResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.BigQueryOutputResult) + com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.BigQueryOutputResult.class, + com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.BigQueryOutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + datasetId_ = ""; + + tableId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.BigQueryOutputResult getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.BigQueryOutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.BigQueryOutputResult build() { + com.google.cloud.retail.v2alpha.BigQueryOutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.BigQueryOutputResult buildPartial() { + com.google.cloud.retail.v2alpha.BigQueryOutputResult result = + new com.google.cloud.retail.v2alpha.BigQueryOutputResult(this); + result.datasetId_ = datasetId_; + result.tableId_ = tableId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.BigQueryOutputResult) { + return mergeFrom((com.google.cloud.retail.v2alpha.BigQueryOutputResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.BigQueryOutputResult other) { + if (other == com.google.cloud.retail.v2alpha.BigQueryOutputResult.getDefaultInstance()) + return this; + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.BigQueryOutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.BigQueryOutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object datasetId_ = ""; + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + + datasetId_ = getDefaultInstance().getDatasetId(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tableId_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + + tableId_ = getDefaultInstance().getTableId(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tableId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.BigQueryOutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.BigQueryOutputResult) + private static final com.google.cloud.retail.v2alpha.BigQueryOutputResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.BigQueryOutputResult(); + } + + public static com.google.cloud.retail.v2alpha.BigQueryOutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryOutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryOutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.BigQueryOutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResultOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResultOrBuilder.java new file mode 100644 index 00000000..79d41b74 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResultOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/export_config.proto + +package com.google.cloud.retail.v2alpha; + +public interface BigQueryOutputResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.BigQueryOutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The tableId. + */ + java.lang.String getTableId(); + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java index ce47c7cf..acbb6d32 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java @@ -44,6 +44,7 @@ private CatalogAttribute() { indexableOption_ = 0; dynamicFacetableOption_ = 0; searchableOption_ = 0; + recommendationsFilteringOption_ = 0; } @java.lang.Override @@ -103,6 +104,13 @@ private CatalogAttribute( searchableOption_ = rawValue; break; } + case 64: + { + int rawValue = input.readEnum(); + + recommendationsFilteringOption_ = rawValue; + break; + } case 72: { inUse_ = input.readBool(); @@ -805,6 +813,10 @@ private SearchableOption(int value) { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -830,6 +842,10 @@ public java.lang.String getKey() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -861,14 +877,20 @@ public com.google.protobuf.ByteString getKeyBytes() { * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][google.cloud.retail.v2alpha.CatalogService.ImportCatalogAttributes], + * or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * neither in use by products nor predefined can be deleted. + * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. * * @@ -1080,6 +1102,60 @@ public com.google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption getSear : result; } + public static final int RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER = 8; + private int recommendationsFilteringOption_; + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The enum numeric value on the wire for recommendationsFilteringOption. + */ + @java.lang.Override + public int getRecommendationsFilteringOptionValue() { + return recommendationsFilteringOption_; + } + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The recommendationsFilteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + getRecommendationsFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption result = + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.valueOf( + recommendationsFilteringOption_); + return result == null + ? com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1115,6 +1191,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(7, searchableOption_); } + if (recommendationsFilteringOption_ + != com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, recommendationsFilteringOption_); + } if (inUse_ != false) { output.writeBool(9, inUse_); } @@ -1152,6 +1234,13 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, searchableOption_); } + if (recommendationsFilteringOption_ + != com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(8, recommendationsFilteringOption_); + } if (inUse_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, inUse_); } @@ -1181,6 +1270,7 @@ public boolean equals(final java.lang.Object obj) { if (indexableOption_ != other.indexableOption_) return false; if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; if (searchableOption_ != other.searchableOption_) return false; + if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1204,6 +1294,8 @@ public int hashCode() { hash = (53 * hash) + dynamicFacetableOption_; hash = (37 * hash) + SEARCHABLE_OPTION_FIELD_NUMBER; hash = (53 * hash) + searchableOption_; + hash = (37 * hash) + RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER; + hash = (53 * hash) + recommendationsFilteringOption_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1362,6 +1454,8 @@ public Builder clear() { searchableOption_ = 0; + recommendationsFilteringOption_ = 0; + return this; } @@ -1395,6 +1489,7 @@ public com.google.cloud.retail.v2alpha.CatalogAttribute buildPartial() { result.indexableOption_ = indexableOption_; result.dynamicFacetableOption_ = dynamicFacetableOption_; result.searchableOption_ = searchableOption_; + result.recommendationsFilteringOption_ = recommendationsFilteringOption_; onBuilt(); return result; } @@ -1464,6 +1559,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CatalogAttribute other) if (other.searchableOption_ != 0) { setSearchableOptionValue(other.getSearchableOptionValue()); } + if (other.recommendationsFilteringOption_ != 0) { + setRecommendationsFilteringOptionValue(other.getRecommendationsFilteringOptionValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1501,6 +1599,10 @@ public Builder mergeFrom( * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1525,6 +1627,10 @@ public java.lang.String getKey() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1549,6 +1655,10 @@ public com.google.protobuf.ByteString getKeyBytes() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1572,6 +1682,10 @@ public Builder setKey(java.lang.String value) { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1591,6 +1705,10 @@ public Builder clearKey() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1620,14 +1738,20 @@ public Builder setKeyBytes(com.google.protobuf.ByteString value) { * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][google.cloud.retail.v2alpha.CatalogService.ImportCatalogAttributes], + * or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded + * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + * neither in use by products nor predefined can be deleted. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. * * @@ -1649,14 +1773,20 @@ public boolean getInUse() { * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][google.cloud.retail.v2alpha.CatalogService.ImportCatalogAttributes], + * or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * neither in use by products nor predefined can be deleted. + * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. * * @@ -1681,14 +1811,20 @@ public Builder setInUse(boolean value) { * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][google.cloud.retail.v2alpha.CatalogService.ImportCatalogAttributes], + * or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded + * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + * neither in use by products nor predefined can be deleted. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. * * @@ -2192,6 +2328,137 @@ public Builder clearSearchableOption() { return this; } + private int recommendationsFilteringOption_ = 0; + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The enum numeric value on the wire for recommendationsFilteringOption. + */ + @java.lang.Override + public int getRecommendationsFilteringOptionValue() { + return recommendationsFilteringOption_; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @param value The enum numeric value on the wire for recommendationsFilteringOption to set. + * @return This builder for chaining. + */ + public Builder setRecommendationsFilteringOptionValue(int value) { + + recommendationsFilteringOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The recommendationsFilteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + getRecommendationsFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption result = + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.valueOf( + recommendationsFilteringOption_); + return result == null + ? com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @param value The recommendationsFilteringOption to set. + * @return This builder for chaining. + */ + public Builder setRecommendationsFilteringOption( + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption value) { + if (value == null) { + throw new NullPointerException(); + } + + recommendationsFilteringOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearRecommendationsFilteringOption() { + + recommendationsFilteringOption_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java index 2c3731e9..5c4272d7 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttributeOrBuilder.java @@ -30,6 +30,10 @@ public interface CatalogAttributeOrBuilder * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -44,6 +48,10 @@ public interface CatalogAttributeOrBuilder * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -62,14 +70,20 @@ public interface CatalogAttributeOrBuilder * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][google.cloud.retail.v2alpha.CatalogService.ImportCatalogAttributes], + * or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * neither in use by products nor predefined can be deleted. + * [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. * * @@ -223,4 +237,44 @@ public interface CatalogAttributeOrBuilder * @return The searchableOption. */ com.google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption getSearchableOption(); + + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The enum numeric value on the wire for recommendationsFilteringOption. + */ + int getRecommendationsFilteringOptionValue(); + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The recommendationsFilteringOption. + */ + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + getRecommendationsFilteringOption(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java index 72ebd8d8..233e3edf 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogProto.java @@ -76,7 +76,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pha/import_config.proto\"^\n\022ProductLevelC" + "onfig\022\036\n\026ingestion_product_type\030\001 \001(\t\022(\n" + " merchant_center_product_id_field\030\002 \001(\t\"" - + "\257\006\n\020CatalogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023" + + "\226\007\n\020CatalogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023" + "\n\006in_use\030\t \001(\010B\003\340A\003\022N\n\004type\030\n \001(\0162;.goog" + "le.cloud.retail.v2alpha.CatalogAttribute" + ".AttributeTypeB\003\340A\003\022W\n\020indexable_option\030" @@ -86,66 +86,68 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tail.v2alpha.CatalogAttribute.DynamicFac" + "etableOption\022Y\n\021searchable_option\030\007 \001(\0162" + ">.google.cloud.retail.v2alpha.CatalogAtt" - + "ribute.SearchableOption\"8\n\rAttributeType" - + "\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTUAL\020\001\022\r\n\tNUMERICAL\020" - + "\002\"b\n\017IndexableOption\022 \n\034INDEXABLE_OPTION" - + "_UNSPECIFIED\020\000\022\025\n\021INDEXABLE_ENABLED\020\001\022\026\n" - + "\022INDEXABLE_DISABLED\020\002\"\201\001\n\026DynamicFacetab" - + "leOption\022(\n$DYNAMIC_FACETABLE_OPTION_UNS" - + "PECIFIED\020\000\022\035\n\031DYNAMIC_FACETABLE_ENABLED\020" - + "\001\022\036\n\032DYNAMIC_FACETABLE_DISABLED\020\002\"f\n\020Sea" - + "rchableOption\022!\n\035SEARCHABLE_OPTION_UNSPE" - + "CIFIED\020\000\022\026\n\022SEARCHABLE_ENABLED\020\001\022\027\n\023SEAR" - + "CHABLE_DISABLED\020\002\"\305\003\n\020AttributesConfig\022\024" - + "\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022`\n\022catalog_attribut" - + "es\030\002 \003(\0132D.google.cloud.retail.v2alpha.A" - + "ttributesConfig.CatalogAttributesEntry\022V" - + "\n\026attribute_config_level\030\003 \001(\01621.google." - + "cloud.retail.v2alpha.AttributeConfigLeve" - + "lB\003\340A\003\032g\n\026CatalogAttributesEntry\022\013\n\003key\030" - + "\001 \001(\t\022<\n\005value\030\002 \001(\0132-.google.cloud.reta" - + "il.v2alpha.CatalogAttribute:\0028\001:x\352Au\n&re" - + "tail.googleapis.com/AttributesConfig\022Kpr" - + "ojects/{project}/locations/{location}/ca" - + "talogs/{catalog}/attributesConfig\"\250\005\n\020Co" - + "mpletionConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016" - + "matching_order\030\002 \001(\t\022\027\n\017max_suggestions\030" - + "\003 \001(\005\022\031\n\021min_prefix_length\030\004 \001(\005\022\025\n\rauto" - + "_learning\030\013 \001(\010\022]\n\030suggestions_input_con" - + "fig\030\005 \001(\01326.google.cloud.retail.v2alpha." - + "CompletionDataInputConfigB\003\340A\003\022.\n!last_s" - + "uggestions_import_operation\030\006 \001(\tB\003\340A\003\022Z" - + "\n\025denylist_input_config\030\007 \001(\01326.google.c" - + "loud.retail.v2alpha.CompletionDataInputC" - + "onfigB\003\340A\003\022+\n\036last_denylist_import_opera" - + "tion\030\010 \001(\tB\003\340A\003\022[\n\026allowlist_input_confi" - + "g\030\t \001(\01326.google.cloud.retail.v2alpha.Co" - + "mpletionDataInputConfigB\003\340A\003\022,\n\037last_all" - + "owlist_import_operation\030\n \001(\tB\003\340A\003:x\352Au\n" - + "&retail.googleapis.com/CompletionConfig\022" - + "Kprojects/{project}/locations/{location}" - + "/catalogs/{catalog}/completionConfig\"\222\001\n" - + "\022MerchantCenterLink\022\'\n\032merchant_center_a" - + "ccount_id\030\001 \001(\003B\003\340A\002\022\021\n\tbranch_id\030\002 \001(\t\022" - + "\024\n\014destinations\030\003 \003(\t\022\023\n\013region_code\030\004 \001" - + "(\t\022\025\n\rlanguage_code\030\005 \001(\t\"]\n\033MerchantCen" - + "terLinkingConfig\022>\n\005links\030\001 \003(\0132/.google" - + ".cloud.retail.v2alpha.MerchantCenterLink" - + "\"\323\002\n\007Catalog\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014di" - + "splay_name\030\002 \001(\tB\006\340A\002\340A\005\022R\n\024product_leve" - + "l_config\030\004 \001(\0132/.google.cloud.retail.v2a" - + "lpha.ProductLevelConfigB\003\340A\002\022`\n\036merchant" - + "_center_linking_config\030\006 \001(\01328.google.cl" - + "oud.retail.v2alpha.MerchantCenterLinking" - + "Config:^\352A[\n\035retail.googleapis.com/Catal" - + "og\022:projects/{project}/locations/{locati" - + "on}/catalogs/{catalog}B\332\001\n\037com.google.cl" - + "oud.retail.v2alphaB\014CatalogProtoP\001ZAgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "retail/v2alpha;retail\242\002\006RETAIL\252\002\033Google." - + "Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\Reta" - + "il\\V2alpha\352\002\036Google::Cloud::Retail::V2al" - + "phab\006proto3" + + "ribute.SearchableOption\022e\n recommendatio" + + "ns_filtering_option\030\010 \001(\0162;.google.cloud" + + ".retail.v2alpha.RecommendationsFiltering" + + "Option\"8\n\rAttributeType\022\013\n\007UNKNOWN\020\000\022\013\n\007" + + "TEXTUAL\020\001\022\r\n\tNUMERICAL\020\002\"b\n\017IndexableOpt" + + "ion\022 \n\034INDEXABLE_OPTION_UNSPECIFIED\020\000\022\025\n" + + "\021INDEXABLE_ENABLED\020\001\022\026\n\022INDEXABLE_DISABL" + + "ED\020\002\"\201\001\n\026DynamicFacetableOption\022(\n$DYNAM" + + "IC_FACETABLE_OPTION_UNSPECIFIED\020\000\022\035\n\031DYN" + + "AMIC_FACETABLE_ENABLED\020\001\022\036\n\032DYNAMIC_FACE" + + "TABLE_DISABLED\020\002\"f\n\020SearchableOption\022!\n\035" + + "SEARCHABLE_OPTION_UNSPECIFIED\020\000\022\026\n\022SEARC" + + "HABLE_ENABLED\020\001\022\027\n\023SEARCHABLE_DISABLED\020\002" + + "\"\305\003\n\020AttributesConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002" + + "\340A\005\022`\n\022catalog_attributes\030\002 \003(\0132D.google" + + ".cloud.retail.v2alpha.AttributesConfig.C" + + "atalogAttributesEntry\022V\n\026attribute_confi" + + "g_level\030\003 \001(\01621.google.cloud.retail.v2al" + + "pha.AttributeConfigLevelB\003\340A\003\032g\n\026Catalog" + + "AttributesEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 " + + "\001(\0132-.google.cloud.retail.v2alpha.Catalo" + + "gAttribute:\0028\001:x\352Au\n&retail.googleapis.c" + + "om/AttributesConfig\022Kprojects/{project}/" + + "locations/{location}/catalogs/{catalog}/" + + "attributesConfig\"\250\005\n\020CompletionConfig\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016matching_order\030\002 " + + "\001(\t\022\027\n\017max_suggestions\030\003 \001(\005\022\031\n\021min_pref" + + "ix_length\030\004 \001(\005\022\025\n\rauto_learning\030\013 \001(\010\022]" + + "\n\030suggestions_input_config\030\005 \001(\01326.googl" + + "e.cloud.retail.v2alpha.CompletionDataInp" + + "utConfigB\003\340A\003\022.\n!last_suggestions_import" + + "_operation\030\006 \001(\tB\003\340A\003\022Z\n\025denylist_input_" + + "config\030\007 \001(\01326.google.cloud.retail.v2alp" + + "ha.CompletionDataInputConfigB\003\340A\003\022+\n\036las" + + "t_denylist_import_operation\030\010 \001(\tB\003\340A\003\022[" + + "\n\026allowlist_input_config\030\t \001(\01326.google." + + "cloud.retail.v2alpha.CompletionDataInput" + + "ConfigB\003\340A\003\022,\n\037last_allowlist_import_ope" + + "ration\030\n \001(\tB\003\340A\003:x\352Au\n&retail.googleapi" + + "s.com/CompletionConfig\022Kprojects/{projec" + + "t}/locations/{location}/catalogs/{catalo" + + "g}/completionConfig\"\222\001\n\022MerchantCenterLi" + + "nk\022\'\n\032merchant_center_account_id\030\001 \001(\003B\003" + + "\340A\002\022\021\n\tbranch_id\030\002 \001(\t\022\024\n\014destinations\030\003" + + " \003(\t\022\023\n\013region_code\030\004 \001(\t\022\025\n\rlanguage_co" + + "de\030\005 \001(\t\"]\n\033MerchantCenterLinkingConfig\022" + + ">\n\005links\030\001 \003(\0132/.google.cloud.retail.v2a" + + "lpha.MerchantCenterLink\"\323\002\n\007Catalog\022\024\n\004n" + + "ame\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014display_name\030\002 \001(\tB" + + "\006\340A\002\340A\005\022R\n\024product_level_config\030\004 \001(\0132/." + + "google.cloud.retail.v2alpha.ProductLevel" + + "ConfigB\003\340A\002\022`\n\036merchant_center_linking_c" + + "onfig\030\006 \001(\01328.google.cloud.retail.v2alph" + + "a.MerchantCenterLinkingConfig:^\352A[\n\035reta" + + "il.googleapis.com/Catalog\022:projects/{pro" + + "ject}/locations/{location}/catalogs/{cat" + + "alog}B\332\001\n\037com.google.cloud.retail.v2alph" + + "aB\014CatalogProtoP\001ZAgoogle.golang.org/gen" + + "proto/googleapis/cloud/retail/v2alpha;re" + + "tail\242\002\006RETAIL\252\002\033Google.Cloud.Retail.V2Al" + + "pha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036Goog" + + "le::Cloud::Retail::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -176,6 +178,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IndexableOption", "DynamicFacetableOption", "SearchableOption", + "RecommendationsFilteringOption", }); internal_static_google_cloud_retail_v2alpha_AttributesConfig_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java index bad82b81..629f1c7d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CommonProto.java @@ -175,54 +175,58 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\t\032$\n\014IgnoreAction\022\024\n\014ignore_terms\030\001 \003(" + "\tB\010\n\006action\"/\n\010Audience\022\017\n\007genders\030\001 \003(\t" + "\022\022\n\nage_groups\030\002 \003(\t\"3\n\tColorInfo\022\026\n\016col" - + "or_families\030\001 \003(\t\022\016\n\006colors\030\002 \003(\t\"~\n\017Cus" - + "tomAttribute\022\014\n\004text\030\001 \003(\t\022\017\n\007numbers\030\002 " - + "\003(\001\022\027\n\nsearchable\030\003 \001(\010H\000\210\001\001\022\026\n\tindexabl" - + "e\030\004 \001(\010H\001\210\001\001B\r\n\013_searchableB\014\n\n_indexabl" - + "e\"2\n\017FulfillmentInfo\022\014\n\004type\030\001 \001(\t\022\021\n\tpl" - + "ace_ids\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002" - + "\022\016\n\006height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\"x\n\010Inter" - + "val\022\021\n\007minimum\030\001 \001(\001H\000\022\033\n\021exclusive_mini" - + "mum\030\002 \001(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022\033\n\021exclus" - + "ive_maximum\030\004 \001(\001H\001B\005\n\003minB\005\n\003max\"\231\003\n\tPr" - + "iceInfo\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005price\030" - + "\002 \001(\002\022\026\n\016original_price\030\003 \001(\002\022\014\n\004cost\030\004 " - + "\001(\002\0228\n\024price_effective_time\030\005 \001(\0132\032.goog" - + "le.protobuf.Timestamp\0225\n\021price_expire_ti" - + "me\030\006 \001(\0132\032.google.protobuf.Timestamp\022K\n\013" - + "price_range\030\007 \001(\01321.google.cloud.retail." - + "v2alpha.PriceInfo.PriceRangeB\003\340A\003\032\201\001\n\nPr" - + "iceRange\0224\n\005price\030\001 \001(\0132%.google.cloud.r" - + "etail.v2alpha.Interval\022=\n\016original_price" - + "\030\002 \001(\0132%.google.cloud.retail.v2alpha.Int" - + "erval\"P\n\006Rating\022\024\n\014rating_count\030\001 \001(\005\022\026\n" - + "\016average_rating\030\002 \001(\002\022\030\n\020rating_histogra" - + "m\030\003 \003(\005\"`\n\010UserInfo\022\017\n\007user_id\030\001 \001(\t\022\022\n\n" - + "ip_address\030\002 \001(\t\022\022\n\nuser_agent\030\003 \001(\t\022\033\n\023" - + "direct_user_request\030\004 \001(\010\"\260\002\n\016LocalInven" - + "tory\022\020\n\010place_id\030\001 \001(\t\022:\n\nprice_info\030\002 \001" - + "(\0132&.google.cloud.retail.v2alpha.PriceIn" - + "fo\022O\n\nattributes\030\003 \003(\0132;.google.cloud.re" - + "tail.v2alpha.LocalInventory.AttributesEn" - + "try\022\036\n\021fulfillment_types\030\004 \003(\tB\003\340A\004\032_\n\017A" - + "ttributesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001" - + "(\0132,.google.cloud.retail.v2alpha.CustomA" - + "ttribute:\0028\001*\206\001\n\024AttributeConfigLevel\022&\n" - + "\"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED\020\000\022\"\n" - + "\036PRODUCT_LEVEL_ATTRIBUTE_CONFIG\020\001\022\"\n\036CAT" - + "ALOG_LEVEL_ATTRIBUTE_CONFIG\020\002*i\n\014Solutio" - + "nType\022\035\n\031SOLUTION_TYPE_UNSPECIFIED\020\000\022 \n\034" - + "SOLUTION_TYPE_RECOMMENDATION\020\001\022\030\n\024SOLUTI" - + "ON_TYPE_SEARCH\020\002*\213\001\n\025SearchSolutionUseCa" - + "se\022(\n$SEARCH_SOLUTION_USE_CASE_UNSPECIFI" - + "ED\020\000\022#\n\037SEARCH_SOLUTION_USE_CASE_SEARCH\020" - + "\001\022#\n\037SEARCH_SOLUTION_USE_CASE_BROWSE\020\002B\331" - + "\001\n\037com.google.cloud.retail.v2alphaB\013Comm" - + "onProtoP\001ZAgoogle.golang.org/genproto/go" - + "ogleapis/cloud/retail/v2alpha;retail\242\002\006R" - + "ETAIL\252\002\033Google.Cloud.Retail.V2Alpha\312\002\033Go" - + "ogle\\Cloud\\Retail\\V2alpha\352\002\036Google::Clou" - + "d::Retail::V2alphab\006proto3" + + "or_families\030\001 \003(\t\022\016\n\006colors\030\002 \003(\t\"\206\001\n\017Cu" + + "stomAttribute\022\014\n\004text\030\001 \003(\t\022\017\n\007numbers\030\002" + + " \003(\001\022\033\n\nsearchable\030\003 \001(\010B\002\030\001H\000\210\001\001\022\032\n\tind" + + "exable\030\004 \001(\010B\002\030\001H\001\210\001\001B\r\n\013_searchableB\014\n\n" + + "_indexable\"2\n\017FulfillmentInfo\022\014\n\004type\030\001 " + + "\001(\t\022\021\n\tplace_ids\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001" + + " \001(\tB\003\340A\002\022\016\n\006height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005" + + "\"x\n\010Interval\022\021\n\007minimum\030\001 \001(\001H\000\022\033\n\021exclu" + + "sive_minimum\030\002 \001(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022" + + "\033\n\021exclusive_maximum\030\004 \001(\001H\001B\005\n\003minB\005\n\003m" + + "ax\"\231\003\n\tPriceInfo\022\025\n\rcurrency_code\030\001 \001(\t\022" + + "\r\n\005price\030\002 \001(\002\022\026\n\016original_price\030\003 \001(\002\022\014" + + "\n\004cost\030\004 \001(\002\0228\n\024price_effective_time\030\005 \001" + + "(\0132\032.google.protobuf.Timestamp\0225\n\021price_" + + "expire_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stamp\022K\n\013price_range\030\007 \001(\01321.google.clou" + + "d.retail.v2alpha.PriceInfo.PriceRangeB\003\340" + + "A\003\032\201\001\n\nPriceRange\0224\n\005price\030\001 \001(\0132%.googl" + + "e.cloud.retail.v2alpha.Interval\022=\n\016origi" + + "nal_price\030\002 \001(\0132%.google.cloud.retail.v2" + + "alpha.Interval\"P\n\006Rating\022\024\n\014rating_count" + + "\030\001 \001(\005\022\026\n\016average_rating\030\002 \001(\002\022\030\n\020rating" + + "_histogram\030\003 \003(\005\"`\n\010UserInfo\022\017\n\007user_id\030" + + "\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\022\n\nuser_agent\030" + + "\003 \001(\t\022\033\n\023direct_user_request\030\004 \001(\010\"\260\002\n\016L" + + "ocalInventory\022\020\n\010place_id\030\001 \001(\t\022:\n\nprice" + + "_info\030\002 \001(\0132&.google.cloud.retail.v2alph" + + "a.PriceInfo\022O\n\nattributes\030\003 \003(\0132;.google" + + ".cloud.retail.v2alpha.LocalInventory.Att" + + "ributesEntry\022\036\n\021fulfillment_types\030\004 \003(\tB" + + "\003\340A\004\032_\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005" + + "value\030\002 \001(\0132,.google.cloud.retail.v2alph" + + "a.CustomAttribute:\0028\001*\206\001\n\024AttributeConfi" + + "gLevel\022&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPECI" + + "FIED\020\000\022\"\n\036PRODUCT_LEVEL_ATTRIBUTE_CONFIG" + + "\020\001\022\"\n\036CATALOG_LEVEL_ATTRIBUTE_CONFIG\020\002*i" + + "\n\014SolutionType\022\035\n\031SOLUTION_TYPE_UNSPECIF" + + "IED\020\000\022 \n\034SOLUTION_TYPE_RECOMMENDATION\020\001\022" + + "\030\n\024SOLUTION_TYPE_SEARCH\020\002*\241\001\n\036Recommenda" + + "tionsFilteringOption\0220\n,RECOMMENDATIONS_" + + "FILTERING_OPTION_UNSPECIFIED\020\000\022&\n\"RECOMM" + + "ENDATIONS_FILTERING_DISABLED\020\001\022%\n!RECOMM" + + "ENDATIONS_FILTERING_ENABLED\020\003*\213\001\n\025Search" + + "SolutionUseCase\022(\n$SEARCH_SOLUTION_USE_C" + + "ASE_UNSPECIFIED\020\000\022#\n\037SEARCH_SOLUTION_USE" + + "_CASE_SEARCH\020\001\022#\n\037SEARCH_SOLUTION_USE_CA" + + "SE_BROWSE\020\002B\331\001\n\037com.google.cloud.retail." + + "v2alphaB\013CommonProtoP\001ZAgoogle.golang.or" + + "g/genproto/googleapis/cloud/retail/v2alp" + + "ha;retail\242\002\006RETAIL\252\002\033Google.Cloud.Retail" + + ".V2Alpha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002" + + "\036Google::Cloud::Retail::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java index d64f45b2..ebd6d727 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java @@ -338,6 +338,8 @@ public com.google.protobuf.ByteString getVisitorIdBytes() { * * *
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -357,6 +359,8 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -376,6 +380,8 @@ public int getLanguageCodesCount() {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -396,6 +402,8 @@ public java.lang.String getLanguageCodes(int index) {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -491,9 +499,9 @@ public com.google.protobuf.ByteString getDeviceTypeBytes() {
        * events. If leave empty, it will use the "user-data".
        * Current supported values:
        * * user-data
    -   * * cloud-retail
    -   *   This option requires additional allowlisting. Before using cloud-retail,
    -   *   contact Cloud Retail support team first.
    +   * * cloud-retail:
    +   *   This option requires enabling auto-learning function first. See
    +   *   [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
        * 
    * * string dataset = 6; @@ -523,9 +531,9 @@ public java.lang.String getDataset() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1381,6 +1389,8 @@ private void ensureLanguageCodesIsMutable() { * * *
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1400,6 +1410,8 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1419,6 +1431,8 @@ public int getLanguageCodesCount() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1439,6 +1453,8 @@ public java.lang.String getLanguageCodes(int index) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1459,6 +1475,8 @@ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1486,6 +1504,8 @@ public Builder setLanguageCodes(int index, java.lang.String value) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1512,6 +1532,8 @@ public Builder addLanguageCodes(java.lang.String value) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1535,6 +1557,8 @@ public Builder addAllLanguageCodes(java.lang.Iterable values)
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1557,6 +1581,8 @@ public Builder clearLanguageCodes() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1739,9 +1765,9 @@ public Builder setDeviceTypeBytes(com.google.protobuf.ByteString value) {
          * events. If leave empty, it will use the "user-data".
          * Current supported values:
          * * user-data
    -     * * cloud-retail
    -     *   This option requires additional allowlisting. Before using cloud-retail,
    -     *   contact Cloud Retail support team first.
    +     * * cloud-retail:
    +     *   This option requires enabling auto-learning function first. See
    +     *   [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
          * 
    * * string dataset = 6; @@ -1770,9 +1796,9 @@ public java.lang.String getDataset() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1801,9 +1827,9 @@ public com.google.protobuf.ByteString getDatasetBytes() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1831,9 +1857,9 @@ public Builder setDataset(java.lang.String value) { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1857,9 +1883,9 @@ public Builder clearDataset() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java index 966f4cab..a1918443 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequestOrBuilder.java @@ -122,6 +122,8 @@ public interface CompleteQueryRequestOrBuilder * * *
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -139,6 +141,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -156,6 +160,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -174,6 +180,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -241,9 +249,9 @@ public interface CompleteQueryRequestOrBuilder
        * events. If leave empty, it will use the "user-data".
        * Current supported values:
        * * user-data
    -   * * cloud-retail
    -   *   This option requires additional allowlisting. Before using cloud-retail,
    -   *   contact Cloud Retail support team first.
    +   * * cloud-retail:
    +   *   This option requires enabling auto-learning function first. See
    +   *   [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
        * 
    * * string dataset = 6; @@ -262,9 +270,9 @@ public interface CompleteQueryRequestOrBuilder * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java index e6eda58e..07a067ab 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java @@ -190,7 +190,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -204,7 +206,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -222,7 +226,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -237,7 +243,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -256,7 +264,9 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -478,7 +488,9 @@ public int getAttributesCount() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -505,7 +517,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -523,7 +537,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -546,7 +562,9 @@ public com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1092,7 +1110,9 @@ public int getAttributesCount() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1120,7 +1140,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1139,7 +1161,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1163,7 +1187,9 @@ public com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1195,7 +1221,9 @@ public Builder clearAttributes() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1222,7 +1250,9 @@ public Builder removeAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -1248,7 +1278,9 @@ public Builder putAttributes( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 2; @@ -2157,7 +2189,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2187,7 +2219,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2219,7 +2251,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2248,7 +2280,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2278,7 +2310,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3316,7 +3348,7 @@ private void ensureRecentSearchResultsIsMutable() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3349,7 +3381,7 @@ private void ensureRecentSearchResultsIsMutable() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3381,7 +3413,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3414,7 +3446,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3453,7 +3485,7 @@ public Builder setRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3491,7 +3523,7 @@ public Builder setRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3530,7 +3562,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3569,7 +3601,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3606,7 +3638,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3644,7 +3676,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3682,7 +3714,7 @@ public Builder addAllRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3717,7 +3749,7 @@ public Builder clearRecentSearchResults() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3752,7 +3784,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3781,7 +3813,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3814,7 +3846,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3849,7 +3881,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3881,7 +3913,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3914,7 +3946,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java index 494569c4..d813f6f0 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponseOrBuilder.java @@ -140,7 +140,7 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult getComple * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -167,7 +167,7 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult getComple * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -194,7 +194,7 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -220,7 +220,7 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -249,7 +249,7 @@ com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult getRece * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java index 76d9fe1a..f807a0be 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java @@ -334,9 +334,10 @@ public com.google.protobuf.ByteString getMatchingOrderBytes() { * * *
    -   * The maximum number of autocomplete suggestions returned per term. The
    -   * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -   * or set to 0, then will fallback to default value.
    +   * The maximum number of autocomplete suggestions returned per term. Default
    +   * value is 20. If left unset or set to 0, then will fallback to default
    +   * value.
    +   * Value range is 1 to 20.
        * 
    * * int32 max_suggestions = 3; @@ -357,6 +358,7 @@ public int getMaxSuggestions() { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -396,8 +398,8 @@ public boolean getAutoLearning() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -414,8 +416,8 @@ public boolean hasSuggestionsInputConfig() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -434,8 +436,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getSuggestionsI * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -513,8 +515,8 @@ public com.google.protobuf.ByteString getLastSuggestionsImportOperationBytes() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -531,8 +533,8 @@ public boolean hasDenylistInputConfig() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -551,8 +553,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getDenylistInpu * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -571,7 +573,7 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getDenylistInpu * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -597,7 +599,7 @@ public java.lang.String getLastDenylistImportOperation() { * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -626,8 +628,8 @@ public com.google.protobuf.ByteString getLastDenylistImportOperationBytes() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -644,8 +646,8 @@ public boolean hasAllowlistInputConfig() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -664,8 +666,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getAllowlistInp * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -684,7 +686,7 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getAllowlistInp * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -710,7 +712,7 @@ public java.lang.String getLastAllowlistImportOperation() { * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -1517,9 +1519,10 @@ public Builder setMatchingOrderBytes(com.google.protobuf.ByteString value) { * * *
    -     * The maximum number of autocomplete suggestions returned per term. The
    -     * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -     * or set to 0, then will fallback to default value.
    +     * The maximum number of autocomplete suggestions returned per term. Default
    +     * value is 20. If left unset or set to 0, then will fallback to default
    +     * value.
    +     * Value range is 1 to 20.
          * 
    * * int32 max_suggestions = 3; @@ -1534,9 +1537,10 @@ public int getMaxSuggestions() { * * *
    -     * The maximum number of autocomplete suggestions returned per term. The
    -     * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -     * or set to 0, then will fallback to default value.
    +     * The maximum number of autocomplete suggestions returned per term. Default
    +     * value is 20. If left unset or set to 0, then will fallback to default
    +     * value.
    +     * Value range is 1 to 20.
          * 
    * * int32 max_suggestions = 3; @@ -1554,9 +1558,10 @@ public Builder setMaxSuggestions(int value) { * * *
    -     * The maximum number of autocomplete suggestions returned per term. The
    -     * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -     * or set to 0, then will fallback to default value.
    +     * The maximum number of autocomplete suggestions returned per term. Default
    +     * value is 20. If left unset or set to 0, then will fallback to default
    +     * value.
    +     * Value range is 1 to 20.
          * 
    * * int32 max_suggestions = 3; @@ -1578,6 +1583,7 @@ public Builder clearMaxSuggestions() { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -1595,6 +1601,7 @@ public int getMinPrefixLength() { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -1615,6 +1622,7 @@ public Builder setMinPrefixLength(int value) { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -1702,8 +1710,8 @@ public Builder clearAutoLearning() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1719,8 +1727,8 @@ public boolean hasSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1742,8 +1750,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getSuggestionsI * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1768,8 +1776,8 @@ public Builder setSuggestionsInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1791,8 +1799,8 @@ public Builder setSuggestionsInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1822,8 +1830,8 @@ public Builder mergeSuggestionsInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1845,8 +1853,8 @@ public Builder clearSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1863,8 +1871,8 @@ public Builder clearSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1885,8 +1893,8 @@ public Builder clearSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -2051,8 +2059,8 @@ public Builder setLastSuggestionsImportOperationBytes(com.google.protobuf.ByteSt * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2068,8 +2076,8 @@ public boolean hasDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2091,8 +2099,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getDenylistInpu * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2117,8 +2125,8 @@ public Builder setDenylistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2140,8 +2148,8 @@ public Builder setDenylistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2171,8 +2179,8 @@ public Builder mergeDenylistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2194,8 +2202,8 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2212,8 +2220,8 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2234,8 +2242,8 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2264,7 +2272,7 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2289,7 +2297,7 @@ public java.lang.String getLastDenylistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2314,7 +2322,7 @@ public com.google.protobuf.ByteString getLastDenylistImportOperationBytes() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2338,7 +2346,7 @@ public Builder setLastDenylistImportOperation(java.lang.String value) { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2358,7 +2366,7 @@ public Builder clearLastDenylistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2390,8 +2398,8 @@ public Builder setLastDenylistImportOperationBytes(com.google.protobuf.ByteStrin * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2407,8 +2415,8 @@ public boolean hasAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2430,8 +2438,8 @@ public com.google.cloud.retail.v2alpha.CompletionDataInputConfig getAllowlistInp * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2456,8 +2464,8 @@ public Builder setAllowlistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2479,8 +2487,8 @@ public Builder setAllowlistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2510,8 +2518,8 @@ public Builder mergeAllowlistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2533,8 +2541,8 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2551,8 +2559,8 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2573,8 +2581,8 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2603,7 +2611,7 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2629,7 +2637,7 @@ public java.lang.String getLastAllowlistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2655,7 +2663,7 @@ public com.google.protobuf.ByteString getLastAllowlistImportOperationBytes() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2680,7 +2688,7 @@ public Builder setLastAllowlistImportOperation(java.lang.String value) { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2701,7 +2709,7 @@ public Builder clearLastAllowlistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java index 7c2dee0a..97cef08f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfigOrBuilder.java @@ -95,9 +95,10 @@ public interface CompletionConfigOrBuilder * * *
    -   * The maximum number of autocomplete suggestions returned per term. The
    -   * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -   * or set to 0, then will fallback to default value.
    +   * The maximum number of autocomplete suggestions returned per term. Default
    +   * value is 20. If left unset or set to 0, then will fallback to default
    +   * value.
    +   * Value range is 1 to 20.
        * 
    * * int32 max_suggestions = 3; @@ -113,6 +114,7 @@ public interface CompletionConfigOrBuilder * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -142,8 +144,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -157,8 +159,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -172,8 +174,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -222,8 +224,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -237,8 +239,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -252,8 +254,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -267,7 +269,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -282,7 +284,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -298,8 +300,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -313,8 +315,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -328,8 +330,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -343,7 +345,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -358,7 +360,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java index 1b056ab4..0eb3a721 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java @@ -393,7 +393,7 @@ public com.google.cloud.retail.v2alpha.RuleOrBuilder getRuleOrBuilder() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -417,7 +417,7 @@ public java.lang.String getName() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1819,7 +1819,7 @@ public com.google.cloud.retail.v2alpha.RuleOrBuilder getRuleOrBuilder() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1842,7 +1842,7 @@ public java.lang.String getName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1865,7 +1865,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1887,7 +1887,7 @@ public Builder setName(java.lang.String value) { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1905,7 +1905,7 @@ public Builder clearName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ControlOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ControlOrBuilder.java index 748452df..73dea8b0 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ControlOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ControlOrBuilder.java @@ -104,7 +104,7 @@ public interface ControlOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -117,7 +117,7 @@ public interface ControlOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java index f42a60f1..091beafc 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java @@ -144,7 +144,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -170,7 +170,7 @@ public java.lang.String getParent() { * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -669,7 +669,7 @@ public Builder mergeFrom( * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -694,7 +694,7 @@ public java.lang.String getParent() { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -719,7 +719,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -743,7 +743,7 @@ public Builder setParent(java.lang.String value) { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -763,7 +763,7 @@ public Builder clearParent() { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequestOrBuilder.java index b265ec5e..047fad80 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateControlRequestOrBuilder * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface CreateControlRequestOrBuilder * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java new file mode 100644 index 00000000..f8ae1c64 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Metadata associated with a create operation.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.CreateModelMetadata} + */ +public final class CreateModelMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CreateModelMetadata) + CreateModelMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateModelMetadata.newBuilder() to construct. + private CreateModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateModelMetadata() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateModelMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateModelMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CreateModelMetadata.class, + com.google.cloud.retail.v2alpha.CreateModelMetadata.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
    +   * The resource name of the model that this create applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
    +   * The resource name of the model that this create applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.CreateModelMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CreateModelMetadata other = + (com.google.cloud.retail.v2alpha.CreateModelMetadata) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.CreateModelMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Metadata associated with a create operation.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.CreateModelMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CreateModelMetadata) + com.google.cloud.retail.v2alpha.CreateModelMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CreateModelMetadata.class, + com.google.cloud.retail.v2alpha.CreateModelMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.CreateModelMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CreateModelMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelMetadata build() { + com.google.cloud.retail.v2alpha.CreateModelMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelMetadata buildPartial() { + com.google.cloud.retail.v2alpha.CreateModelMetadata result = + new com.google.cloud.retail.v2alpha.CreateModelMetadata(this); + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.CreateModelMetadata) { + return mergeFrom((com.google.cloud.retail.v2alpha.CreateModelMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateModelMetadata other) { + if (other == com.google.cloud.retail.v2alpha.CreateModelMetadata.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.CreateModelMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.CreateModelMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
    +     * The resource name of the model that this create applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The resource name of the model that this create applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The resource name of the model that this create applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The resource name of the model that this create applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The resource name of the model that this create applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CreateModelMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CreateModelMetadata) + private static final com.google.cloud.retail.v2alpha.CreateModelMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.CreateModelMetadata(); + } + + public static com.google.cloud.retail.v2alpha.CreateModelMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateModelMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateModelMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadataOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadataOrBuilder.java new file mode 100644 index 00000000..6fba60b1 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadataOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface CreateModelMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CreateModelMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The resource name of the model that this create applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
    +   * The resource name of the model that this create applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java new file mode 100644 index 00000000..002ba140 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java @@ -0,0 +1,1036 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request for creating a model.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.CreateModelRequest} + */ +public final class CreateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.CreateModelRequest) + CreateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateModelRequest.newBuilder() to construct. + private CreateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateModelRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.retail.v2alpha.Model.Builder subBuilder = null; + if (model_ != null) { + subBuilder = model_.toBuilder(); + } + model_ = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(model_); + model_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + dryRun_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CreateModelRequest.class, + com.google.cloud.retail.v2alpha.CreateModelRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. The parent resource under which to create the model. Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The parent resource under which to create the model. Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 2; + private com.google.cloud.retail.v2alpha.Model model_; + /** + * + * + *
    +   * Required. The payload of the [Model]  to create.
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
    +   * Required. The payload of the [Model]  to create.
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model getModel() { + return model_ == null ? com.google.cloud.retail.v2alpha.Model.getDefaultInstance() : model_; + } + /** + * + * + *
    +   * Required. The payload of the [Model]  to create.
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + public static final int DRY_RUN_FIELD_NUMBER = 3; + private boolean dryRun_; + /** + * + * + *
    +   * Optional. Whether to run a dry_run to validate the request (without
    +   * actually creating the model).
    +   * 
    + * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dryRun. + */ + @java.lang.Override + public boolean getDryRun() { + return dryRun_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (model_ != null) { + output.writeMessage(2, getModel()); + } + if (dryRun_ != false) { + output.writeBool(3, dryRun_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getModel()); + } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dryRun_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.CreateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.CreateModelRequest other = + (com.google.cloud.retail.v2alpha.CreateModelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (getDryRun() != other.getDryRun()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + hash = (37 * hash) + DRY_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDryRun()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.CreateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request for creating a model.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.CreateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.CreateModelRequest) + com.google.cloud.retail.v2alpha.CreateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.CreateModelRequest.class, + com.google.cloud.retail.v2alpha.CreateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.CreateModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + dryRun_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.CreateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelRequest build() { + com.google.cloud.retail.v2alpha.CreateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelRequest buildPartial() { + com.google.cloud.retail.v2alpha.CreateModelRequest result = + new com.google.cloud.retail.v2alpha.CreateModelRequest(this); + result.parent_ = parent_; + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + result.dryRun_ = dryRun_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.CreateModelRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.CreateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateModelRequest other) { + if (other == com.google.cloud.retail.v2alpha.CreateModelRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasModel()) { + mergeModel(other.getModel()); + } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.CreateModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.CreateModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. The parent resource under which to create the model. Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The parent resource under which to create the model. Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The parent resource under which to create the model. Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The parent resource under which to create the model. Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The parent resource under which to create the model. Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.retail.v2alpha.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + public com.google.cloud.retail.v2alpha.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.retail.v2alpha.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2alpha.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2alpha.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeModel(com.google.cloud.retail.v2alpha.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.retail.v2alpha.Model.newBuilder(model_) + .mergeFrom(value) + .buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.retail.v2alpha.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
    +     * Required. The payload of the [Model]  to create.
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private boolean dryRun_; + /** + * + * + *
    +     * Optional. Whether to run a dry_run to validate the request (without
    +     * actually creating the model).
    +     * 
    + * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dryRun. + */ + @java.lang.Override + public boolean getDryRun() { + return dryRun_; + } + /** + * + * + *
    +     * Optional. Whether to run a dry_run to validate the request (without
    +     * actually creating the model).
    +     * 
    + * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dryRun to set. + * @return This builder for chaining. + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. Whether to run a dry_run to validate the request (without
    +     * actually creating the model).
    +     * 
    + * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.CreateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.CreateModelRequest) + private static final com.google.cloud.retail.v2alpha.CreateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.CreateModelRequest(); + } + + public static com.google.cloud.retail.v2alpha.CreateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.CreateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequestOrBuilder.java new file mode 100644 index 00000000..cedbd678 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface CreateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.CreateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The parent resource under which to create the model. Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. The parent resource under which to create the model. Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Required. The payload of the [Model]  to create.
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + /** + * + * + *
    +   * Required. The payload of the [Model]  to create.
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + com.google.cloud.retail.v2alpha.Model getModel(); + /** + * + * + *
    +   * Required. The payload of the [Model]  to create.
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.ModelOrBuilder getModelOrBuilder(); + + /** + * + * + *
    +   * Optional. Whether to run a dry_run to validate the request (without
    +   * actually creating the model).
    +   * 
    + * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dryRun. + */ + boolean getDryRun(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java index c81ef492..fc88dc07 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [CreateProduct][] method.
    + * Request message for
    + * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.CreateProductRequest} @@ -503,7 +505,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [CreateProduct][] method.
    +   * Request message for
    +   * [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.CreateProductRequest} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java index 827d398c..3b85a1ed 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java @@ -144,7 +144,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -170,7 +170,7 @@ public java.lang.String getParent() { * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -670,7 +670,7 @@ public Builder mergeFrom( * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -695,7 +695,7 @@ public java.lang.String getParent() { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -720,7 +720,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -744,7 +744,7 @@ public Builder setParent(java.lang.String value) { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -764,7 +764,7 @@ public Builder clearParent() { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequestOrBuilder.java index e0c133da..8034987b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateServingConfigRequestOrBuilder * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface CreateServingConfigRequestOrBuilder * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java index e8d95789..810165b5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java @@ -313,11 +313,13 @@ public double getNumbers(int index) { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -325,11 +327,14 @@ public double getNumbers(int index) {
        * is set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return Whether the searchable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasSearchable() { return ((bitField0_ & 0x00000001) != 0); } @@ -337,11 +342,13 @@ public boolean hasSearchable() { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -349,11 +356,14 @@ public boolean hasSearchable() {
        * is set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return The searchable. */ @java.lang.Override + @java.lang.Deprecated public boolean getSearchable() { return searchable_; } @@ -364,11 +374,14 @@ public boolean getSearchable() { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -380,11 +393,14 @@ public boolean getSearchable() {
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return Whether the indexable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasIndexable() { return ((bitField0_ & 0x00000002) != 0); } @@ -392,11 +408,14 @@ public boolean hasIndexable() { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -408,11 +427,14 @@ public boolean hasIndexable() {
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return The indexable. */ @java.lang.Override + @java.lang.Deprecated public boolean getIndexable() { return indexable_; } @@ -1224,11 +1246,13 @@ public Builder clearNumbers() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1236,11 +1260,14 @@ public Builder clearNumbers() {
          * is set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return Whether the searchable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasSearchable() { return ((bitField0_ & 0x00000004) != 0); } @@ -1248,11 +1275,13 @@ public boolean hasSearchable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1260,11 +1289,14 @@ public boolean hasSearchable() {
          * is set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return The searchable. */ @java.lang.Override + @java.lang.Deprecated public boolean getSearchable() { return searchable_; } @@ -1272,11 +1304,13 @@ public boolean getSearchable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1284,11 +1318,14 @@ public boolean getSearchable() {
          * is set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @param value The searchable to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setSearchable(boolean value) { bitField0_ |= 0x00000004; searchable_ = value; @@ -1299,11 +1336,13 @@ public Builder setSearchable(boolean value) { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1311,10 +1350,13 @@ public Builder setSearchable(boolean value) {
          * is set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearSearchable() { bitField0_ = (bitField0_ & ~0x00000004); searchable_ = false; @@ -1327,11 +1369,14 @@ public Builder clearSearchable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1343,11 +1388,14 @@ public Builder clearSearchable() {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return Whether the indexable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasIndexable() { return ((bitField0_ & 0x00000008) != 0); } @@ -1355,11 +1403,14 @@ public boolean hasIndexable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1371,11 +1422,14 @@ public boolean hasIndexable() {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return The indexable. */ @java.lang.Override + @java.lang.Deprecated public boolean getIndexable() { return indexable_; } @@ -1383,11 +1437,14 @@ public boolean getIndexable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1399,11 +1456,14 @@ public boolean getIndexable() {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @param value The indexable to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setIndexable(boolean value) { bitField0_ |= 0x00000008; indexable_ = value; @@ -1414,11 +1474,14 @@ public Builder setIndexable(boolean value) { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -1430,10 +1493,13 @@ public Builder setIndexable(boolean value) {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearIndexable() { bitField0_ = (bitField0_ & ~0x00000008); indexable_ = false; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java index 867a3ca5..27698d0e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttributeOrBuilder.java @@ -152,11 +152,13 @@ public interface CustomAttributeOrBuilder * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -164,20 +166,25 @@ public interface CustomAttributeOrBuilder
        * is set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return Whether the searchable field is set. */ + @java.lang.Deprecated boolean hasSearchable(); /** * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -185,21 +192,27 @@ public interface CustomAttributeOrBuilder
        * is set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=423 * @return The searchable. */ + @java.lang.Deprecated boolean getSearchable(); /** * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -211,20 +224,26 @@ public interface CustomAttributeOrBuilder
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return Whether the indexable field is set. */ + @java.lang.Deprecated boolean hasIndexable(); /** * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2alpha.UserEvent].
    @@ -236,9 +255,12 @@ public interface CustomAttributeOrBuilder
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2alpha/common.proto;l=444 * @return The indexable. */ + @java.lang.Deprecated boolean getIndexable(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java index d7f121c1..a238b1f5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java @@ -120,7 +120,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -146,7 +146,7 @@ public java.lang.String getName() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -492,7 +492,7 @@ public Builder mergeFrom( * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -517,7 +517,7 @@ public java.lang.String getName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -542,7 +542,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -566,7 +566,7 @@ public Builder setName(java.lang.String value) { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -586,7 +586,7 @@ public Builder clearName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequestOrBuilder.java index 6fa17e4a..100edaa6 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface DeleteControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface DeleteControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java new file mode 100644 index 00000000..89bbdef7 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java @@ -0,0 +1,666 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request for deleting a model.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.DeleteModelRequest} + */ +public final class DeleteModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.DeleteModelRequest) + DeleteModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteModelRequest.newBuilder() to construct. + private DeleteModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.DeleteModelRequest.class, + com.google.cloud.retail.v2alpha.DeleteModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The resource name of the [Model] to delete.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The resource name of the [Model] to delete.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.DeleteModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.DeleteModelRequest other = + (com.google.cloud.retail.v2alpha.DeleteModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.DeleteModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request for deleting a model.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.DeleteModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.DeleteModelRequest) + com.google.cloud.retail.v2alpha.DeleteModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.DeleteModelRequest.class, + com.google.cloud.retail.v2alpha.DeleteModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.DeleteModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.DeleteModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.DeleteModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.DeleteModelRequest build() { + com.google.cloud.retail.v2alpha.DeleteModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.DeleteModelRequest buildPartial() { + com.google.cloud.retail.v2alpha.DeleteModelRequest result = + new com.google.cloud.retail.v2alpha.DeleteModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.DeleteModelRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.DeleteModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.DeleteModelRequest other) { + if (other == com.google.cloud.retail.v2alpha.DeleteModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.DeleteModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.DeleteModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The resource name of the [Model] to delete.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The resource name of the [Model] to delete.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The resource name of the [Model] to delete.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The resource name of the [Model] to delete.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The resource name of the [Model] to delete.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.DeleteModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.DeleteModelRequest) + private static final com.google.cloud.retail.v2alpha.DeleteModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.DeleteModelRequest(); + } + + public static com.google.cloud.retail.v2alpha.DeleteModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.DeleteModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequestOrBuilder.java new file mode 100644 index 00000000..02dd694b --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface DeleteModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.DeleteModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The resource name of the [Model] to delete.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The resource name of the [Model] to delete.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java index 965fc8c0..e5d3337d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [DeleteProduct][] method.
    + * Request message for
    + * [ProductService.DeleteProduct][google.cloud.retail.v2alpha.ProductService.DeleteProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.DeleteProductRequest} @@ -363,7 +365,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [DeleteProduct][] method.
    +   * Request message for
    +   * [ProductService.DeleteProduct][google.cloud.retail.v2alpha.ProductService.DeleteProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.DeleteProductRequest} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportConfigProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportConfigProto.java index 0e62ed90..59c3251c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportConfigProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportConfigProto.java @@ -43,6 +43,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2alpha_ExportUserEventsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2alpha_ExportUserEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_OutputResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -61,20 +69,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "B\r\n\013destination\"r\n\016ExportMetadata\022/\n\013cre" + "ate_time\030\001 \001(\0132\032.google.protobuf.Timesta" + "mp\022/\n\013update_time\030\002 \001(\0132\032.google.protobu" - + "f.Timestamp\"\213\001\n\026ExportProductsResponse\022)" + + "f.Timestamp\"\315\001\n\026ExportProductsResponse\022)" + "\n\rerror_samples\030\001 \003(\0132\022.google.rpc.Statu" + "s\022F\n\rerrors_config\030\002 \001(\0132/.google.cloud." - + "retail.v2alpha.ExportErrorsConfig\"\215\001\n\030Ex" - + "portUserEventsResponse\022)\n\rerror_samples\030" - + "\001 \003(\0132\022.google.rpc.Status\022F\n\rerrors_conf" - + "ig\030\002 \001(\0132/.google.cloud.retail.v2alpha.E" - + "xportErrorsConfigB\337\001\n\037com.google.cloud.r" - + "etail.v2alphaB\021ExportConfigProtoP\001ZAgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "retail/v2alpha;retail\242\002\006RETAIL\252\002\033Google." - + "Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\Reta" - + "il\\V2alpha\352\002\036Google::Cloud::Retail::V2al" - + "phab\006proto3" + + "retail.v2alpha.ExportErrorsConfig\022@\n\rout" + + "put_result\030\003 \001(\0132).google.cloud.retail.v" + + "2alpha.OutputResult\"\317\001\n\030ExportUserEvents" + + "Response\022)\n\rerror_samples\030\001 \003(\0132\022.google" + + ".rpc.Status\022F\n\rerrors_config\030\002 \001(\0132/.goo" + + "gle.cloud.retail.v2alpha.ExportErrorsCon" + + "fig\022@\n\routput_result\030\003 \001(\0132).google.clou" + + "d.retail.v2alpha.OutputResult\"Z\n\014OutputR" + + "esult\022J\n\017bigquery_result\030\001 \003(\01321.google." + + "cloud.retail.v2alpha.BigQueryOutputResul" + + "t\"<\n\024BigQueryOutputResult\022\022\n\ndataset_id\030" + + "\001 \001(\t\022\020\n\010table_id\030\002 \001(\tB\337\001\n\037com.google.c" + + "loud.retail.v2alphaB\021ExportConfigProtoP\001" + + "ZAgoogle.golang.org/genproto/googleapis/" + + "cloud/retail/v2alpha;retail\242\002\006RETAIL\252\002\033G" + + "oogle.Cloud.Retail.V2Alpha\312\002\033Google\\Clou" + + "d\\Retail\\V2alpha\352\002\036Google::Cloud::Retail" + + "::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -107,7 +122,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2alpha_ExportProductsResponse_descriptor, new java.lang.String[] { - "ErrorSamples", "ErrorsConfig", + "ErrorSamples", "ErrorsConfig", "OutputResult", }); internal_static_google_cloud_retail_v2alpha_ExportUserEventsResponse_descriptor = getDescriptor().getMessageTypes().get(3); @@ -115,7 +130,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2alpha_ExportUserEventsResponse_descriptor, new java.lang.String[] { - "ErrorSamples", "ErrorsConfig", + "ErrorSamples", "ErrorsConfig", "OutputResult", + }); + internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_retail_v2alpha_OutputResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor, + new java.lang.String[] { + "BigqueryResult", + }); + internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor, + new java.lang.String[] { + "DatasetId", "TableId", }); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java index 40760111..fd13a28f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java @@ -98,6 +98,22 @@ private ExportProductsResponse( errorsConfig_ = subBuilder.buildPartial(); } + break; + } + case 26: + { + com.google.cloud.retail.v2alpha.OutputResult.Builder subBuilder = null; + if (outputResult_ != null) { + subBuilder = outputResult_.toBuilder(); + } + outputResult_ = + input.readMessage( + com.google.cloud.retail.v2alpha.OutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputResult_); + outputResult_ = subBuilder.buildPartial(); + } + break; } default: @@ -213,7 +229,7 @@ public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -228,7 +244,7 @@ public boolean hasErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -245,7 +261,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfig getErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -255,6 +271,54 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConf return getErrorsConfig(); } + public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; + private com.google.cloud.retail.v2alpha.OutputResult outputResult_; + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + @java.lang.Override + public boolean hasOutputResult() { + return outputResult_ != null; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return The outputResult. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResult getOutputResult() { + return outputResult_ == null + ? com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance() + : outputResult_; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResultOrBuilder getOutputResultOrBuilder() { + return getOutputResult(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -275,6 +339,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } + if (outputResult_ != null) { + output.writeMessage(3, getOutputResult()); + } unknownFields.writeTo(output); } @@ -290,6 +357,9 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } + if (outputResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -311,6 +381,10 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } + if (hasOutputResult() != other.hasOutputResult()) return false; + if (hasOutputResult()) { + if (!getOutputResult().equals(other.getOutputResult())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -330,6 +404,10 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } + if (hasOutputResult()) { + hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getOutputResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -492,6 +570,12 @@ public Builder clear() { errorsConfig_ = null; errorsConfigBuilder_ = null; } + if (outputResultBuilder_ == null) { + outputResult_ = null; + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } return this; } @@ -534,6 +618,11 @@ public com.google.cloud.retail.v2alpha.ExportProductsResponse buildPartial() { } else { result.errorsConfig_ = errorsConfigBuilder_.build(); } + if (outputResultBuilder_ == null) { + result.outputResult_ = outputResult_; + } else { + result.outputResult_ = outputResultBuilder_.build(); + } onBuilt(); return result; } @@ -614,6 +703,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ExportProductsResponse if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } + if (other.hasOutputResult()) { + mergeOutputResult(other.getOutputResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -994,7 +1086,7 @@ public java.util.List getErrorSamplesBuilderList( * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1008,7 +1100,7 @@ public boolean hasErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1028,7 +1120,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfig getErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1050,7 +1142,7 @@ public Builder setErrorsConfig(com.google.cloud.retail.v2alpha.ExportErrorsConfi * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1070,7 +1162,7 @@ public Builder setErrorsConfig( * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1096,7 +1188,7 @@ public Builder mergeErrorsConfig(com.google.cloud.retail.v2alpha.ExportErrorsCon * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1116,7 +1208,7 @@ public Builder clearErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1130,7 +1222,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfig.Builder getErrorsConfi * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1148,7 +1240,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConf * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1170,6 +1262,192 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConf return errorsConfigBuilder_; } + private com.google.cloud.retail.v2alpha.OutputResult outputResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.OutputResult, + com.google.cloud.retail.v2alpha.OutputResult.Builder, + com.google.cloud.retail.v2alpha.OutputResultOrBuilder> + outputResultBuilder_; + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + public boolean hasOutputResult() { + return outputResultBuilder_ != null || outputResult_ != null; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return The outputResult. + */ + public com.google.cloud.retail.v2alpha.OutputResult getOutputResult() { + if (outputResultBuilder_ == null) { + return outputResult_ == null + ? com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance() + : outputResult_; + } else { + return outputResultBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder setOutputResult(com.google.cloud.retail.v2alpha.OutputResult value) { + if (outputResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputResult_ = value; + onChanged(); + } else { + outputResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder setOutputResult( + com.google.cloud.retail.v2alpha.OutputResult.Builder builderForValue) { + if (outputResultBuilder_ == null) { + outputResult_ = builderForValue.build(); + onChanged(); + } else { + outputResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder mergeOutputResult(com.google.cloud.retail.v2alpha.OutputResult value) { + if (outputResultBuilder_ == null) { + if (outputResult_ != null) { + outputResult_ = + com.google.cloud.retail.v2alpha.OutputResult.newBuilder(outputResult_) + .mergeFrom(value) + .buildPartial(); + } else { + outputResult_ = value; + } + onChanged(); + } else { + outputResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder clearOutputResult() { + if (outputResultBuilder_ == null) { + outputResult_ = null; + onChanged(); + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2alpha.OutputResult.Builder getOutputResultBuilder() { + + onChanged(); + return getOutputResultFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2alpha.OutputResultOrBuilder getOutputResultOrBuilder() { + if (outputResultBuilder_ != null) { + return outputResultBuilder_.getMessageOrBuilder(); + } else { + return outputResult_ == null + ? com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance() + : outputResult_; + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.OutputResult, + com.google.cloud.retail.v2alpha.OutputResult.Builder, + com.google.cloud.retail.v2alpha.OutputResultOrBuilder> + getOutputResultFieldBuilder() { + if (outputResultBuilder_ == null) { + outputResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.OutputResult, + com.google.cloud.retail.v2alpha.OutputResult.Builder, + com.google.cloud.retail.v2alpha.OutputResultOrBuilder>( + getOutputResult(), getParentForChildren(), isClean()); + outputResult_ = null; + } + return outputResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponseOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponseOrBuilder.java index 7910fb74..649c2579 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponseOrBuilder.java @@ -78,7 +78,7 @@ public interface ExportProductsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -90,7 +90,7 @@ public interface ExportProductsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -102,10 +102,45 @@ public interface ExportProductsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; */ com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConfigOrBuilder(); + + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + boolean hasOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return The outputResult. + */ + com.google.cloud.retail.v2alpha.OutputResult getOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + com.google.cloud.retail.v2alpha.OutputResultOrBuilder getOutputResultOrBuilder(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java index 556f45a5..0fc634f3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java @@ -98,6 +98,22 @@ private ExportUserEventsResponse( errorsConfig_ = subBuilder.buildPartial(); } + break; + } + case 26: + { + com.google.cloud.retail.v2alpha.OutputResult.Builder subBuilder = null; + if (outputResult_ != null) { + subBuilder = outputResult_.toBuilder(); + } + outputResult_ = + input.readMessage( + com.google.cloud.retail.v2alpha.OutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputResult_); + outputResult_ = subBuilder.buildPartial(); + } + break; } default: @@ -213,8 +229,7 @@ public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -229,8 +244,7 @@ public boolean hasErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -247,8 +261,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfig getErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -258,6 +271,54 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConf return getErrorsConfig(); } + public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; + private com.google.cloud.retail.v2alpha.OutputResult outputResult_; + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + @java.lang.Override + public boolean hasOutputResult() { + return outputResult_ != null; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return The outputResult. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResult getOutputResult() { + return outputResult_ == null + ? com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance() + : outputResult_; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResultOrBuilder getOutputResultOrBuilder() { + return getOutputResult(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -278,6 +339,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } + if (outputResult_ != null) { + output.writeMessage(3, getOutputResult()); + } unknownFields.writeTo(output); } @@ -293,6 +357,9 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } + if (outputResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -314,6 +381,10 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } + if (hasOutputResult() != other.hasOutputResult()) return false; + if (hasOutputResult()) { + if (!getOutputResult().equals(other.getOutputResult())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -333,6 +404,10 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } + if (hasOutputResult()) { + hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getOutputResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -495,6 +570,12 @@ public Builder clear() { errorsConfig_ = null; errorsConfigBuilder_ = null; } + if (outputResultBuilder_ == null) { + outputResult_ = null; + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } return this; } @@ -537,6 +618,11 @@ public com.google.cloud.retail.v2alpha.ExportUserEventsResponse buildPartial() { } else { result.errorsConfig_ = errorsConfigBuilder_.build(); } + if (outputResultBuilder_ == null) { + result.outputResult_ = outputResult_; + } else { + result.outputResult_ = outputResultBuilder_.build(); + } onBuilt(); return result; } @@ -617,6 +703,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ExportUserEventsRespons if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } + if (other.hasOutputResult()) { + mergeOutputResult(other.getOutputResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -997,8 +1086,7 @@ public java.util.List getErrorSamplesBuilderList( * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1012,8 +1100,7 @@ public boolean hasErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1033,8 +1120,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfig getErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1056,8 +1142,7 @@ public Builder setErrorsConfig(com.google.cloud.retail.v2alpha.ExportErrorsConfi * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1077,8 +1162,7 @@ public Builder setErrorsConfig( * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1104,8 +1188,7 @@ public Builder mergeErrorsConfig(com.google.cloud.retail.v2alpha.ExportErrorsCon * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1125,8 +1208,7 @@ public Builder clearErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1140,8 +1222,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfig.Builder getErrorsConfi * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1159,8 +1240,7 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConf * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -1182,6 +1262,192 @@ public com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConf return errorsConfigBuilder_; } + private com.google.cloud.retail.v2alpha.OutputResult outputResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.OutputResult, + com.google.cloud.retail.v2alpha.OutputResult.Builder, + com.google.cloud.retail.v2alpha.OutputResultOrBuilder> + outputResultBuilder_; + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + public boolean hasOutputResult() { + return outputResultBuilder_ != null || outputResult_ != null; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return The outputResult. + */ + public com.google.cloud.retail.v2alpha.OutputResult getOutputResult() { + if (outputResultBuilder_ == null) { + return outputResult_ == null + ? com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance() + : outputResult_; + } else { + return outputResultBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder setOutputResult(com.google.cloud.retail.v2alpha.OutputResult value) { + if (outputResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputResult_ = value; + onChanged(); + } else { + outputResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder setOutputResult( + com.google.cloud.retail.v2alpha.OutputResult.Builder builderForValue) { + if (outputResultBuilder_ == null) { + outputResult_ = builderForValue.build(); + onChanged(); + } else { + outputResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder mergeOutputResult(com.google.cloud.retail.v2alpha.OutputResult value) { + if (outputResultBuilder_ == null) { + if (outputResult_ != null) { + outputResult_ = + com.google.cloud.retail.v2alpha.OutputResult.newBuilder(outputResult_) + .mergeFrom(value) + .buildPartial(); + } else { + outputResult_ = value; + } + onChanged(); + } else { + outputResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public Builder clearOutputResult() { + if (outputResultBuilder_ == null) { + outputResult_ = null; + onChanged(); + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2alpha.OutputResult.Builder getOutputResultBuilder() { + + onChanged(); + return getOutputResultFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2alpha.OutputResultOrBuilder getOutputResultOrBuilder() { + if (outputResultBuilder_ != null) { + return outputResultBuilder_.getMessageOrBuilder(); + } else { + return outputResult_ == null + ? com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance() + : outputResult_; + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.OutputResult, + com.google.cloud.retail.v2alpha.OutputResult.Builder, + com.google.cloud.retail.v2alpha.OutputResultOrBuilder> + getOutputResultFieldBuilder() { + if (outputResultBuilder_ == null) { + outputResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.OutputResult, + com.google.cloud.retail.v2alpha.OutputResult.Builder, + com.google.cloud.retail.v2alpha.OutputResultOrBuilder>( + getOutputResult(), getParentForChildren(), isClean()); + outputResult_ = null; + } + return outputResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponseOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponseOrBuilder.java index e66a2db6..cd11e65a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponseOrBuilder.java @@ -78,8 +78,7 @@ public interface ExportUserEventsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -91,8 +90,7 @@ public interface ExportUserEventsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; @@ -104,11 +102,45 @@ public interface ExportUserEventsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2alpha.ExportErrorsConfig errors_config = 2; */ com.google.cloud.retail.v2alpha.ExportErrorsConfigOrBuilder getErrorsConfigOrBuilder(); + + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + boolean hasOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + * + * @return The outputResult. + */ + com.google.cloud.retail.v2alpha.OutputResult getOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2alpha.OutputResult output_result = 3; + */ + com.google.cloud.retail.v2alpha.OutputResultOrBuilder getOutputResultOrBuilder(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java index eeedeb27..7fad3c8c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java @@ -122,7 +122,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -148,7 +148,7 @@ public java.lang.String getName() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -497,7 +497,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -522,7 +522,7 @@ public java.lang.String getName() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -547,7 +547,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -571,7 +571,7 @@ public Builder setName(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -591,7 +591,7 @@ public Builder clearName() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequestOrBuilder.java index 7c6720a6..a9a3915e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetAttributesConfigRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface GetAttributesConfigRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java index 79ec2992..ce81dd0d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java @@ -120,7 +120,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -146,7 +146,7 @@ public java.lang.String getName() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -492,7 +492,7 @@ public Builder mergeFrom( * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -517,7 +517,7 @@ public java.lang.String getName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -542,7 +542,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -566,7 +566,7 @@ public Builder setName(java.lang.String value) { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -586,7 +586,7 @@ public Builder clearName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequestOrBuilder.java index 531f9b34..a4d02d8a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface GetControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java index af949f2b..df6b8a5c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [GetProduct][] method.
    + * Request message for
    + * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.GetProductRequest} @@ -343,7 +345,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [GetProduct][] method.
    +   * Request message for
    +   * [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.GetProductRequest} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportConfigProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportConfigProto.java index 2c5b49e7..4e90fcd0 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportConfigProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportConfigProto.java @@ -120,7 +120,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025UserEventInlineSource\022@\n\013user_events\030\001 " + "\003(\0132&.google.cloud.retail.v2alpha.UserEv" + "entB\003\340A\002\"9\n\022ImportErrorsConfig\022\024\n\ngcs_pr" - + "efix\030\001 \001(\tH\000B\r\n\013destination\"\207\004\n\025ImportPr" + + "efix\030\001 \001(\tH\000B\r\n\013destination\"\257\004\n\025ImportPr" + "oductsRequest\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\n\034r" + "etail.googleapis.com/Branch\022\026\n\nrequest_i" + "d\030\006 \001(\tB\002\030\001\022J\n\014input_config\030\002 \001(\0132/.goog" @@ -131,7 +131,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ieldMask\022b\n\023reconciliation_mode\030\005 \001(\0162E." + "google.cloud.retail.v2alpha.ImportProduc" + "tsRequest.ReconciliationMode\022!\n\031notifica" - + "tion_pubsub_topic\030\007 \001(\t\"T\n\022Reconciliatio" + + "tion_pubsub_topic\030\007 \001(\t\022&\n\036skip_default_" + + "branch_protection\030\010 \001(\010\"T\n\022Reconciliatio" + "nMode\022#\n\037RECONCILIATION_MODE_UNSPECIFIED" + "\020\000\022\017\n\013INCREMENTAL\020\001\022\010\n\004FULL\020\002\"\346\001\n\027Import" + "UserEventsRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A" @@ -259,6 +260,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "ReconciliationMode", "NotificationPubsubTopic", + "SkipDefaultBranchProtection", }); internal_static_google_cloud_retail_v2alpha_ImportUserEventsRequest_descriptor = getDescriptor().getMessageTypes().get(6); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java index 65e03a72..957da541 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java @@ -305,7 +305,7 @@ public long getFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return The requestId. */ @java.lang.Override @@ -331,7 +331,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return The bytes for requestId. */ @java.lang.Override @@ -1314,7 +1314,7 @@ public Builder clearFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return The requestId. */ @java.lang.Deprecated @@ -1339,7 +1339,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1364,7 +1364,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1388,7 +1388,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1408,7 +1408,7 @@ public Builder clearRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @param value The bytes for requestId to set. * @return This builder for chaining. */ diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java index f17db456..9c41fbf5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadataOrBuilder.java @@ -132,7 +132,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return The requestId. */ @java.lang.Deprecated @@ -147,7 +147,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2alpha.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2alpha/import_config.proto;l=341 + * google/cloud/retail/v2alpha/import_config.proto;l=357 * @return The bytes for requestId. */ @java.lang.Deprecated diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java index 4dda3def..39b4b769 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java @@ -150,6 +150,11 @@ private ImportProductsRequest( notificationPubsubTopic_ = s; break; } + case 64: + { + skipDefaultBranchProtection_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -686,11 +691,17 @@ public int getReconciliationModeValue() { * * *
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -716,11 +727,17 @@ public java.lang.String getNotificationPubsubTopic() {
        *
        *
        * 
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -743,6 +760,29 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() {
         }
       }
     
    +  public static final int SKIP_DEFAULT_BRANCH_PROTECTION_FIELD_NUMBER = 8;
    +  private boolean skipDefaultBranchProtection_;
    +  /**
    +   *
    +   *
    +   * 
    +   * If true, will perform the FULL import even if it would delete a large
    +   * proportion of the products in the default branch, which could potentially
    +   * cause outages if you have live predict/search traffic.
    +   * Only supported when
    +   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
    +   * is set to `FULL`.
    +   * 
    + * + * bool skip_default_branch_protection = 8; + * + * @return The skipDefaultBranchProtection. + */ + @java.lang.Override + public boolean getSkipDefaultBranchProtection() { + return skipDefaultBranchProtection_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -781,6 +821,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, notificationPubsubTopic_); } + if (skipDefaultBranchProtection_ != false) { + output.writeBool(8, skipDefaultBranchProtection_); + } unknownFields.writeTo(output); } @@ -814,6 +857,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, notificationPubsubTopic_); } + if (skipDefaultBranchProtection_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(8, skipDefaultBranchProtection_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -846,6 +893,7 @@ public boolean equals(final java.lang.Object obj) { } if (reconciliationMode_ != other.reconciliationMode_) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; + if (getSkipDefaultBranchProtection() != other.getSkipDefaultBranchProtection()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -877,6 +925,8 @@ public int hashCode() { hash = (53 * hash) + reconciliationMode_; hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); + hash = (37 * hash) + SKIP_DEFAULT_BRANCH_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipDefaultBranchProtection()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1049,6 +1099,8 @@ public Builder clear() { notificationPubsubTopic_ = ""; + skipDefaultBranchProtection_ = false; + return this; } @@ -1095,6 +1147,7 @@ public com.google.cloud.retail.v2alpha.ImportProductsRequest buildPartial() { } result.reconciliationMode_ = reconciliationMode_; result.notificationPubsubTopic_ = notificationPubsubTopic_; + result.skipDefaultBranchProtection_ = skipDefaultBranchProtection_; onBuilt(); return result; } @@ -1169,6 +1222,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportProductsRequest o notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } + if (other.getSkipDefaultBranchProtection() != false) { + setSkipDefaultBranchProtection(other.getSkipDefaultBranchProtection()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2154,11 +2210,17 @@ public Builder clearReconciliationMode() { * * *
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2183,11 +2245,17 @@ public java.lang.String getNotificationPubsubTopic() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2212,11 +2280,17 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2240,11 +2314,17 @@ public Builder setNotificationPubsubTopic(java.lang.String value) {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2264,11 +2344,17 @@ public Builder clearNotificationPubsubTopic() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2290,6 +2376,73 @@ public Builder setNotificationPubsubTopicBytes(com.google.protobuf.ByteString va
           return this;
         }
     
    +    private boolean skipDefaultBranchProtection_;
    +    /**
    +     *
    +     *
    +     * 
    +     * If true, will perform the FULL import even if it would delete a large
    +     * proportion of the products in the default branch, which could potentially
    +     * cause outages if you have live predict/search traffic.
    +     * Only supported when
    +     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
    +     * is set to `FULL`.
    +     * 
    + * + * bool skip_default_branch_protection = 8; + * + * @return The skipDefaultBranchProtection. + */ + @java.lang.Override + public boolean getSkipDefaultBranchProtection() { + return skipDefaultBranchProtection_; + } + /** + * + * + *
    +     * If true, will perform the FULL import even if it would delete a large
    +     * proportion of the products in the default branch, which could potentially
    +     * cause outages if you have live predict/search traffic.
    +     * Only supported when
    +     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
    +     * is set to `FULL`.
    +     * 
    + * + * bool skip_default_branch_protection = 8; + * + * @param value The skipDefaultBranchProtection to set. + * @return This builder for chaining. + */ + public Builder setSkipDefaultBranchProtection(boolean value) { + + skipDefaultBranchProtection_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * If true, will perform the FULL import even if it would delete a large
    +     * proportion of the products in the default branch, which could potentially
    +     * cause outages if you have live predict/search traffic.
    +     * Only supported when
    +     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
    +     * is set to `FULL`.
    +     * 
    + * + * bool skip_default_branch_protection = 8; + * + * @return This builder for chaining. + */ + public Builder clearSkipDefaultBranchProtection() { + + skipDefaultBranchProtection_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java index fa523086..33865e56 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequestOrBuilder.java @@ -240,11 +240,17 @@ public interface ImportProductsRequestOrBuilder * * *
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -259,11 +265,17 @@ public interface ImportProductsRequestOrBuilder
        *
        *
        * 
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -274,4 +286,22 @@ public interface ImportProductsRequestOrBuilder
        * @return The bytes for notificationPubsubTopic.
        */
       com.google.protobuf.ByteString getNotificationPubsubTopicBytes();
    +
    +  /**
    +   *
    +   *
    +   * 
    +   * If true, will perform the FULL import even if it would delete a large
    +   * proportion of the products in the default branch, which could potentially
    +   * cause outages if you have live predict/search traffic.
    +   * Only supported when
    +   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode]
    +   * is set to `FULL`.
    +   * 
    + * + * bool skip_default_branch_protection = 8; + * + * @return The skipDefaultBranchProtection. + */ + boolean getSkipDefaultBranchProtection(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java index 7f5a393a..ebd3b007 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java @@ -141,7 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -167,7 +167,7 @@ public java.lang.String getParent() { * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -687,7 +687,7 @@ public Builder mergeFrom( * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -712,7 +712,7 @@ public java.lang.String getParent() { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -737,7 +737,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -761,7 +761,7 @@ public Builder setParent(java.lang.String value) { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -781,7 +781,7 @@ public Builder clearParent() { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequestOrBuilder.java index c0914de8..a83fd0ff 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListControlsRequestOrBuilder * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface ListControlsRequestOrBuilder * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java new file mode 100644 index 00000000..3404d2b6 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java @@ -0,0 +1,946 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request for listing models associated with a resource.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.ListModelsRequest} + */ +public final class ListModelsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ListModelsRequest) + ListModelsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsRequest.newBuilder() to construct. + private ListModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListModelsRequest.class, + com.google.cloud.retail.v2alpha.ListModelsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. The parent for which to list models.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The parent for which to list models.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
    +   * Optional. Maximum number of results to return. If unspecified, defaults
    +   * to 50. Max allowed value is 1000.
    +   * 
    + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
    +   * Optional. A page token, received from a previous `ListModels`
    +   * call. Provide this to retrieve the subsequent page.
    +   * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
    +   * Optional. A page token, received from a previous `ListModels`
    +   * call. Provide this to retrieve the subsequent page.
    +   * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.ListModelsRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ListModelsRequest other = + (com.google.cloud.retail.v2alpha.ListModelsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.ListModelsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request for listing models associated with a resource.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.ListModelsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ListModelsRequest) + com.google.cloud.retail.v2alpha.ListModelsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListModelsRequest.class, + com.google.cloud.retail.v2alpha.ListModelsRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ListModelsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ListModelsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsRequest build() { + com.google.cloud.retail.v2alpha.ListModelsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsRequest buildPartial() { + com.google.cloud.retail.v2alpha.ListModelsRequest result = + new com.google.cloud.retail.v2alpha.ListModelsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ListModelsRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.ListModelsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListModelsRequest other) { + if (other == com.google.cloud.retail.v2alpha.ListModelsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.ListModelsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.ListModelsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. The parent for which to list models.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The parent for which to list models.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The parent for which to list models.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The parent for which to list models.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The parent for which to list models.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
    +     * Optional. Maximum number of results to return. If unspecified, defaults
    +     * to 50. Max allowed value is 1000.
    +     * 
    + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
    +     * Optional. Maximum number of results to return. If unspecified, defaults
    +     * to 50. Max allowed value is 1000.
    +     * 
    + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. Maximum number of results to return. If unspecified, defaults
    +     * to 50. Max allowed value is 1000.
    +     * 
    + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
    +     * Optional. A page token, received from a previous `ListModels`
    +     * call. Provide this to retrieve the subsequent page.
    +     * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Optional. A page token, received from a previous `ListModels`
    +     * call. Provide this to retrieve the subsequent page.
    +     * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Optional. A page token, received from a previous `ListModels`
    +     * call. Provide this to retrieve the subsequent page.
    +     * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A page token, received from a previous `ListModels`
    +     * call. Provide this to retrieve the subsequent page.
    +     * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A page token, received from a previous `ListModels`
    +     * call. Provide this to retrieve the subsequent page.
    +     * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ListModelsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ListModelsRequest) + private static final com.google.cloud.retail.v2alpha.ListModelsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ListModelsRequest(); + } + + public static com.google.cloud.retail.v2alpha.ListModelsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequestOrBuilder.java new file mode 100644 index 00000000..f31fc42d --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface ListModelsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ListModelsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The parent for which to list models.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. The parent for which to list models.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Optional. Maximum number of results to return. If unspecified, defaults
    +   * to 50. Max allowed value is 1000.
    +   * 
    + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
    +   * Optional. A page token, received from a previous `ListModels`
    +   * call. Provide this to retrieve the subsequent page.
    +   * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
    +   * Optional. A page token, received from a previous `ListModels`
    +   * call. Provide this to retrieve the subsequent page.
    +   * 
    + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java new file mode 100644 index 00000000..a979f1ca --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Response to a ListModelRequest.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.ListModelsResponse} + */ +public final class ListModelsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ListModelsResponse) + ListModelsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsResponse.newBuilder() to construct. + private ListModelsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsResponse() { + models_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListModelsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + models_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + models_.add( + input.readMessage( + com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + models_ = java.util.Collections.unmodifiableList(models_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListModelsResponse.class, + com.google.cloud.retail.v2alpha.ListModelsResponse.Builder.class); + } + + public static final int MODELS_FIELD_NUMBER = 1; + private java.util.List models_; + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + @java.lang.Override + public java.util.List getModelsList() { + return models_; + } + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + @java.lang.Override + public java.util.List + getModelsOrBuilderList() { + return models_; + } + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + @java.lang.Override + public int getModelsCount() { + return models_.size(); + } + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model getModels(int index) { + return models_.get(index); + } + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.ModelOrBuilder getModelsOrBuilder(int index) { + return models_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
    +   * Pagination token, if not returned indicates the last page.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
    +   * Pagination token, if not returned indicates the last page.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < models_.size(); i++) { + output.writeMessage(1, models_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < models_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, models_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.ListModelsResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ListModelsResponse other = + (com.google.cloud.retail.v2alpha.ListModelsResponse) obj; + + if (!getModelsList().equals(other.getModelsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getModelsCount() > 0) { + hash = (37 * hash) + MODELS_FIELD_NUMBER; + hash = (53 * hash) + getModelsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.ListModelsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Response to a ListModelRequest.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.ListModelsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ListModelsResponse) + com.google.cloud.retail.v2alpha.ListModelsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ListModelsResponse.class, + com.google.cloud.retail.v2alpha.ListModelsResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ListModelsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelsBuilder_ == null) { + models_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ListModelsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsResponse build() { + com.google.cloud.retail.v2alpha.ListModelsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsResponse buildPartial() { + com.google.cloud.retail.v2alpha.ListModelsResponse result = + new com.google.cloud.retail.v2alpha.ListModelsResponse(this); + int from_bitField0_ = bitField0_; + if (modelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + models_ = java.util.Collections.unmodifiableList(models_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.models_ = models_; + } else { + result.models_ = modelsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ListModelsResponse) { + return mergeFrom((com.google.cloud.retail.v2alpha.ListModelsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListModelsResponse other) { + if (other == com.google.cloud.retail.v2alpha.ListModelsResponse.getDefaultInstance()) + return this; + if (modelsBuilder_ == null) { + if (!other.models_.isEmpty()) { + if (models_.isEmpty()) { + models_ = other.models_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelsIsMutable(); + models_.addAll(other.models_); + } + onChanged(); + } + } else { + if (!other.models_.isEmpty()) { + if (modelsBuilder_.isEmpty()) { + modelsBuilder_.dispose(); + modelsBuilder_ = null; + models_ = other.models_; + bitField0_ = (bitField0_ & ~0x00000001); + modelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelsFieldBuilder() + : null; + } else { + modelsBuilder_.addAllMessages(other.models_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.ListModelsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.ListModelsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List models_ = + java.util.Collections.emptyList(); + + private void ensureModelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + models_ = new java.util.ArrayList(models_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder> + modelsBuilder_; + + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public java.util.List getModelsList() { + if (modelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(models_); + } else { + return modelsBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public int getModelsCount() { + if (modelsBuilder_ == null) { + return models_.size(); + } else { + return modelsBuilder_.getCount(); + } + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public com.google.cloud.retail.v2alpha.Model getModels(int index) { + if (modelsBuilder_ == null) { + return models_.get(index); + } else { + return modelsBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder setModels(int index, com.google.cloud.retail.v2alpha.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.set(index, value); + onChanged(); + } else { + modelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder setModels( + int index, com.google.cloud.retail.v2alpha.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.set(index, builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder addModels(com.google.cloud.retail.v2alpha.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.add(value); + onChanged(); + } else { + modelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder addModels(int index, com.google.cloud.retail.v2alpha.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.add(index, value); + onChanged(); + } else { + modelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder addModels(com.google.cloud.retail.v2alpha.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder addModels( + int index, com.google.cloud.retail.v2alpha.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(index, builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder addAllModels( + java.lang.Iterable values) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, models_); + onChanged(); + } else { + modelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder clearModels() { + if (modelsBuilder_ == null) { + models_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public Builder removeModels(int index) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.remove(index); + onChanged(); + } else { + modelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public com.google.cloud.retail.v2alpha.Model.Builder getModelsBuilder(int index) { + return getModelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public com.google.cloud.retail.v2alpha.ModelOrBuilder getModelsOrBuilder(int index) { + if (modelsBuilder_ == null) { + return models_.get(index); + } else { + return modelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public java.util.List + getModelsOrBuilderList() { + if (modelsBuilder_ != null) { + return modelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(models_); + } + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public com.google.cloud.retail.v2alpha.Model.Builder addModelsBuilder() { + return getModelsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.Model.getDefaultInstance()); + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public com.google.cloud.retail.v2alpha.Model.Builder addModelsBuilder(int index) { + return getModelsFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2alpha.Model.getDefaultInstance()); + } + /** + * + * + *
    +     * List of Models.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + public java.util.List getModelsBuilderList() { + return getModelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder> + getModelsFieldBuilder() { + if (modelsBuilder_ == null) { + modelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder>( + models_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + models_ = null; + } + return modelsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
    +     * Pagination token, if not returned indicates the last page.
    +     * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Pagination token, if not returned indicates the last page.
    +     * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Pagination token, if not returned indicates the last page.
    +     * 
    + * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Pagination token, if not returned indicates the last page.
    +     * 
    + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Pagination token, if not returned indicates the last page.
    +     * 
    + * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ListModelsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ListModelsResponse) + private static final com.google.cloud.retail.v2alpha.ListModelsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ListModelsResponse(); + } + + public static com.google.cloud.retail.v2alpha.ListModelsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListModelsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ListModelsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponseOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponseOrBuilder.java new file mode 100644 index 00000000..a6ed48bc --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface ListModelsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ListModelsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + java.util.List getModelsList(); + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + com.google.cloud.retail.v2alpha.Model getModels(int index); + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + int getModelsCount(); + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + java.util.List getModelsOrBuilderList(); + /** + * + * + *
    +   * List of Models.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.Model models = 1; + */ + com.google.cloud.retail.v2alpha.ModelOrBuilder getModelsOrBuilder(int index); + + /** + * + * + *
    +   * Pagination token, if not returned indicates the last page.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
    +   * Pagination token, if not returned indicates the last page.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java new file mode 100644 index 00000000..df06cf0a --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java @@ -0,0 +1,10572 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Metadata that describes the training and serving parameters of a
    + * [Model][google.cloud.retail.v2alpha.Model]. A
    + * [Model][google.cloud.retail.v2alpha.Model] can be associated with a
    + * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] and then queried
    + * through the Predict api.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model} + */ +public final class Model extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model) + ModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Model.newBuilder() to construct. + private Model(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Model() { + name_ = ""; + displayName_ = ""; + trainingState_ = 0; + servingState_ = 0; + type_ = ""; + optimizationObjective_ = ""; + periodicTuningState_ = 0; + tuningOperation_ = ""; + dataState_ = 0; + filteringOption_ = 0; + servingConfigLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Model(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Model( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + trainingState_ = rawValue; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + servingState_ = rawValue; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + optimizationObjective_ = s; + break; + } + case 88: + { + int rawValue = input.readEnum(); + + periodicTuningState_ = rawValue; + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastTuneTime_ != null) { + subBuilder = lastTuneTime_.toBuilder(); + } + lastTuneTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastTuneTime_); + lastTuneTime_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + tuningOperation_ = s; + break; + } + case 128: + { + int rawValue = input.readEnum(); + + dataState_ = rawValue; + break; + } + case 138: + { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder subBuilder = + null; + if (trainingConfigCase_ == 17) { + subBuilder = + ((com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_) + .toBuilder(); + } + trainingConfig_ = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_); + trainingConfig_ = subBuilder.buildPartial(); + } + trainingConfigCase_ = 17; + break; + } + case 144: + { + int rawValue = input.readEnum(); + + filteringOption_ = rawValue; + break; + } + case 154: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + servingConfigLists_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.Model.ServingConfigList>(); + mutable_bitField0_ |= 0x00000001; + } + servingConfigLists_.add( + input.readMessage( + com.google.cloud.retail.v2alpha.Model.ServingConfigList.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + servingConfigLists_ = java.util.Collections.unmodifiableList(servingConfigLists_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.class, + com.google.cloud.retail.v2alpha.Model.Builder.class); + } + + /** + * + * + *
    +   * The serving state of the model.
    +   * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.Model.ServingState} + */ + public enum ServingState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Unspecified serving state.
    +     * 
    + * + * SERVING_STATE_UNSPECIFIED = 0; + */ + SERVING_STATE_UNSPECIFIED(0), + /** + * + * + *
    +     * The model is not serving.
    +     * 
    + * + * INACTIVE = 1; + */ + INACTIVE(1), + /** + * + * + *
    +     * The model is serving and can be queried.
    +     * 
    + * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
    +     * The model is trained on tuned hyperparameters, and can be
    +     * queried.
    +     * 
    + * + * TUNED = 3; + */ + TUNED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Unspecified serving state.
    +     * 
    + * + * SERVING_STATE_UNSPECIFIED = 0; + */ + public static final int SERVING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * The model is not serving.
    +     * 
    + * + * INACTIVE = 1; + */ + public static final int INACTIVE_VALUE = 1; + /** + * + * + *
    +     * The model is serving and can be queried.
    +     * 
    + * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
    +     * The model is trained on tuned hyperparameters, and can be
    +     * queried.
    +     * 
    + * + * TUNED = 3; + */ + public static final int TUNED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServingState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServingState forNumber(int value) { + switch (value) { + case 0: + return SERVING_STATE_UNSPECIFIED; + case 1: + return INACTIVE; + case 2: + return ACTIVE; + case 3: + return TUNED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ServingState findValueByNumber(int number) { + return ServingState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Model.getDescriptor().getEnumTypes().get(0); + } + + private static final ServingState[] VALUES = values(); + + public static ServingState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServingState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.ServingState) + } + + /** + * + * + *
    +   * The training state of the model.
    +   * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.Model.TrainingState} + */ + public enum TrainingState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Unspecified training state.
    +     * 
    + * + * TRAINING_STATE_UNSPECIFIED = 0; + */ + TRAINING_STATE_UNSPECIFIED(0), + /** + * + * + *
    +     * The model training is paused.
    +     * 
    + * + * PAUSED = 1; + */ + PAUSED(1), + /** + * + * + *
    +     * The model is training.
    +     * 
    + * + * TRAINING = 2; + */ + TRAINING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Unspecified training state.
    +     * 
    + * + * TRAINING_STATE_UNSPECIFIED = 0; + */ + public static final int TRAINING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * The model training is paused.
    +     * 
    + * + * PAUSED = 1; + */ + public static final int PAUSED_VALUE = 1; + /** + * + * + *
    +     * The model is training.
    +     * 
    + * + * TRAINING = 2; + */ + public static final int TRAINING_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TrainingState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TrainingState forNumber(int value) { + switch (value) { + case 0: + return TRAINING_STATE_UNSPECIFIED; + case 1: + return PAUSED; + case 2: + return TRAINING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TrainingState findValueByNumber(int number) { + return TrainingState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Model.getDescriptor().getEnumTypes().get(1); + } + + private static final TrainingState[] VALUES = values(); + + public static TrainingState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TrainingState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.TrainingState) + } + + /** + * + * + *
    +   * Describes whether periodic tuning is enabled for this model
    +   * or not. Periodic tuning is scheduled at most every three months. You can
    +   * start a tuning process manually by using the ModelTune
    +   * method, which starts a tuning process immediately and resets the quarterly
    +   * schedule. Enabling or disabling periodic tuning does not affect any
    +   * current tuning processes.
    +   * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.Model.PeriodicTuningState} + */ + public enum PeriodicTuningState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Unspecified default value - should never be explicitly set.
    +     * 
    + * + * PERIODIC_TUNING_STATE_UNSPECIFIED = 0; + */ + PERIODIC_TUNING_STATE_UNSPECIFIED(0), + /** + * + * + *
    +     * The model has periodic tuning disabled. Tuning
    +     * can be reenabled by calling the EnableModelPeriodicTuning
    +     * method or by calling the TuneModel method.
    +     * 
    + * + * PERIODIC_TUNING_DISABLED = 1; + */ + PERIODIC_TUNING_DISABLED(1), + /** + * + * + *
    +     * The model cannot be tuned with periodic tuning OR the
    +     * TuneModel method. Hide the options in customer UI and
    +     * reject any requests through the backend self serve API.
    +     * 
    + * + * ALL_TUNING_DISABLED = 3; + */ + ALL_TUNING_DISABLED(3), + /** + * + * + *
    +     * The model has periodic tuning enabled. Tuning
    +     * can be disabled by calling the DisableModelPeriodicTuning
    +     * method.
    +     * 
    + * + * PERIODIC_TUNING_ENABLED = 2; + */ + PERIODIC_TUNING_ENABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Unspecified default value - should never be explicitly set.
    +     * 
    + * + * PERIODIC_TUNING_STATE_UNSPECIFIED = 0; + */ + public static final int PERIODIC_TUNING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * The model has periodic tuning disabled. Tuning
    +     * can be reenabled by calling the EnableModelPeriodicTuning
    +     * method or by calling the TuneModel method.
    +     * 
    + * + * PERIODIC_TUNING_DISABLED = 1; + */ + public static final int PERIODIC_TUNING_DISABLED_VALUE = 1; + /** + * + * + *
    +     * The model cannot be tuned with periodic tuning OR the
    +     * TuneModel method. Hide the options in customer UI and
    +     * reject any requests through the backend self serve API.
    +     * 
    + * + * ALL_TUNING_DISABLED = 3; + */ + public static final int ALL_TUNING_DISABLED_VALUE = 3; + /** + * + * + *
    +     * The model has periodic tuning enabled. Tuning
    +     * can be disabled by calling the DisableModelPeriodicTuning
    +     * method.
    +     * 
    + * + * PERIODIC_TUNING_ENABLED = 2; + */ + public static final int PERIODIC_TUNING_ENABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PeriodicTuningState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PeriodicTuningState forNumber(int value) { + switch (value) { + case 0: + return PERIODIC_TUNING_STATE_UNSPECIFIED; + case 1: + return PERIODIC_TUNING_DISABLED; + case 3: + return ALL_TUNING_DISABLED; + case 2: + return PERIODIC_TUNING_ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PeriodicTuningState findValueByNumber(int number) { + return PeriodicTuningState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Model.getDescriptor().getEnumTypes().get(2); + } + + private static final PeriodicTuningState[] VALUES = values(); + + public static PeriodicTuningState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PeriodicTuningState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.PeriodicTuningState) + } + + /** + * + * + *
    +   * Describes whether this model have sufficient training data
    +   * to be continuously trained.
    +   * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.Model.DataState} + */ + public enum DataState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Unspecified default value - should never be explicitly set.
    +     * 
    + * + * DATA_STATE_UNSPECIFIED = 0; + */ + DATA_STATE_UNSPECIFIED(0), + /** + * + * + *
    +     * The model has sufficient training data.
    +     * 
    + * + * DATA_OK = 1; + */ + DATA_OK(1), + /** + * + * + *
    +     * The model does not have sufficient training data. Error
    +     * messages can be queried via Stackdriver.
    +     * 
    + * + * DATA_ERROR = 2; + */ + DATA_ERROR(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Unspecified default value - should never be explicitly set.
    +     * 
    + * + * DATA_STATE_UNSPECIFIED = 0; + */ + public static final int DATA_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * The model has sufficient training data.
    +     * 
    + * + * DATA_OK = 1; + */ + public static final int DATA_OK_VALUE = 1; + /** + * + * + *
    +     * The model does not have sufficient training data. Error
    +     * messages can be queried via Stackdriver.
    +     * 
    + * + * DATA_ERROR = 2; + */ + public static final int DATA_ERROR_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataState forNumber(int value) { + switch (value) { + case 0: + return DATA_STATE_UNSPECIFIED; + case 1: + return DATA_OK; + case 2: + return DATA_ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataState findValueByNumber(int number) { + return DataState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Model.getDescriptor().getEnumTypes().get(3); + } + + private static final DataState[] VALUES = values(); + + public static DataState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.DataState) + } + + public interface PageOptimizationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +     * this page optimization is shown for.
    +     * Each page has an associated event type - this will be the
    +     * corresponding event type for the page that the page optimization
    +     * model is used on.
    +     * Supported types:
    +     * * `add-to-cart`: Products being added to cart.
    +     * * `detail-page-view`: Products detail page viewed.
    +     * * `home-page-view`: Homepage viewed
    +     * * `category-page-view`: Homepage viewed
    +     * * `shopping-cart-page-view`: User viewing a shopping cart.
    +     * `home-page-view` only allows models with type `recommended-for-you`.
    +     * All other page_optimization_event_type allow all
    +     * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +     * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pageOptimizationEventType. + */ + java.lang.String getPageOptimizationEventType(); + /** + * + * + *
    +     * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +     * this page optimization is shown for.
    +     * Each page has an associated event type - this will be the
    +     * corresponding event type for the page that the page optimization
    +     * model is used on.
    +     * Supported types:
    +     * * `add-to-cart`: Products being added to cart.
    +     * * `detail-page-view`: Products detail page viewed.
    +     * * `home-page-view`: Homepage viewed
    +     * * `category-page-view`: Homepage viewed
    +     * * `shopping-cart-page-view`: User viewing a shopping cart.
    +     * `home-page-view` only allows models with type `recommended-for-you`.
    +     * All other page_optimization_event_type allow all
    +     * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +     * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for pageOptimizationEventType. + */ + com.google.protobuf.ByteString getPageOptimizationEventTypeBytes(); + + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getPanelsList(); + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel getPanels(int index); + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getPanelsCount(); + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder> + getPanelsOrBuilderList(); + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder getPanelsOrBuilder( + int index); + + /** + * + * + *
    +     * Optional. How to restrict results across panels e.g. can the same
    +     * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +     * multiple panels at once.
    +     * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for restriction. + */ + int getRestrictionValue(); + /** + * + * + *
    +     * Optional. How to restrict results across panels e.g. can the same
    +     * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +     * multiple panels at once.
    +     * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The restriction. + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction getRestriction(); + } + /** + * + * + *
    +   * The PageOptimizationConfig for model training.
    +   * This determines how many panels to optimize for, and which serving
    +   * configurations to consider for each panel.
    +   * The purpose of this model is to optimize which
    +   * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to show on which
    +   * panels in way that optimizes the visitors shopping journey.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig} + */ + public static final class PageOptimizationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + PageOptimizationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PageOptimizationConfig.newBuilder() to construct. + private PageOptimizationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PageOptimizationConfig() { + pageOptimizationEventType_ = ""; + panels_ = java.util.Collections.emptyList(); + restriction_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PageOptimizationConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PageOptimizationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageOptimizationEventType_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + panels_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel>(); + mutable_bitField0_ |= 0x00000001; + } + panels_.add( + input.readMessage( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.parser(), + extensionRegistry)); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + restriction_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + panels_ = java.util.Collections.unmodifiableList(panels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.class, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder.class); + } + + /** + * + * + *
    +     * Restrictions of expected returned results.
    +     * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction} + */ + public enum Restriction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Unspecified value for restriction.
    +       * 
    + * + * RESTRICTION_UNSPECIFIED = 0; + */ + RESTRICTION_UNSPECIFIED(0), + /** + * + * + *
    +       * Allow any [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to
    +       * be show on any number of panels.
    +       * Example:
    +       * `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * `Panel2 candidates`: home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity,
    +       *  pdp_cvr_no_diversity
    +       * `Restriction` = NO_RESTRICTION
    +       * `Valid combinations`:
    +       *   * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       *   * (pdp_ctr, home_page_ctr_diversity)
    +       *   * (pdp_ctr, pdp_cvr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_diversity)
    +       *   * (pdp_cvr, pdp_cvr_no_diversity)
    +       *   * (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    +       *   * (home_page_ctr_no_diversity, home_page_ctr_diversity)
    +       *   * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`: []
    +       * 
    + * + * NO_RESTRICTION = 1; + */ + NO_RESTRICTION(1), + /** + * + * + *
    +       * Do not allow the same
    +       * [ServingConfig.name][google.cloud.retail.v2alpha.ServingConfig.name] to
    +       * be shown on multiple panels.
    +       * Example:
    +       * `Panel1 candidates`: <i> pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * </i>
    +       * `Panel2 candidates`: <i> home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity_low,
    +       *    pdp_cvr_no_diversity </i>
    +       * `Restriction` = UNIQUE_SERVING_CONFIG_RESTRICTION
    +       * `Valid combinations`:
    +       *   * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       *   * (pdp_ctr, home_page_ctr_diversity_low)
    +       *   * (pdp_ctr, pdp_cvr_no_diversity)
    +       *   * (pdp_ctr, pdp_cvr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_diversity_low)
    +       *   * (pdp_cvr, pdp_cvr_no_diversity)
    +       *   * (home_page_ctr_no_diversity, home_page_ctr_diversity_low)
    +       *   * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`:
    +       *  * <i> (home_page_ctr_no_diversity, home_page_ctr_no_diversity) </i>
    +       * 
    + * + * UNIQUE_SERVING_CONFIG_RESTRICTION = 2; + */ + UNIQUE_SERVING_CONFIG_RESTRICTION(2), + /** + * + * + *
    +       * Do not allow multiple
    +       * [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] with same
    +       * [Model.name][google.cloud.retail.v2alpha.Model.name] to be show on on
    +       * different panels.
    +       * Example:
    +       * `Panel1 candidates`: <i> pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * </i>
    +       * `Panel2 candidates`: <i> home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity_low,
    +       *  pdp_cvr_no_diversity </i>
    +       * `Restriction` = UNIQUE_MODEL_RESTRICTION
    +       * `Valid combinations`:
    +       *  * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       *  * (pdp_ctr, home_page_ctr_diversity)
    +       *  * (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_cvr, home_page_ctr_no_diversity)
    +       *  * (pdp_cvr, home_page_ctr_diversity_low)
    +       *  * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`:
    +       *  *  <i> (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    +       *  * (pdp_cvr, pdp_cvr_no_diversity) </i>
    +       * 
    + * + * UNIQUE_MODEL_RESTRICTION = 3; + */ + UNIQUE_MODEL_RESTRICTION(3), + /** + * + * + *
    +       * Do not allow multiple
    +       * [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] with same
    +       * [Model.type][google.cloud.retail.v2alpha.Model.type] to be shown on
    +       * different panels.
    +       * Example:
    +       * `Panel1 candidates`: <i> pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * </i>
    +       * `Panel2 candidates`: <i> home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity_low,
    +       *  pdp_cvr_no_diversity </i>
    +       * `Restriction` = UNIQUE_MODEL_RESTRICTION
    +       * `Valid combinations`:
    +       * * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       * * (pdp_ctr, home_page_ctr_diversity)
    +       * * (pdp_cvr, home_page_ctr_no_diversity)
    +       * *   (pdp_cvr, home_page_ctr_diversity_low)
    +       * * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`:
    +       *  *  <i> (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_cvr, pdp_cvr_no_diversity)
    +       *  * (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    +       *  *  (home_page_ctr_no_diversity, home_page_ctr_diversity) </i>
    +       * 
    + * + * UNIQUE_MODEL_TYPE_RESTRICTION = 4; + */ + UNIQUE_MODEL_TYPE_RESTRICTION(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +       * Unspecified value for restriction.
    +       * 
    + * + * RESTRICTION_UNSPECIFIED = 0; + */ + public static final int RESTRICTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +       * Allow any [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to
    +       * be show on any number of panels.
    +       * Example:
    +       * `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * `Panel2 candidates`: home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity,
    +       *  pdp_cvr_no_diversity
    +       * `Restriction` = NO_RESTRICTION
    +       * `Valid combinations`:
    +       *   * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       *   * (pdp_ctr, home_page_ctr_diversity)
    +       *   * (pdp_ctr, pdp_cvr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_diversity)
    +       *   * (pdp_cvr, pdp_cvr_no_diversity)
    +       *   * (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    +       *   * (home_page_ctr_no_diversity, home_page_ctr_diversity)
    +       *   * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`: []
    +       * 
    + * + * NO_RESTRICTION = 1; + */ + public static final int NO_RESTRICTION_VALUE = 1; + /** + * + * + *
    +       * Do not allow the same
    +       * [ServingConfig.name][google.cloud.retail.v2alpha.ServingConfig.name] to
    +       * be shown on multiple panels.
    +       * Example:
    +       * `Panel1 candidates`: <i> pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * </i>
    +       * `Panel2 candidates`: <i> home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity_low,
    +       *    pdp_cvr_no_diversity </i>
    +       * `Restriction` = UNIQUE_SERVING_CONFIG_RESTRICTION
    +       * `Valid combinations`:
    +       *   * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       *   * (pdp_ctr, home_page_ctr_diversity_low)
    +       *   * (pdp_ctr, pdp_cvr_no_diversity)
    +       *   * (pdp_ctr, pdp_cvr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_no_diversity)
    +       *   * (pdp_cvr, home_page_ctr_diversity_low)
    +       *   * (pdp_cvr, pdp_cvr_no_diversity)
    +       *   * (home_page_ctr_no_diversity, home_page_ctr_diversity_low)
    +       *   * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`:
    +       *  * <i> (home_page_ctr_no_diversity, home_page_ctr_no_diversity) </i>
    +       * 
    + * + * UNIQUE_SERVING_CONFIG_RESTRICTION = 2; + */ + public static final int UNIQUE_SERVING_CONFIG_RESTRICTION_VALUE = 2; + /** + * + * + *
    +       * Do not allow multiple
    +       * [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] with same
    +       * [Model.name][google.cloud.retail.v2alpha.Model.name] to be show on on
    +       * different panels.
    +       * Example:
    +       * `Panel1 candidates`: <i> pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * </i>
    +       * `Panel2 candidates`: <i> home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity_low,
    +       *  pdp_cvr_no_diversity </i>
    +       * `Restriction` = UNIQUE_MODEL_RESTRICTION
    +       * `Valid combinations`:
    +       *  * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       *  * (pdp_ctr, home_page_ctr_diversity)
    +       *  * (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_cvr, home_page_ctr_no_diversity)
    +       *  * (pdp_cvr, home_page_ctr_diversity_low)
    +       *  * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`:
    +       *  *  <i> (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    +       *  * (pdp_cvr, pdp_cvr_no_diversity) </i>
    +       * 
    + * + * UNIQUE_MODEL_RESTRICTION = 3; + */ + public static final int UNIQUE_MODEL_RESTRICTION_VALUE = 3; + /** + * + * + *
    +       * Do not allow multiple
    +       * [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] with same
    +       * [Model.type][google.cloud.retail.v2alpha.Model.type] to be shown on
    +       * different panels.
    +       * Example:
    +       * `Panel1 candidates`: <i> pdp_ctr, pdp_cvr, home_page_ctr_no_diversity
    +       * </i>
    +       * `Panel2 candidates`: <i> home_page_ctr_no_diversity,
    +       * home_page_ctr_diversity_low,
    +       *  pdp_cvr_no_diversity </i>
    +       * `Restriction` = UNIQUE_MODEL_RESTRICTION
    +       * `Valid combinations`:
    +       * * <i> (pdp_ctr, home_page_ctr_no_diversity)
    +       * * (pdp_ctr, home_page_ctr_diversity)
    +       * * (pdp_cvr, home_page_ctr_no_diversity)
    +       * *   (pdp_cvr, home_page_ctr_diversity_low)
    +       * * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) </i>
    +       * `Invalid combinations`:
    +       *  *  <i> (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_ctr, pdp_cvr_no_diversity)
    +       *  * (pdp_cvr, pdp_cvr_no_diversity)
    +       *  * (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
    +       *  *  (home_page_ctr_no_diversity, home_page_ctr_diversity) </i>
    +       * 
    + * + * UNIQUE_MODEL_TYPE_RESTRICTION = 4; + */ + public static final int UNIQUE_MODEL_TYPE_RESTRICTION_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Restriction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Restriction forNumber(int value) { + switch (value) { + case 0: + return RESTRICTION_UNSPECIFIED; + case 1: + return NO_RESTRICTION; + case 2: + return UNIQUE_SERVING_CONFIG_RESTRICTION; + case 3: + return UNIQUE_MODEL_RESTRICTION; + case 4: + return UNIQUE_MODEL_TYPE_RESTRICTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Restriction findValueByNumber(int number) { + return Restriction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Restriction[] VALUES = values(); + + public static Restriction valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Restriction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction) + } + + public interface CandidateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * This has to be a valid
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +       * identifier. e.g. for a ServingConfig with full name:
    +       * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +       * this would be 'my_candidate_config'
    +       * 
    + * + * string serving_config_id = 1; + * + * @return Whether the servingConfigId field is set. + */ + boolean hasServingConfigId(); + /** + * + * + *
    +       * This has to be a valid
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +       * identifier. e.g. for a ServingConfig with full name:
    +       * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +       * this would be 'my_candidate_config'
    +       * 
    + * + * string serving_config_id = 1; + * + * @return The servingConfigId. + */ + java.lang.String getServingConfigId(); + /** + * + * + *
    +       * This has to be a valid
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +       * identifier. e.g. for a ServingConfig with full name:
    +       * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +       * this would be 'my_candidate_config'
    +       * 
    + * + * string serving_config_id = 1; + * + * @return The bytes for servingConfigId. + */ + com.google.protobuf.ByteString getServingConfigIdBytes(); + + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.CandidateCase + getCandidateCase(); + } + /** + * + * + *
    +     * A candidate to consider for a given panel. Currently only
    +     * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] are valid
    +     * candidates.
    +     * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate} + */ + public static final class Candidate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) + CandidateOrBuilder { + private static final long serialVersionUID = 0L; + // Use Candidate.newBuilder() to construct. + private Candidate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Candidate() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Candidate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Candidate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + candidateCase_ = 1; + candidate_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.class, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + .class); + } + + private int candidateCase_ = 0; + private java.lang.Object candidate_; + + public enum CandidateCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SERVING_CONFIG_ID(1), + CANDIDATE_NOT_SET(0); + private final int value; + + private CandidateCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CandidateCase valueOf(int value) { + return forNumber(value); + } + + public static CandidateCase forNumber(int value) { + switch (value) { + case 1: + return SERVING_CONFIG_ID; + case 0: + return CANDIDATE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CandidateCase getCandidateCase() { + return CandidateCase.forNumber(candidateCase_); + } + + public static final int SERVING_CONFIG_ID_FIELD_NUMBER = 1; + /** + * + * + *
    +       * This has to be a valid
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +       * identifier. e.g. for a ServingConfig with full name:
    +       * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +       * this would be 'my_candidate_config'
    +       * 
    + * + * string serving_config_id = 1; + * + * @return Whether the servingConfigId field is set. + */ + public boolean hasServingConfigId() { + return candidateCase_ == 1; + } + /** + * + * + *
    +       * This has to be a valid
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +       * identifier. e.g. for a ServingConfig with full name:
    +       * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +       * this would be 'my_candidate_config'
    +       * 
    + * + * string serving_config_id = 1; + * + * @return The servingConfigId. + */ + public java.lang.String getServingConfigId() { + java.lang.Object ref = ""; + if (candidateCase_ == 1) { + ref = candidate_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (candidateCase_ == 1) { + candidate_ = s; + } + return s; + } + } + /** + * + * + *
    +       * This has to be a valid
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +       * identifier. e.g. for a ServingConfig with full name:
    +       * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +       * this would be 'my_candidate_config'
    +       * 
    + * + * string serving_config_id = 1; + * + * @return The bytes for servingConfigId. + */ + public com.google.protobuf.ByteString getServingConfigIdBytes() { + java.lang.Object ref = ""; + if (candidateCase_ == 1) { + ref = candidate_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (candidateCase_ == 1) { + candidate_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (candidateCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, candidate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (candidateCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, candidate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate other = + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) obj; + + if (!getCandidateCase().equals(other.getCandidateCase())) return false; + switch (candidateCase_) { + case 1: + if (!getServingConfigId().equals(other.getServingConfigId())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (candidateCase_) { + case 1: + hash = (37 * hash) + SERVING_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigId().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +       * A candidate to consider for a given panel. Currently only
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] are valid
    +       * candidates.
    +       * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.class, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + .class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + candidateCase_ = 0; + candidate_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate build() { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + buildPartial() { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate result = + new com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate(this); + if (candidateCase_ == 1) { + result.candidate_ = candidate_; + } + result.candidateCase_ = candidateCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate other) { + if (other + == com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance()) return this; + switch (other.getCandidateCase()) { + case SERVING_CONFIG_ID: + { + candidateCase_ = 1; + candidate_ = other.candidate_; + onChanged(); + break; + } + case CANDIDATE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int candidateCase_ = 0; + private java.lang.Object candidate_; + + public CandidateCase getCandidateCase() { + return CandidateCase.forNumber(candidateCase_); + } + + public Builder clearCandidate() { + candidateCase_ = 0; + candidate_ = null; + onChanged(); + return this; + } + + /** + * + * + *
    +         * This has to be a valid
    +         * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +         * identifier. e.g. for a ServingConfig with full name:
    +         * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +         * this would be 'my_candidate_config'
    +         * 
    + * + * string serving_config_id = 1; + * + * @return Whether the servingConfigId field is set. + */ + @java.lang.Override + public boolean hasServingConfigId() { + return candidateCase_ == 1; + } + /** + * + * + *
    +         * This has to be a valid
    +         * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +         * identifier. e.g. for a ServingConfig with full name:
    +         * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +         * this would be 'my_candidate_config'
    +         * 
    + * + * string serving_config_id = 1; + * + * @return The servingConfigId. + */ + @java.lang.Override + public java.lang.String getServingConfigId() { + java.lang.Object ref = ""; + if (candidateCase_ == 1) { + ref = candidate_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (candidateCase_ == 1) { + candidate_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +         * This has to be a valid
    +         * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +         * identifier. e.g. for a ServingConfig with full name:
    +         * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +         * this would be 'my_candidate_config'
    +         * 
    + * + * string serving_config_id = 1; + * + * @return The bytes for servingConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServingConfigIdBytes() { + java.lang.Object ref = ""; + if (candidateCase_ == 1) { + ref = candidate_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (candidateCase_ == 1) { + candidate_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +         * This has to be a valid
    +         * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +         * identifier. e.g. for a ServingConfig with full name:
    +         * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +         * this would be 'my_candidate_config'
    +         * 
    + * + * string serving_config_id = 1; + * + * @param value The servingConfigId to set. + * @return This builder for chaining. + */ + public Builder setServingConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + candidateCase_ = 1; + candidate_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * This has to be a valid
    +         * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +         * identifier. e.g. for a ServingConfig with full name:
    +         * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +         * this would be 'my_candidate_config'
    +         * 
    + * + * string serving_config_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearServingConfigId() { + if (candidateCase_ == 1) { + candidateCase_ = 0; + candidate_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
    +         * This has to be a valid
    +         * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]
    +         * identifier. e.g. for a ServingConfig with full name:
    +         * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`
    +         * this would be 'my_candidate_config'
    +         * 
    + * + * string serving_config_id = 1; + * + * @param value The bytes for servingConfigId to set. + * @return This builder for chaining. + */ + public Builder setServingConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + candidateCase_ = 1; + candidate_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) + private static final com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate(); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Candidate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Candidate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PanelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * Optional. The name to display for the panel.
    +       * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
    +       * Optional. The name to display for the panel.
    +       * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getCandidatesList(); + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate getCandidates( + int index); + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getCandidatesCount(); + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + getCandidatesOrBuilderList(); + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder + getCandidatesOrBuilder(int index); + + /** + * + * + *
    +       * Required. The default candidate (in case the model fails at serving
    +       * time, we can fall back to the default).
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultCandidate field is set. + */ + boolean hasDefaultCandidate(); + /** + * + * + *
    +       * Required. The default candidate (in case the model fails at serving
    +       * time, we can fall back to the default).
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultCandidate. + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate getDefaultCandidate(); + /** + * + * + *
    +       * Required. The default candidate (in case the model fails at serving
    +       * time, we can fall back to the default).
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder + getDefaultCandidateOrBuilder(); + } + /** + * + * + *
    +     * An individual panel with a list of
    +     * [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] to consider
    +     * for it.
    +     * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel} + */ + public static final class Panel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) + PanelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Panel.newBuilder() to construct. + private Panel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Panel() { + displayName_ = ""; + candidates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Panel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Panel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + candidates_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + .Candidate>(); + mutable_bitField0_ |= 0x00000001; + } + candidates_.add( + input.readMessage( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + subBuilder = null; + if (defaultCandidate_ != null) { + subBuilder = defaultCandidate_.toBuilder(); + } + defaultCandidate_ = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultCandidate_); + defaultCandidate_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + candidates_ = java.util.Collections.unmodifiableList(candidates_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.class, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
    +       * Optional. The name to display for the panel.
    +       * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
    +       * Optional. The name to display for the panel.
    +       * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CANDIDATES_FIELD_NUMBER = 2; + private java.util.List + candidates_; + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getCandidatesList() { + return candidates_; + } + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + getCandidatesOrBuilderList() { + return candidates_; + } + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getCandidatesCount() { + return candidates_.size(); + } + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate getCandidates( + int index) { + return candidates_.get(index); + } + /** + * + * + *
    +       * Required. The candidates to consider on the panel.
    +       * Limit = 10.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder + getCandidatesOrBuilder(int index) { + return candidates_.get(index); + } + + public static final int DEFAULT_CANDIDATE_FIELD_NUMBER = 3; + private com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + defaultCandidate_; + /** + * + * + *
    +       * Required. The default candidate (in case the model fails at serving
    +       * time, we can fall back to the default).
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultCandidate field is set. + */ + @java.lang.Override + public boolean hasDefaultCandidate() { + return defaultCandidate_ != null; + } + /** + * + * + *
    +       * Required. The default candidate (in case the model fails at serving
    +       * time, we can fall back to the default).
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultCandidate. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + getDefaultCandidate() { + return defaultCandidate_ == null + ? com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance() + : defaultCandidate_; + } + /** + * + * + *
    +       * Required. The default candidate (in case the model fails at serving
    +       * time, we can fall back to the default).
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder + getDefaultCandidateOrBuilder() { + return getDefaultCandidate(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + for (int i = 0; i < candidates_.size(); i++) { + output.writeMessage(2, candidates_.get(i)); + } + if (defaultCandidate_ != null) { + output.writeMessage(3, getDefaultCandidate()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + for (int i = 0; i < candidates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, candidates_.get(i)); + } + if (defaultCandidate_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDefaultCandidate()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel other = + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getCandidatesList().equals(other.getCandidatesList())) return false; + if (hasDefaultCandidate() != other.hasDefaultCandidate()) return false; + if (hasDefaultCandidate()) { + if (!getDefaultCandidate().equals(other.getDefaultCandidate())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getCandidatesCount() > 0) { + hash = (37 * hash) + CANDIDATES_FIELD_NUMBER; + hash = (53 * hash) + getCandidatesList().hashCode(); + } + if (hasDefaultCandidate()) { + hash = (37 * hash) + DEFAULT_CANDIDATE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultCandidate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +       * An individual panel with a list of
    +       * [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] to consider
    +       * for it.
    +       * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.class, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCandidatesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + if (candidatesBuilder_ == null) { + candidates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + candidatesBuilder_.clear(); + } + if (defaultCandidateBuilder_ == null) { + defaultCandidate_ = null; + } else { + defaultCandidate_ = null; + defaultCandidateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel build() { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel buildPartial() { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel result = + new com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + if (candidatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + candidates_ = java.util.Collections.unmodifiableList(candidates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.candidates_ = candidates_; + } else { + result.candidates_ = candidatesBuilder_.build(); + } + if (defaultCandidateBuilder_ == null) { + result.defaultCandidate_ = defaultCandidate_; + } else { + result.defaultCandidate_ = defaultCandidateBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel other) { + if (other + == com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + .getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (candidatesBuilder_ == null) { + if (!other.candidates_.isEmpty()) { + if (candidates_.isEmpty()) { + candidates_ = other.candidates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCandidatesIsMutable(); + candidates_.addAll(other.candidates_); + } + onChanged(); + } + } else { + if (!other.candidates_.isEmpty()) { + if (candidatesBuilder_.isEmpty()) { + candidatesBuilder_.dispose(); + candidatesBuilder_ = null; + candidates_ = other.candidates_; + bitField0_ = (bitField0_ & ~0x00000001); + candidatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCandidatesFieldBuilder() + : null; + } else { + candidatesBuilder_.addAllMessages(other.candidates_); + } + } + } + if (other.hasDefaultCandidate()) { + mergeDefaultCandidate(other.getDefaultCandidate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
    +         * Optional. The name to display for the panel.
    +         * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +         * Optional. The name to display for the panel.
    +         * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +         * Optional. The name to display for the panel.
    +         * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * Optional. The name to display for the panel.
    +         * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +         * Optional. The name to display for the panel.
    +         * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate> + candidates_ = java.util.Collections.emptyList(); + + private void ensureCandidatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + candidates_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate>( + candidates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + candidatesBuilder_; + + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate> + getCandidatesList() { + if (candidatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(candidates_); + } else { + return candidatesBuilder_.getMessageList(); + } + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getCandidatesCount() { + if (candidatesBuilder_ == null) { + return candidates_.size(); + } else { + return candidatesBuilder_.getCount(); + } + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate getCandidates( + int index) { + if (candidatesBuilder_ == null) { + return candidates_.get(index); + } else { + return candidatesBuilder_.getMessage(index); + } + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCandidates( + int index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate value) { + if (candidatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCandidatesIsMutable(); + candidates_.set(index, value); + onChanged(); + } else { + candidatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCandidates( + int index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + builderForValue) { + if (candidatesBuilder_ == null) { + ensureCandidatesIsMutable(); + candidates_.set(index, builderForValue.build()); + onChanged(); + } else { + candidatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCandidates( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate value) { + if (candidatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCandidatesIsMutable(); + candidates_.add(value); + onChanged(); + } else { + candidatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCandidates( + int index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate value) { + if (candidatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCandidatesIsMutable(); + candidates_.add(index, value); + onChanged(); + } else { + candidatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCandidates( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + builderForValue) { + if (candidatesBuilder_ == null) { + ensureCandidatesIsMutable(); + candidates_.add(builderForValue.build()); + onChanged(); + } else { + candidatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCandidates( + int index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + builderForValue) { + if (candidatesBuilder_ == null) { + ensureCandidatesIsMutable(); + candidates_.add(index, builderForValue.build()); + onChanged(); + } else { + candidatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllCandidates( + java.lang.Iterable< + ? extends + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate> + values) { + if (candidatesBuilder_ == null) { + ensureCandidatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, candidates_); + onChanged(); + } else { + candidatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCandidates() { + if (candidatesBuilder_ == null) { + candidates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + candidatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeCandidates(int index) { + if (candidatesBuilder_ == null) { + ensureCandidatesIsMutable(); + candidates_.remove(index); + onChanged(); + } else { + candidatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + getCandidatesBuilder(int index) { + return getCandidatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder + getCandidatesOrBuilder(int index) { + if (candidatesBuilder_ == null) { + return candidates_.get(index); + } else { + return candidatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + getCandidatesOrBuilderList() { + if (candidatesBuilder_ != null) { + return candidatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(candidates_); + } + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + addCandidatesBuilder() { + return getCandidatesFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance()); + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + addCandidatesBuilder(int index) { + return getCandidatesFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance()); + } + /** + * + * + *
    +         * Required. The candidates to consider on the panel.
    +         * Limit = 10.
    +         * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate candidates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder> + getCandidatesBuilderList() { + return getCandidatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + getCandidatesFieldBuilder() { + if (candidatesBuilder_ == null) { + candidatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + .CandidateOrBuilder>( + candidates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + candidates_ = null; + } + return candidatesBuilder_; + } + + private com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + defaultCandidate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + defaultCandidateBuilder_; + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultCandidate field is set. + */ + public boolean hasDefaultCandidate() { + return defaultCandidateBuilder_ != null || defaultCandidate_ != null; + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultCandidate. + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + getDefaultCandidate() { + if (defaultCandidateBuilder_ == null) { + return defaultCandidate_ == null + ? com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance() + : defaultCandidate_; + } else { + return defaultCandidateBuilder_.getMessage(); + } + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDefaultCandidate( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate value) { + if (defaultCandidateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultCandidate_ = value; + onChanged(); + } else { + defaultCandidateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDefaultCandidate( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + builderForValue) { + if (defaultCandidateBuilder_ == null) { + defaultCandidate_ = builderForValue.build(); + onChanged(); + } else { + defaultCandidateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDefaultCandidate( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate value) { + if (defaultCandidateBuilder_ == null) { + if (defaultCandidate_ != null) { + defaultCandidate_ = + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.newBuilder( + defaultCandidate_) + .mergeFrom(value) + .buildPartial(); + } else { + defaultCandidate_ = value; + } + onChanged(); + } else { + defaultCandidateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDefaultCandidate() { + if (defaultCandidateBuilder_ == null) { + defaultCandidate_ = null; + onChanged(); + } else { + defaultCandidate_ = null; + defaultCandidateBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder + getDefaultCandidateBuilder() { + + onChanged(); + return getDefaultCandidateFieldBuilder().getBuilder(); + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder + getDefaultCandidateOrBuilder() { + if (defaultCandidateBuilder_ != null) { + return defaultCandidateBuilder_.getMessageOrBuilder(); + } else { + return defaultCandidate_ == null + ? com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .getDefaultInstance() + : defaultCandidate_; + } + } + /** + * + * + *
    +         * Required. The default candidate (in case the model fails at serving
    +         * time, we can fall back to the default).
    +         * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate default_candidate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.CandidateOrBuilder> + getDefaultCandidateFieldBuilder() { + if (defaultCandidateBuilder_ == null) { + defaultCandidateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + .CandidateOrBuilder>( + getDefaultCandidate(), getParentForChildren(), isClean()); + defaultCandidate_ = null; + } + return defaultCandidateBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) + private static final com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel(); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Panel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Panel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PAGE_OPTIMIZATION_EVENT_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object pageOptimizationEventType_; + /** + * + * + *
    +     * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +     * this page optimization is shown for.
    +     * Each page has an associated event type - this will be the
    +     * corresponding event type for the page that the page optimization
    +     * model is used on.
    +     * Supported types:
    +     * * `add-to-cart`: Products being added to cart.
    +     * * `detail-page-view`: Products detail page viewed.
    +     * * `home-page-view`: Homepage viewed
    +     * * `category-page-view`: Homepage viewed
    +     * * `shopping-cart-page-view`: User viewing a shopping cart.
    +     * `home-page-view` only allows models with type `recommended-for-you`.
    +     * All other page_optimization_event_type allow all
    +     * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +     * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pageOptimizationEventType. + */ + @java.lang.Override + public java.lang.String getPageOptimizationEventType() { + java.lang.Object ref = pageOptimizationEventType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageOptimizationEventType_ = s; + return s; + } + } + /** + * + * + *
    +     * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +     * this page optimization is shown for.
    +     * Each page has an associated event type - this will be the
    +     * corresponding event type for the page that the page optimization
    +     * model is used on.
    +     * Supported types:
    +     * * `add-to-cart`: Products being added to cart.
    +     * * `detail-page-view`: Products detail page viewed.
    +     * * `home-page-view`: Homepage viewed
    +     * * `category-page-view`: Homepage viewed
    +     * * `shopping-cart-page-view`: User viewing a shopping cart.
    +     * `home-page-view` only allows models with type `recommended-for-you`.
    +     * All other page_optimization_event_type allow all
    +     * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +     * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for pageOptimizationEventType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageOptimizationEventTypeBytes() { + java.lang.Object ref = pageOptimizationEventType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageOptimizationEventType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PANELS_FIELD_NUMBER = 2; + private java.util.List + panels_; + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getPanelsList() { + return panels_; + } + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder> + getPanelsOrBuilderList() { + return panels_; + } + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getPanelsCount() { + return panels_.size(); + } + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel getPanels(int index) { + return panels_.get(index); + } + /** + * + * + *
    +     * Required. A list of panel configurations.
    +     * Limit = 5.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder + getPanelsOrBuilder(int index) { + return panels_.get(index); + } + + public static final int RESTRICTION_FIELD_NUMBER = 3; + private int restriction_; + /** + * + * + *
    +     * Optional. How to restrict results across panels e.g. can the same
    +     * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +     * multiple panels at once.
    +     * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for restriction. + */ + @java.lang.Override + public int getRestrictionValue() { + return restriction_; + } + /** + * + * + *
    +     * Optional. How to restrict results across panels e.g. can the same
    +     * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +     * multiple panels at once.
    +     * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The restriction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction + getRestriction() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction result = + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction.valueOf( + restriction_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageOptimizationEventType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pageOptimizationEventType_); + } + for (int i = 0; i < panels_.size(); i++) { + output.writeMessage(2, panels_.get(i)); + } + if (restriction_ + != com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction + .RESTRICTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, restriction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageOptimizationEventType_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pageOptimizationEventType_); + } + for (int i = 0; i < panels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, panels_.get(i)); + } + if (restriction_ + != com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction + .RESTRICTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, restriction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig other = + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) obj; + + if (!getPageOptimizationEventType().equals(other.getPageOptimizationEventType())) + return false; + if (!getPanelsList().equals(other.getPanelsList())) return false; + if (restriction_ != other.restriction_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_OPTIMIZATION_EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPageOptimizationEventType().hashCode(); + if (getPanelsCount() > 0) { + hash = (37 * hash) + PANELS_FIELD_NUMBER; + hash = (53 * hash) + getPanelsList().hashCode(); + } + hash = (37 * hash) + RESTRICTION_FIELD_NUMBER; + hash = (53 * hash) + restriction_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +     * The PageOptimizationConfig for model training.
    +     * This determines how many panels to optimize for, and which serving
    +     * configurations to consider for each panel.
    +     * The purpose of this model is to optimize which
    +     * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to show on which
    +     * panels in way that optimizes the visitors shopping journey.
    +     * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.PageOptimizationConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.class, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPanelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + pageOptimizationEventType_ = ""; + + if (panelsBuilder_ == null) { + panels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + panelsBuilder_.clear(); + } + restriction_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig build() { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig buildPartial() { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig result = + new com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig(this); + int from_bitField0_ = bitField0_; + result.pageOptimizationEventType_ = pageOptimizationEventType_; + if (panelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + panels_ = java.util.Collections.unmodifiableList(panels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.panels_ = panels_; + } else { + result.panels_ = panelsBuilder_.build(); + } + result.restriction_ = restriction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) { + return mergeFrom((com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig other) { + if (other + == com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance()) + return this; + if (!other.getPageOptimizationEventType().isEmpty()) { + pageOptimizationEventType_ = other.pageOptimizationEventType_; + onChanged(); + } + if (panelsBuilder_ == null) { + if (!other.panels_.isEmpty()) { + if (panels_.isEmpty()) { + panels_ = other.panels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePanelsIsMutable(); + panels_.addAll(other.panels_); + } + onChanged(); + } + } else { + if (!other.panels_.isEmpty()) { + if (panelsBuilder_.isEmpty()) { + panelsBuilder_.dispose(); + panelsBuilder_ = null; + panels_ = other.panels_; + bitField0_ = (bitField0_ & ~0x00000001); + panelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPanelsFieldBuilder() + : null; + } else { + panelsBuilder_.addAllMessages(other.panels_); + } + } + } + if (other.restriction_ != 0) { + setRestrictionValue(other.getRestrictionValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object pageOptimizationEventType_ = ""; + /** + * + * + *
    +       * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +       * this page optimization is shown for.
    +       * Each page has an associated event type - this will be the
    +       * corresponding event type for the page that the page optimization
    +       * model is used on.
    +       * Supported types:
    +       * * `add-to-cart`: Products being added to cart.
    +       * * `detail-page-view`: Products detail page viewed.
    +       * * `home-page-view`: Homepage viewed
    +       * * `category-page-view`: Homepage viewed
    +       * * `shopping-cart-page-view`: User viewing a shopping cart.
    +       * `home-page-view` only allows models with type `recommended-for-you`.
    +       * All other page_optimization_event_type allow all
    +       * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +       * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pageOptimizationEventType. + */ + public java.lang.String getPageOptimizationEventType() { + java.lang.Object ref = pageOptimizationEventType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageOptimizationEventType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +       * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +       * this page optimization is shown for.
    +       * Each page has an associated event type - this will be the
    +       * corresponding event type for the page that the page optimization
    +       * model is used on.
    +       * Supported types:
    +       * * `add-to-cart`: Products being added to cart.
    +       * * `detail-page-view`: Products detail page viewed.
    +       * * `home-page-view`: Homepage viewed
    +       * * `category-page-view`: Homepage viewed
    +       * * `shopping-cart-page-view`: User viewing a shopping cart.
    +       * `home-page-view` only allows models with type `recommended-for-you`.
    +       * All other page_optimization_event_type allow all
    +       * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +       * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for pageOptimizationEventType. + */ + public com.google.protobuf.ByteString getPageOptimizationEventTypeBytes() { + java.lang.Object ref = pageOptimizationEventType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageOptimizationEventType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +       * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +       * this page optimization is shown for.
    +       * Each page has an associated event type - this will be the
    +       * corresponding event type for the page that the page optimization
    +       * model is used on.
    +       * Supported types:
    +       * * `add-to-cart`: Products being added to cart.
    +       * * `detail-page-view`: Products detail page viewed.
    +       * * `home-page-view`: Homepage viewed
    +       * * `category-page-view`: Homepage viewed
    +       * * `shopping-cart-page-view`: User viewing a shopping cart.
    +       * `home-page-view` only allows models with type `recommended-for-you`.
    +       * All other page_optimization_event_type allow all
    +       * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +       * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The pageOptimizationEventType to set. + * @return This builder for chaining. + */ + public Builder setPageOptimizationEventType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageOptimizationEventType_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +       * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +       * this page optimization is shown for.
    +       * Each page has an associated event type - this will be the
    +       * corresponding event type for the page that the page optimization
    +       * model is used on.
    +       * Supported types:
    +       * * `add-to-cart`: Products being added to cart.
    +       * * `detail-page-view`: Products detail page viewed.
    +       * * `home-page-view`: Homepage viewed
    +       * * `category-page-view`: Homepage viewed
    +       * * `shopping-cart-page-view`: User viewing a shopping cart.
    +       * `home-page-view` only allows models with type `recommended-for-you`.
    +       * All other page_optimization_event_type allow all
    +       * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +       * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPageOptimizationEventType() { + + pageOptimizationEventType_ = getDefaultInstance().getPageOptimizationEventType(); + onChanged(); + return this; + } + /** + * + * + *
    +       * Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent]
    +       * this page optimization is shown for.
    +       * Each page has an associated event type - this will be the
    +       * corresponding event type for the page that the page optimization
    +       * model is used on.
    +       * Supported types:
    +       * * `add-to-cart`: Products being added to cart.
    +       * * `detail-page-view`: Products detail page viewed.
    +       * * `home-page-view`: Homepage viewed
    +       * * `category-page-view`: Homepage viewed
    +       * * `shopping-cart-page-view`: User viewing a shopping cart.
    +       * `home-page-view` only allows models with type `recommended-for-you`.
    +       * All other page_optimization_event_type allow all
    +       * [Model.types][google.cloud.retail.v2alpha.Model.type].
    +       * 
    + * + * string page_optimization_event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for pageOptimizationEventType to set. + * @return This builder for chaining. + */ + public Builder setPageOptimizationEventTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageOptimizationEventType_ = value; + onChanged(); + return this; + } + + private java.util.List + panels_ = java.util.Collections.emptyList(); + + private void ensurePanelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + panels_ = + new java.util.ArrayList< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel>(panels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder> + panelsBuilder_; + + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getPanelsList() { + if (panelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(panels_); + } else { + return panelsBuilder_.getMessageList(); + } + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getPanelsCount() { + if (panelsBuilder_ == null) { + return panels_.size(); + } else { + return panelsBuilder_.getCount(); + } + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel getPanels( + int index) { + if (panelsBuilder_ == null) { + return panels_.get(index); + } else { + return panelsBuilder_.getMessage(index); + } + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPanels( + int index, com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel value) { + if (panelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePanelsIsMutable(); + panels_.set(index, value); + onChanged(); + } else { + panelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPanels( + int index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder + builderForValue) { + if (panelsBuilder_ == null) { + ensurePanelsIsMutable(); + panels_.set(index, builderForValue.build()); + onChanged(); + } else { + panelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPanels( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel value) { + if (panelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePanelsIsMutable(); + panels_.add(value); + onChanged(); + } else { + panelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPanels( + int index, com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel value) { + if (panelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePanelsIsMutable(); + panels_.add(index, value); + onChanged(); + } else { + panelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPanels( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder + builderForValue) { + if (panelsBuilder_ == null) { + ensurePanelsIsMutable(); + panels_.add(builderForValue.build()); + onChanged(); + } else { + panelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPanels( + int index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder + builderForValue) { + if (panelsBuilder_ == null) { + ensurePanelsIsMutable(); + panels_.add(index, builderForValue.build()); + onChanged(); + } else { + panelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllPanels( + java.lang.Iterable< + ? extends com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel> + values) { + if (panelsBuilder_ == null) { + ensurePanelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, panels_); + onChanged(); + } else { + panelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPanels() { + if (panelsBuilder_ == null) { + panels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + panelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removePanels(int index) { + if (panelsBuilder_ == null) { + ensurePanelsIsMutable(); + panels_.remove(index); + onChanged(); + } else { + panelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder + getPanelsBuilder(int index) { + return getPanelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder + getPanelsOrBuilder(int index) { + if (panelsBuilder_ == null) { + return panels_.get(index); + } else { + return panelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder> + getPanelsOrBuilderList() { + if (panelsBuilder_ != null) { + return panelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(panels_); + } + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder + addPanelsBuilder() { + return getPanelsFieldBuilder() + .addBuilder( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + .getDefaultInstance()); + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder + addPanelsBuilder(int index) { + return getPanelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + .getDefaultInstance()); + } + /** + * + * + *
    +       * Required. A list of panel configurations.
    +       * Limit = 5.
    +       * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel panels = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder> + getPanelsBuilderList() { + return getPanelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder> + getPanelsFieldBuilder() { + if (panelsBuilder_ == null) { + panelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.PanelOrBuilder>( + panels_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + panels_ = null; + } + return panelsBuilder_; + } + + private int restriction_ = 0; + /** + * + * + *
    +       * Optional. How to restrict results across panels e.g. can the same
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +       * multiple panels at once.
    +       * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for restriction. + */ + @java.lang.Override + public int getRestrictionValue() { + return restriction_; + } + /** + * + * + *
    +       * Optional. How to restrict results across panels e.g. can the same
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +       * multiple panels at once.
    +       * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for restriction to set. + * @return This builder for chaining. + */ + public Builder setRestrictionValue(int value) { + + restriction_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. How to restrict results across panels e.g. can the same
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +       * multiple panels at once.
    +       * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The restriction. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction + getRestriction() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction result = + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction.valueOf( + restriction_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction.UNRECOGNIZED + : result; + } + /** + * + * + *
    +       * Optional. How to restrict results across panels e.g. can the same
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +       * multiple panels at once.
    +       * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The restriction to set. + * @return This builder for chaining. + */ + public Builder setRestriction( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction value) { + if (value == null) { + throw new NullPointerException(); + } + + restriction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. How to restrict results across panels e.g. can the same
    +       * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on
    +       * multiple panels at once.
    +       * If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.
    +       * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Restriction restriction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRestriction() { + + restriction_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + private static final com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig(); + } + + public static com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PageOptimizationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PageOptimizationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServingConfigListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model.ServingConfigList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the servingConfigIds. + */ + java.util.List getServingConfigIdsList(); + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of servingConfigIds. + */ + int getServingConfigIdsCount(); + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The servingConfigIds at the given index. + */ + java.lang.String getServingConfigIds(int index); + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the servingConfigIds at the given index. + */ + com.google.protobuf.ByteString getServingConfigIdsBytes(int index); + } + /** + * + * + *
    +   * Represents an ordered combination of valid serving configs, which
    +   * / may be used for PAGE_OPTIMIZATION recommendations.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.ServingConfigList} + */ + public static final class ServingConfigList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.Model.ServingConfigList) + ServingConfigListOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServingConfigList.newBuilder() to construct. + private ServingConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServingConfigList() { + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServingConfigList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ServingConfigList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + servingConfigIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + servingConfigIds_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + servingConfigIds_ = servingConfigIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.ServingConfigList.class, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder.class); + } + + public static final int SERVING_CONFIG_IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList servingConfigIds_; + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the servingConfigIds. + */ + public com.google.protobuf.ProtocolStringList getServingConfigIdsList() { + return servingConfigIds_; + } + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of servingConfigIds. + */ + public int getServingConfigIdsCount() { + return servingConfigIds_.size(); + } + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The servingConfigIds at the given index. + */ + public java.lang.String getServingConfigIds(int index) { + return servingConfigIds_.get(index); + } + /** + * + * + *
    +     * Optional. A set of valid serving configs that may be used for
    +     * PAGE_OPTIMIZATION.
    +     * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the servingConfigIds at the given index. + */ + public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { + return servingConfigIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < servingConfigIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, servingConfigIds_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < servingConfigIds_.size(); i++) { + dataSize += computeStringSizeNoTag(servingConfigIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getServingConfigIdsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.Model.ServingConfigList)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model.ServingConfigList other = + (com.google.cloud.retail.v2alpha.Model.ServingConfigList) obj; + + if (!getServingConfigIdsList().equals(other.getServingConfigIdsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServingConfigIdsCount() > 0) { + hash = (37 * hash) + SERVING_CONFIG_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2alpha.Model.ServingConfigList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +     * Represents an ordered combination of valid serving configs, which
    +     * / may be used for PAGE_OPTIMIZATION recommendations.
    +     * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model.ServingConfigList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model.ServingConfigList) + com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.ServingConfigList.class, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Model.ServingConfigList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingConfigList getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.ServingConfigList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingConfigList build() { + com.google.cloud.retail.v2alpha.Model.ServingConfigList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingConfigList buildPartial() { + com.google.cloud.retail.v2alpha.Model.ServingConfigList result = + new com.google.cloud.retail.v2alpha.Model.ServingConfigList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + servingConfigIds_ = servingConfigIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.servingConfigIds_ = servingConfigIds_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Model.ServingConfigList) { + return mergeFrom((com.google.cloud.retail.v2alpha.Model.ServingConfigList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model.ServingConfigList other) { + if (other == com.google.cloud.retail.v2alpha.Model.ServingConfigList.getDefaultInstance()) + return this; + if (!other.servingConfigIds_.isEmpty()) { + if (servingConfigIds_.isEmpty()) { + servingConfigIds_ = other.servingConfigIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServingConfigIdsIsMutable(); + servingConfigIds_.addAll(other.servingConfigIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.Model.ServingConfigList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.Model.ServingConfigList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList servingConfigIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServingConfigIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + servingConfigIds_ = new com.google.protobuf.LazyStringArrayList(servingConfigIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the servingConfigIds. + */ + public com.google.protobuf.ProtocolStringList getServingConfigIdsList() { + return servingConfigIds_.getUnmodifiableView(); + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of servingConfigIds. + */ + public int getServingConfigIdsCount() { + return servingConfigIds_.size(); + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The servingConfigIds at the given index. + */ + public java.lang.String getServingConfigIds(int index) { + return servingConfigIds_.get(index); + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the servingConfigIds at the given index. + */ + public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { + return servingConfigIds_.getByteString(index); + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The servingConfigIds to set. + * @return This builder for chaining. + */ + public Builder setServingConfigIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addAllServingConfigIds(java.lang.Iterable values) { + ensureServingConfigIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfigIds() { + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
    +       * Optional. A set of valid serving configs that may be used for
    +       * PAGE_OPTIMIZATION.
    +       * 
    + * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model.ServingConfigList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model.ServingConfigList) + private static final com.google.cloud.retail.v2alpha.Model.ServingConfigList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Model.ServingConfigList(); + } + + public static com.google.cloud.retail.v2alpha.Model.ServingConfigList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServingConfigList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ServingConfigList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingConfigList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int trainingConfigCase_ = 0; + private java.lang.Object trainingConfig_; + + public enum TrainingConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PAGE_OPTIMIZATION_CONFIG(17), + TRAININGCONFIG_NOT_SET(0); + private final int value; + + private TrainingConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TrainingConfigCase valueOf(int value) { + return forNumber(value); + } + + public static TrainingConfigCase forNumber(int value) { + switch (value) { + case 17: + return PAGE_OPTIMIZATION_CONFIG; + case 0: + return TRAININGCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TrainingConfigCase getTrainingConfigCase() { + return TrainingConfigCase.forNumber(trainingConfigCase_); + } + + public static final int PAGE_OPTIMIZATION_CONFIG_FIELD_NUMBER = 17; + /** + * + * + *
    +   * Optional. The page optimization config.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageOptimizationConfig field is set. + */ + @java.lang.Override + public boolean hasPageOptimizationConfig() { + return trainingConfigCase_ == 17; + } + /** + * + * + *
    +   * Optional. The page optimization config.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageOptimizationConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig getPageOptimizationConfig() { + if (trainingConfigCase_ == 17) { + return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + /** + * + * + *
    +   * Optional. The page optimization config.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder + getPageOptimizationConfigOrBuilder() { + if (trainingConfigCase_ == 17) { + return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The fully qualified resource name of the model.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * catalog_id has char limit of 50.
    +   * recommendation_model_id has char limit of 40.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The fully qualified resource name of the model.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * catalog_id has char limit of 50.
    +   * recommendation_model_id has char limit of 40.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
    +   * Required. The display name of the model.
    +   * Should be human readable, used to display Recommendation Models in the
    +   * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +   * characters.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The display name of the model.
    +   * Should be human readable, used to display Recommendation Models in the
    +   * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +   * characters.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAINING_STATE_FIELD_NUMBER = 3; + private int trainingState_; + /** + * + * + *
    +   * Optional. The training state that the model is in (e.g.
    +   * TRAINING or PAUSED).
    +   * Since part of the cost of running the service
    +   * is frequency of training - this can be used to determine when to train
    +   * model in order to control cost. If not specified: the default value for
    +   * CreateModel method is TRAINING. the default value for
    +   * UpdateModel method is to keep the state the same as before.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + @java.lang.Override + public int getTrainingStateValue() { + return trainingState_; + } + /** + * + * + *
    +   * Optional. The training state that the model is in (e.g.
    +   * TRAINING or PAUSED).
    +   * Since part of the cost of running the service
    +   * is frequency of training - this can be used to determine when to train
    +   * model in order to control cost. If not specified: the default value for
    +   * CreateModel method is TRAINING. the default value for
    +   * UpdateModel method is to keep the state the same as before.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trainingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.TrainingState getTrainingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.TrainingState result = + com.google.cloud.retail.v2alpha.Model.TrainingState.valueOf(trainingState_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.TrainingState.UNRECOGNIZED + : result; + } + + public static final int SERVING_STATE_FIELD_NUMBER = 4; + private int servingState_; + /** + * + * + *
    +   * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for servingState. + */ + @java.lang.Override + public int getServingStateValue() { + return servingState_; + } + /** + * + * + *
    +   * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The servingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingState getServingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.ServingState result = + com.google.cloud.retail.v2alpha.Model.ServingState.valueOf(servingState_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.ServingState.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was created at.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was created at.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was created at.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +   * if a Recommendation Model was paused - this would be the time the pause was
    +   * initiated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +   * if a Recommendation Model was paused - this would be the time the pause was
    +   * initiated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +   * if a Recommendation Model was paused - this would be the time the pause was
    +   * initiated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int TYPE_FIELD_NUMBER = 7; + private volatile java.lang.Object type_; + /** + * + * + *
    +   * Required. The type of model e.g. `home-page`.
    +   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +   * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +   * 'buy-it-again', `recently-viewed`(readonly value).
    +   * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The type of model e.g. `home-page`.
    +   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +   * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +   * 'buy-it-again', `recently-viewed`(readonly value).
    +   * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIMIZATION_OBJECTIVE_FIELD_NUMBER = 8; + private volatile java.lang.Object optimizationObjective_; + /** + * + * + *
    +   * Optional. The optimization objective e.g. `cvr`.
    +   * Currently supported
    +   * values: `ctr`, `cvr`, `revenue-per-order`.
    +   *  If not specified, we choose default based on model type.
    +   * Default depends on type of recommendation:
    +   * `recommended-for-you` => `ctr`
    +   * `others-you-may-like` => `ctr`
    +   * `frequently-bought-together` => `revenue_per_order`
    +   * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optimizationObjective. + */ + @java.lang.Override + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } + } + /** + * + * + *
    +   * Optional. The optimization objective e.g. `cvr`.
    +   * Currently supported
    +   * values: `ctr`, `cvr`, `revenue-per-order`.
    +   *  If not specified, we choose default based on model type.
    +   * Default depends on type of recommendation:
    +   * `recommended-for-you` => `ctr`
    +   * `others-you-may-like` => `ctr`
    +   * `frequently-bought-together` => `revenue_per_order`
    +   * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for optimizationObjective. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERIODIC_TUNING_STATE_FIELD_NUMBER = 11; + private int periodicTuningState_; + /** + * + * + *
    +   * Optional. The state of periodic tuning.
    +   * The period we use is 3 months - to do a
    +   * one-off tune earlier use the TuneModel method. Default value
    +   * is PERIODIC_TUNING_ENABLED.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for periodicTuningState. + */ + @java.lang.Override + public int getPeriodicTuningStateValue() { + return periodicTuningState_; + } + /** + * + * + *
    +   * Optional. The state of periodic tuning.
    +   * The period we use is 3 months - to do a
    +   * one-off tune earlier use the TuneModel method. Default value
    +   * is PERIODIC_TUNING_ENABLED.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The periodicTuningState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PeriodicTuningState getPeriodicTuningState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.PeriodicTuningState result = + com.google.cloud.retail.v2alpha.Model.PeriodicTuningState.valueOf(periodicTuningState_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.PeriodicTuningState.UNRECOGNIZED + : result; + } + + public static final int LAST_TUNE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp lastTuneTime_; + /** + * + * + *
    +   * Output only. The timestamp when the latest successful tune finished.
    +   * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTuneTime field is set. + */ + @java.lang.Override + public boolean hasLastTuneTime() { + return lastTuneTime_ != null; + } + /** + * + * + *
    +   * Output only. The timestamp when the latest successful tune finished.
    +   * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTuneTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastTuneTime() { + return lastTuneTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTuneTime_; + } + /** + * + * + *
    +   * Output only. The timestamp when the latest successful tune finished.
    +   * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder() { + return getLastTuneTime(); + } + + public static final int TUNING_OPERATION_FIELD_NUMBER = 15; + private volatile java.lang.Object tuningOperation_; + /** + * + * + *
    +   * Output only. The tune operation associated with the model.
    +   * Can be used to determine if there is an ongoing tune for this
    +   * recommendation. Empty field implies no tune is goig on.
    +   * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningOperation. + */ + @java.lang.Override + public java.lang.String getTuningOperation() { + java.lang.Object ref = tuningOperation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tuningOperation_ = s; + return s; + } + } + /** + * + * + *
    +   * Output only. The tune operation associated with the model.
    +   * Can be used to determine if there is an ongoing tune for this
    +   * recommendation. Empty field implies no tune is goig on.
    +   * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tuningOperation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTuningOperationBytes() { + java.lang.Object ref = tuningOperation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tuningOperation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_STATE_FIELD_NUMBER = 16; + private int dataState_; + /** + * + * + *
    +   * Output only. The state of data requirements for this model: DATA_OK and
    +   * DATA_ERROR.
    +   * Recommendation model cannot be trained if the data is in
    +   * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +   * serving state is ACTIVE: models were trained successfully before, but
    +   * cannot be refreshed because model no longer has sufficient
    +   * data for training.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataState. + */ + @java.lang.Override + public int getDataStateValue() { + return dataState_; + } + /** + * + * + *
    +   * Output only. The state of data requirements for this model: DATA_OK and
    +   * DATA_ERROR.
    +   * Recommendation model cannot be trained if the data is in
    +   * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +   * serving state is ACTIVE: models were trained successfully before, but
    +   * cannot be refreshed because model no longer has sufficient
    +   * data for training.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.DataState getDataState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.DataState result = + com.google.cloud.retail.v2alpha.Model.DataState.valueOf(dataState_); + return result == null ? com.google.cloud.retail.v2alpha.Model.DataState.UNRECOGNIZED : result; + } + + public static final int FILTERING_OPTION_FIELD_NUMBER = 18; + private int filteringOption_; + /** + * + * + *
    +   * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +   * attributes is enabled for the model.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringOption. + */ + @java.lang.Override + public int getFilteringOptionValue() { + return filteringOption_; + } + /** + * + * + *
    +   * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +   * attributes is enabled for the model.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.RecommendationsFilteringOption getFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption result = + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.valueOf(filteringOption_); + return result == null + ? com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + + public static final int SERVING_CONFIG_LISTS_FIELD_NUMBER = 19; + private java.util.List + servingConfigLists_; + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getServingConfigListsList() { + return servingConfigLists_; + } + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getServingConfigListsOrBuilderList() { + return servingConfigLists_; + } + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getServingConfigListsCount() { + return servingConfigLists_.size(); + } + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingConfigList getServingConfigLists(int index) { + return servingConfigLists_.get(index); + } + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder + getServingConfigListsOrBuilder(int index) { + return servingConfigLists_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (trainingState_ + != com.google.cloud.retail.v2alpha.Model.TrainingState.TRAINING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, trainingState_); + } + if (servingState_ + != com.google.cloud.retail.v2alpha.Model.ServingState.SERVING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, servingState_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizationObjective_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, optimizationObjective_); + } + if (periodicTuningState_ + != com.google.cloud.retail.v2alpha.Model.PeriodicTuningState + .PERIODIC_TUNING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, periodicTuningState_); + } + if (lastTuneTime_ != null) { + output.writeMessage(12, getLastTuneTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tuningOperation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, tuningOperation_); + } + if (dataState_ + != com.google.cloud.retail.v2alpha.Model.DataState.DATA_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(16, dataState_); + } + if (trainingConfigCase_ == 17) { + output.writeMessage( + 17, (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_); + } + if (filteringOption_ + != com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(18, filteringOption_); + } + for (int i = 0; i < servingConfigLists_.size(); i++) { + output.writeMessage(19, servingConfigLists_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (trainingState_ + != com.google.cloud.retail.v2alpha.Model.TrainingState.TRAINING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, trainingState_); + } + if (servingState_ + != com.google.cloud.retail.v2alpha.Model.ServingState.SERVING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, servingState_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizationObjective_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, optimizationObjective_); + } + if (periodicTuningState_ + != com.google.cloud.retail.v2alpha.Model.PeriodicTuningState + .PERIODIC_TUNING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, periodicTuningState_); + } + if (lastTuneTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLastTuneTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tuningOperation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, tuningOperation_); + } + if (dataState_ + != com.google.cloud.retail.v2alpha.Model.DataState.DATA_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, dataState_); + } + if (trainingConfigCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_); + } + if (filteringOption_ + != com.google.cloud.retail.v2alpha.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, filteringOption_); + } + for (int i = 0; i < servingConfigLists_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.Model)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.Model other = (com.google.cloud.retail.v2alpha.Model) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (trainingState_ != other.trainingState_) return false; + if (servingState_ != other.servingState_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getType().equals(other.getType())) return false; + if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; + if (periodicTuningState_ != other.periodicTuningState_) return false; + if (hasLastTuneTime() != other.hasLastTuneTime()) return false; + if (hasLastTuneTime()) { + if (!getLastTuneTime().equals(other.getLastTuneTime())) return false; + } + if (!getTuningOperation().equals(other.getTuningOperation())) return false; + if (dataState_ != other.dataState_) return false; + if (filteringOption_ != other.filteringOption_) return false; + if (!getServingConfigListsList().equals(other.getServingConfigListsList())) return false; + if (!getTrainingConfigCase().equals(other.getTrainingConfigCase())) return false; + switch (trainingConfigCase_) { + case 17: + if (!getPageOptimizationConfig().equals(other.getPageOptimizationConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + TRAINING_STATE_FIELD_NUMBER; + hash = (53 * hash) + trainingState_; + hash = (37 * hash) + SERVING_STATE_FIELD_NUMBER; + hash = (53 * hash) + servingState_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getOptimizationObjective().hashCode(); + hash = (37 * hash) + PERIODIC_TUNING_STATE_FIELD_NUMBER; + hash = (53 * hash) + periodicTuningState_; + if (hasLastTuneTime()) { + hash = (37 * hash) + LAST_TUNE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastTuneTime().hashCode(); + } + hash = (37 * hash) + TUNING_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getTuningOperation().hashCode(); + hash = (37 * hash) + DATA_STATE_FIELD_NUMBER; + hash = (53 * hash) + dataState_; + hash = (37 * hash) + FILTERING_OPTION_FIELD_NUMBER; + hash = (53 * hash) + filteringOption_; + if (getServingConfigListsCount() > 0) { + hash = (37 * hash) + SERVING_CONFIG_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigListsList().hashCode(); + } + switch (trainingConfigCase_) { + case 17: + hash = (37 * hash) + PAGE_OPTIMIZATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPageOptimizationConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.Model parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.Model prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Metadata that describes the training and serving parameters of a
    +   * [Model][google.cloud.retail.v2alpha.Model]. A
    +   * [Model][google.cloud.retail.v2alpha.Model] can be associated with a
    +   * [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] and then queried
    +   * through the Predict api.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.Model} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.Model) + com.google.cloud.retail.v2alpha.ModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.Model.class, + com.google.cloud.retail.v2alpha.Model.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.Model.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getServingConfigListsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + trainingState_ = 0; + + servingState_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + type_ = ""; + + optimizationObjective_ = ""; + + periodicTuningState_ = 0; + + if (lastTuneTimeBuilder_ == null) { + lastTuneTime_ = null; + } else { + lastTuneTime_ = null; + lastTuneTimeBuilder_ = null; + } + tuningOperation_ = ""; + + dataState_ = 0; + + filteringOption_ = 0; + + if (servingConfigListsBuilder_ == null) { + servingConfigLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + servingConfigListsBuilder_.clear(); + } + trainingConfigCase_ = 0; + trainingConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelProto + .internal_static_google_cloud_retail_v2alpha_Model_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.Model.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model build() { + com.google.cloud.retail.v2alpha.Model result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model buildPartial() { + com.google.cloud.retail.v2alpha.Model result = + new com.google.cloud.retail.v2alpha.Model(this); + int from_bitField0_ = bitField0_; + if (trainingConfigCase_ == 17) { + if (pageOptimizationConfigBuilder_ == null) { + result.trainingConfig_ = trainingConfig_; + } else { + result.trainingConfig_ = pageOptimizationConfigBuilder_.build(); + } + } + result.name_ = name_; + result.displayName_ = displayName_; + result.trainingState_ = trainingState_; + result.servingState_ = servingState_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.type_ = type_; + result.optimizationObjective_ = optimizationObjective_; + result.periodicTuningState_ = periodicTuningState_; + if (lastTuneTimeBuilder_ == null) { + result.lastTuneTime_ = lastTuneTime_; + } else { + result.lastTuneTime_ = lastTuneTimeBuilder_.build(); + } + result.tuningOperation_ = tuningOperation_; + result.dataState_ = dataState_; + result.filteringOption_ = filteringOption_; + if (servingConfigListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + servingConfigLists_ = java.util.Collections.unmodifiableList(servingConfigLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.servingConfigLists_ = servingConfigLists_; + } else { + result.servingConfigLists_ = servingConfigListsBuilder_.build(); + } + result.trainingConfigCase_ = trainingConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.Model) { + return mergeFrom((com.google.cloud.retail.v2alpha.Model) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model other) { + if (other == com.google.cloud.retail.v2alpha.Model.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.trainingState_ != 0) { + setTrainingStateValue(other.getTrainingStateValue()); + } + if (other.servingState_ != 0) { + setServingStateValue(other.getServingStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getOptimizationObjective().isEmpty()) { + optimizationObjective_ = other.optimizationObjective_; + onChanged(); + } + if (other.periodicTuningState_ != 0) { + setPeriodicTuningStateValue(other.getPeriodicTuningStateValue()); + } + if (other.hasLastTuneTime()) { + mergeLastTuneTime(other.getLastTuneTime()); + } + if (!other.getTuningOperation().isEmpty()) { + tuningOperation_ = other.tuningOperation_; + onChanged(); + } + if (other.dataState_ != 0) { + setDataStateValue(other.getDataStateValue()); + } + if (other.filteringOption_ != 0) { + setFilteringOptionValue(other.getFilteringOptionValue()); + } + if (servingConfigListsBuilder_ == null) { + if (!other.servingConfigLists_.isEmpty()) { + if (servingConfigLists_.isEmpty()) { + servingConfigLists_ = other.servingConfigLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServingConfigListsIsMutable(); + servingConfigLists_.addAll(other.servingConfigLists_); + } + onChanged(); + } + } else { + if (!other.servingConfigLists_.isEmpty()) { + if (servingConfigListsBuilder_.isEmpty()) { + servingConfigListsBuilder_.dispose(); + servingConfigListsBuilder_ = null; + servingConfigLists_ = other.servingConfigLists_; + bitField0_ = (bitField0_ & ~0x00000001); + servingConfigListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServingConfigListsFieldBuilder() + : null; + } else { + servingConfigListsBuilder_.addAllMessages(other.servingConfigLists_); + } + } + } + switch (other.getTrainingConfigCase()) { + case PAGE_OPTIMIZATION_CONFIG: + { + mergePageOptimizationConfig(other.getPageOptimizationConfig()); + break; + } + case TRAININGCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.Model parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.retail.v2alpha.Model) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int trainingConfigCase_ = 0; + private java.lang.Object trainingConfig_; + + public TrainingConfigCase getTrainingConfigCase() { + return TrainingConfigCase.forNumber(trainingConfigCase_); + } + + public Builder clearTrainingConfig() { + trainingConfigCase_ = 0; + trainingConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder> + pageOptimizationConfigBuilder_; + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageOptimizationConfig field is set. + */ + @java.lang.Override + public boolean hasPageOptimizationConfig() { + return trainingConfigCase_ == 17; + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageOptimizationConfig. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + getPageOptimizationConfig() { + if (pageOptimizationConfigBuilder_ == null) { + if (trainingConfigCase_ == 17) { + return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } else { + if (trainingConfigCase_ == 17) { + return pageOptimizationConfigBuilder_.getMessage(); + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPageOptimizationConfig( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig value) { + if (pageOptimizationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainingConfig_ = value; + onChanged(); + } else { + pageOptimizationConfigBuilder_.setMessage(value); + } + trainingConfigCase_ = 17; + return this; + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPageOptimizationConfig( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder builderForValue) { + if (pageOptimizationConfigBuilder_ == null) { + trainingConfig_ = builderForValue.build(); + onChanged(); + } else { + pageOptimizationConfigBuilder_.setMessage(builderForValue.build()); + } + trainingConfigCase_ = 17; + return this; + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePageOptimizationConfig( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig value) { + if (pageOptimizationConfigBuilder_ == null) { + if (trainingConfigCase_ == 17 + && trainingConfig_ + != com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig + .getDefaultInstance()) { + trainingConfig_ = + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.newBuilder( + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) + trainingConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + trainingConfig_ = value; + } + onChanged(); + } else { + if (trainingConfigCase_ == 17) { + pageOptimizationConfigBuilder_.mergeFrom(value); + } else { + pageOptimizationConfigBuilder_.setMessage(value); + } + } + trainingConfigCase_ = 17; + return this; + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPageOptimizationConfig() { + if (pageOptimizationConfigBuilder_ == null) { + if (trainingConfigCase_ == 17) { + trainingConfigCase_ = 0; + trainingConfig_ = null; + onChanged(); + } + } else { + if (trainingConfigCase_ == 17) { + trainingConfigCase_ = 0; + trainingConfig_ = null; + } + pageOptimizationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder + getPageOptimizationConfigBuilder() { + return getPageOptimizationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder + getPageOptimizationConfigOrBuilder() { + if ((trainingConfigCase_ == 17) && (pageOptimizationConfigBuilder_ != null)) { + return pageOptimizationConfigBuilder_.getMessageOrBuilder(); + } else { + if (trainingConfigCase_ == 17) { + return (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_; + } + return com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Optional. The page optimization config.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder> + getPageOptimizationConfigFieldBuilder() { + if (pageOptimizationConfigBuilder_ == null) { + if (!(trainingConfigCase_ == 17)) { + trainingConfig_ = + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.getDefaultInstance(); + } + pageOptimizationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder, + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder>( + (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_, + getParentForChildren(), + isClean()); + trainingConfig_ = null; + } + trainingConfigCase_ = 17; + onChanged(); + ; + return pageOptimizationConfigBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The fully qualified resource name of the model.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * catalog_id has char limit of 50.
    +     * recommendation_model_id has char limit of 40.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The fully qualified resource name of the model.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * catalog_id has char limit of 50.
    +     * recommendation_model_id has char limit of 40.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The fully qualified resource name of the model.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * catalog_id has char limit of 50.
    +     * recommendation_model_id has char limit of 40.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The fully qualified resource name of the model.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * catalog_id has char limit of 50.
    +     * recommendation_model_id has char limit of 40.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The fully qualified resource name of the model.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * catalog_id has char limit of 50.
    +     * recommendation_model_id has char limit of 40.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
    +     * Required. The display name of the model.
    +     * Should be human readable, used to display Recommendation Models in the
    +     * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +     * characters.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The display name of the model.
    +     * Should be human readable, used to display Recommendation Models in the
    +     * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +     * characters.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The display name of the model.
    +     * Should be human readable, used to display Recommendation Models in the
    +     * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +     * characters.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The display name of the model.
    +     * Should be human readable, used to display Recommendation Models in the
    +     * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +     * characters.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The display name of the model.
    +     * Should be human readable, used to display Recommendation Models in the
    +     * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +     * characters.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private int trainingState_ = 0; + /** + * + * + *
    +     * Optional. The training state that the model is in (e.g.
    +     * TRAINING or PAUSED).
    +     * Since part of the cost of running the service
    +     * is frequency of training - this can be used to determine when to train
    +     * model in order to control cost. If not specified: the default value for
    +     * CreateModel method is TRAINING. the default value for
    +     * UpdateModel method is to keep the state the same as before.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + @java.lang.Override + public int getTrainingStateValue() { + return trainingState_; + } + /** + * + * + *
    +     * Optional. The training state that the model is in (e.g.
    +     * TRAINING or PAUSED).
    +     * Since part of the cost of running the service
    +     * is frequency of training - this can be used to determine when to train
    +     * model in order to control cost. If not specified: the default value for
    +     * CreateModel method is TRAINING. the default value for
    +     * UpdateModel method is to keep the state the same as before.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for trainingState to set. + * @return This builder for chaining. + */ + public Builder setTrainingStateValue(int value) { + + trainingState_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. The training state that the model is in (e.g.
    +     * TRAINING or PAUSED).
    +     * Since part of the cost of running the service
    +     * is frequency of training - this can be used to determine when to train
    +     * model in order to control cost. If not specified: the default value for
    +     * CreateModel method is TRAINING. the default value for
    +     * UpdateModel method is to keep the state the same as before.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trainingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.TrainingState getTrainingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.TrainingState result = + com.google.cloud.retail.v2alpha.Model.TrainingState.valueOf(trainingState_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.TrainingState.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * Optional. The training state that the model is in (e.g.
    +     * TRAINING or PAUSED).
    +     * Since part of the cost of running the service
    +     * is frequency of training - this can be used to determine when to train
    +     * model in order to control cost. If not specified: the default value for
    +     * CreateModel method is TRAINING. the default value for
    +     * UpdateModel method is to keep the state the same as before.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The trainingState to set. + * @return This builder for chaining. + */ + public Builder setTrainingState(com.google.cloud.retail.v2alpha.Model.TrainingState value) { + if (value == null) { + throw new NullPointerException(); + } + + trainingState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. The training state that the model is in (e.g.
    +     * TRAINING or PAUSED).
    +     * Since part of the cost of running the service
    +     * is frequency of training - this can be used to determine when to train
    +     * model in order to control cost. If not specified: the default value for
    +     * CreateModel method is TRAINING. the default value for
    +     * UpdateModel method is to keep the state the same as before.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTrainingState() { + + trainingState_ = 0; + onChanged(); + return this; + } + + private int servingState_ = 0; + /** + * + * + *
    +     * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for servingState. + */ + @java.lang.Override + public int getServingStateValue() { + return servingState_; + } + /** + * + * + *
    +     * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for servingState to set. + * @return This builder for chaining. + */ + public Builder setServingStateValue(int value) { + + servingState_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The servingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.ServingState getServingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.ServingState result = + com.google.cloud.retail.v2alpha.Model.ServingState.valueOf(servingState_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.ServingState.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The servingState to set. + * @return This builder for chaining. + */ + public Builder setServingState(com.google.cloud.retail.v2alpha.Model.ServingState value) { + if (value == null) { + throw new NullPointerException(); + } + + servingState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearServingState() { + + servingState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was created at.
    +     * 
    + * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
    +     * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +     * if a Recommendation Model was paused - this would be the time the pause was
    +     * initiated.
    +     * 
    + * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
    +     * Required. The type of model e.g. `home-page`.
    +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +     * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +     * 'buy-it-again', `recently-viewed`(readonly value).
    +     * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The type of model e.g. `home-page`.
    +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +     * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +     * 'buy-it-again', `recently-viewed`(readonly value).
    +     * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The type of model e.g. `home-page`.
    +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +     * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +     * 'buy-it-again', `recently-viewed`(readonly value).
    +     * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The type of model e.g. `home-page`.
    +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +     * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +     * 'buy-it-again', `recently-viewed`(readonly value).
    +     * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The type of model e.g. `home-page`.
    +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +     * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +     * 'buy-it-again', `recently-viewed`(readonly value).
    +     * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object optimizationObjective_ = ""; + /** + * + * + *
    +     * Optional. The optimization objective e.g. `cvr`.
    +     * Currently supported
    +     * values: `ctr`, `cvr`, `revenue-per-order`.
    +     *  If not specified, we choose default based on model type.
    +     * Default depends on type of recommendation:
    +     * `recommended-for-you` => `ctr`
    +     * `others-you-may-like` => `ctr`
    +     * `frequently-bought-together` => `revenue_per_order`
    +     * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optimizationObjective. + */ + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Optional. The optimization objective e.g. `cvr`.
    +     * Currently supported
    +     * values: `ctr`, `cvr`, `revenue-per-order`.
    +     *  If not specified, we choose default based on model type.
    +     * Default depends on type of recommendation:
    +     * `recommended-for-you` => `ctr`
    +     * `others-you-may-like` => `ctr`
    +     * `frequently-bought-together` => `revenue_per_order`
    +     * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for optimizationObjective. + */ + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Optional. The optimization objective e.g. `cvr`.
    +     * Currently supported
    +     * values: `ctr`, `cvr`, `revenue-per-order`.
    +     *  If not specified, we choose default based on model type.
    +     * Default depends on type of recommendation:
    +     * `recommended-for-you` => `ctr`
    +     * `others-you-may-like` => `ctr`
    +     * `frequently-bought-together` => `revenue_per_order`
    +     * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjective(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + optimizationObjective_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. The optimization objective e.g. `cvr`.
    +     * Currently supported
    +     * values: `ctr`, `cvr`, `revenue-per-order`.
    +     *  If not specified, we choose default based on model type.
    +     * Default depends on type of recommendation:
    +     * `recommended-for-you` => `ctr`
    +     * `others-you-may-like` => `ctr`
    +     * `frequently-bought-together` => `revenue_per_order`
    +     * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjective() { + + optimizationObjective_ = getDefaultInstance().getOptimizationObjective(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. The optimization objective e.g. `cvr`.
    +     * Currently supported
    +     * values: `ctr`, `cvr`, `revenue-per-order`.
    +     *  If not specified, we choose default based on model type.
    +     * Default depends on type of recommendation:
    +     * `recommended-for-you` => `ctr`
    +     * `others-you-may-like` => `ctr`
    +     * `frequently-bought-together` => `revenue_per_order`
    +     * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectiveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + optimizationObjective_ = value; + onChanged(); + return this; + } + + private int periodicTuningState_ = 0; + /** + * + * + *
    +     * Optional. The state of periodic tuning.
    +     * The period we use is 3 months - to do a
    +     * one-off tune earlier use the TuneModel method. Default value
    +     * is PERIODIC_TUNING_ENABLED.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for periodicTuningState. + */ + @java.lang.Override + public int getPeriodicTuningStateValue() { + return periodicTuningState_; + } + /** + * + * + *
    +     * Optional. The state of periodic tuning.
    +     * The period we use is 3 months - to do a
    +     * one-off tune earlier use the TuneModel method. Default value
    +     * is PERIODIC_TUNING_ENABLED.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for periodicTuningState to set. + * @return This builder for chaining. + */ + public Builder setPeriodicTuningStateValue(int value) { + + periodicTuningState_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. The state of periodic tuning.
    +     * The period we use is 3 months - to do a
    +     * one-off tune earlier use the TuneModel method. Default value
    +     * is PERIODIC_TUNING_ENABLED.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The periodicTuningState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.PeriodicTuningState getPeriodicTuningState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.PeriodicTuningState result = + com.google.cloud.retail.v2alpha.Model.PeriodicTuningState.valueOf(periodicTuningState_); + return result == null + ? com.google.cloud.retail.v2alpha.Model.PeriodicTuningState.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * Optional. The state of periodic tuning.
    +     * The period we use is 3 months - to do a
    +     * one-off tune earlier use the TuneModel method. Default value
    +     * is PERIODIC_TUNING_ENABLED.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The periodicTuningState to set. + * @return This builder for chaining. + */ + public Builder setPeriodicTuningState( + com.google.cloud.retail.v2alpha.Model.PeriodicTuningState value) { + if (value == null) { + throw new NullPointerException(); + } + + periodicTuningState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. The state of periodic tuning.
    +     * The period we use is 3 months - to do a
    +     * one-off tune earlier use the TuneModel method. Default value
    +     * is PERIODIC_TUNING_ENABLED.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPeriodicTuningState() { + + periodicTuningState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastTuneTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastTuneTimeBuilder_; + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTuneTime field is set. + */ + public boolean hasLastTuneTime() { + return lastTuneTimeBuilder_ != null || lastTuneTime_ != null; + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTuneTime. + */ + public com.google.protobuf.Timestamp getLastTuneTime() { + if (lastTuneTimeBuilder_ == null) { + return lastTuneTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTuneTime_; + } else { + return lastTuneTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastTuneTime(com.google.protobuf.Timestamp value) { + if (lastTuneTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastTuneTime_ = value; + onChanged(); + } else { + lastTuneTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastTuneTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastTuneTimeBuilder_ == null) { + lastTuneTime_ = builderForValue.build(); + onChanged(); + } else { + lastTuneTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastTuneTime(com.google.protobuf.Timestamp value) { + if (lastTuneTimeBuilder_ == null) { + if (lastTuneTime_ != null) { + lastTuneTime_ = + com.google.protobuf.Timestamp.newBuilder(lastTuneTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastTuneTime_ = value; + } + onChanged(); + } else { + lastTuneTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastTuneTime() { + if (lastTuneTimeBuilder_ == null) { + lastTuneTime_ = null; + onChanged(); + } else { + lastTuneTime_ = null; + lastTuneTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastTuneTimeBuilder() { + + onChanged(); + return getLastTuneTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder() { + if (lastTuneTimeBuilder_ != null) { + return lastTuneTimeBuilder_.getMessageOrBuilder(); + } else { + return lastTuneTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTuneTime_; + } + } + /** + * + * + *
    +     * Output only. The timestamp when the latest successful tune finished.
    +     * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastTuneTimeFieldBuilder() { + if (lastTuneTimeBuilder_ == null) { + lastTuneTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastTuneTime(), getParentForChildren(), isClean()); + lastTuneTime_ = null; + } + return lastTuneTimeBuilder_; + } + + private java.lang.Object tuningOperation_ = ""; + /** + * + * + *
    +     * Output only. The tune operation associated with the model.
    +     * Can be used to determine if there is an ongoing tune for this
    +     * recommendation. Empty field implies no tune is goig on.
    +     * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningOperation. + */ + public java.lang.String getTuningOperation() { + java.lang.Object ref = tuningOperation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tuningOperation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Output only. The tune operation associated with the model.
    +     * Can be used to determine if there is an ongoing tune for this
    +     * recommendation. Empty field implies no tune is goig on.
    +     * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tuningOperation. + */ + public com.google.protobuf.ByteString getTuningOperationBytes() { + java.lang.Object ref = tuningOperation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tuningOperation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Output only. The tune operation associated with the model.
    +     * Can be used to determine if there is an ongoing tune for this
    +     * recommendation. Empty field implies no tune is goig on.
    +     * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tuningOperation to set. + * @return This builder for chaining. + */ + public Builder setTuningOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tuningOperation_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. The tune operation associated with the model.
    +     * Can be used to determine if there is an ongoing tune for this
    +     * recommendation. Empty field implies no tune is goig on.
    +     * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTuningOperation() { + + tuningOperation_ = getDefaultInstance().getTuningOperation(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. The tune operation associated with the model.
    +     * Can be used to determine if there is an ongoing tune for this
    +     * recommendation. Empty field implies no tune is goig on.
    +     * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for tuningOperation to set. + * @return This builder for chaining. + */ + public Builder setTuningOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tuningOperation_ = value; + onChanged(); + return this; + } + + private int dataState_ = 0; + /** + * + * + *
    +     * Output only. The state of data requirements for this model: DATA_OK and
    +     * DATA_ERROR.
    +     * Recommendation model cannot be trained if the data is in
    +     * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +     * serving state is ACTIVE: models were trained successfully before, but
    +     * cannot be refreshed because model no longer has sufficient
    +     * data for training.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataState. + */ + @java.lang.Override + public int getDataStateValue() { + return dataState_; + } + /** + * + * + *
    +     * Output only. The state of data requirements for this model: DATA_OK and
    +     * DATA_ERROR.
    +     * Recommendation model cannot be trained if the data is in
    +     * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +     * serving state is ACTIVE: models were trained successfully before, but
    +     * cannot be refreshed because model no longer has sufficient
    +     * data for training.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for dataState to set. + * @return This builder for chaining. + */ + public Builder setDataStateValue(int value) { + + dataState_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. The state of data requirements for this model: DATA_OK and
    +     * DATA_ERROR.
    +     * Recommendation model cannot be trained if the data is in
    +     * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +     * serving state is ACTIVE: models were trained successfully before, but
    +     * cannot be refreshed because model no longer has sufficient
    +     * data for training.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataState. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model.DataState getDataState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.Model.DataState result = + com.google.cloud.retail.v2alpha.Model.DataState.valueOf(dataState_); + return result == null ? com.google.cloud.retail.v2alpha.Model.DataState.UNRECOGNIZED : result; + } + /** + * + * + *
    +     * Output only. The state of data requirements for this model: DATA_OK and
    +     * DATA_ERROR.
    +     * Recommendation model cannot be trained if the data is in
    +     * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +     * serving state is ACTIVE: models were trained successfully before, but
    +     * cannot be refreshed because model no longer has sufficient
    +     * data for training.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The dataState to set. + * @return This builder for chaining. + */ + public Builder setDataState(com.google.cloud.retail.v2alpha.Model.DataState value) { + if (value == null) { + throw new NullPointerException(); + } + + dataState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. The state of data requirements for this model: DATA_OK and
    +     * DATA_ERROR.
    +     * Recommendation model cannot be trained if the data is in
    +     * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +     * serving state is ACTIVE: models were trained successfully before, but
    +     * cannot be refreshed because model no longer has sufficient
    +     * data for training.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataState() { + + dataState_ = 0; + onChanged(); + return this; + } + + private int filteringOption_ = 0; + /** + * + * + *
    +     * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +     * attributes is enabled for the model.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringOption. + */ + @java.lang.Override + public int getFilteringOptionValue() { + return filteringOption_; + } + /** + * + * + *
    +     * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +     * attributes is enabled for the model.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for filteringOption to set. + * @return This builder for chaining. + */ + public Builder setFilteringOptionValue(int value) { + + filteringOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +     * attributes is enabled for the model.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.RecommendationsFilteringOption getFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption result = + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.valueOf(filteringOption_); + return result == null + ? com.google.cloud.retail.v2alpha.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +     * attributes is enabled for the model.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The filteringOption to set. + * @return This builder for chaining. + */ + public Builder setFilteringOption( + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption value) { + if (value == null) { + throw new NullPointerException(); + } + + filteringOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +     * attributes is enabled for the model.
    +     * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFilteringOption() { + + filteringOption_ = 0; + onChanged(); + return this; + } + + private java.util.List + servingConfigLists_ = java.util.Collections.emptyList(); + + private void ensureServingConfigListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + servingConfigLists_ = + new java.util.ArrayList( + servingConfigLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.ServingConfigList, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder, + com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder> + servingConfigListsBuilder_; + + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServingConfigListsList() { + if (servingConfigListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(servingConfigLists_); + } else { + return servingConfigListsBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getServingConfigListsCount() { + if (servingConfigListsBuilder_ == null) { + return servingConfigLists_.size(); + } else { + return servingConfigListsBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ServingConfigList getServingConfigLists( + int index) { + if (servingConfigListsBuilder_ == null) { + return servingConfigLists_.get(index); + } else { + return servingConfigListsBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServingConfigLists( + int index, com.google.cloud.retail.v2alpha.Model.ServingConfigList value) { + if (servingConfigListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigListsIsMutable(); + servingConfigLists_.set(index, value); + onChanged(); + } else { + servingConfigListsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServingConfigLists( + int index, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder builderForValue) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.set(index, builderForValue.build()); + onChanged(); + } else { + servingConfigListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + com.google.cloud.retail.v2alpha.Model.ServingConfigList value) { + if (servingConfigListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(value); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + int index, com.google.cloud.retail.v2alpha.Model.ServingConfigList value) { + if (servingConfigListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(index, value); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder builderForValue) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(builderForValue.build()); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + int index, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder builderForValue) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(index, builderForValue.build()); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllServingConfigLists( + java.lang.Iterable + values) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigLists_); + onChanged(); + } else { + servingConfigListsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServingConfigLists() { + if (servingConfigListsBuilder_ == null) { + servingConfigLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servingConfigListsBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeServingConfigLists(int index) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.remove(index); + onChanged(); + } else { + servingConfigListsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder + getServingConfigListsBuilder(int index) { + return getServingConfigListsFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder + getServingConfigListsOrBuilder(int index) { + if (servingConfigListsBuilder_ == null) { + return servingConfigLists_.get(index); + } else { + return servingConfigListsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder> + getServingConfigListsOrBuilderList() { + if (servingConfigListsBuilder_ != null) { + return servingConfigListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(servingConfigLists_); + } + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder + addServingConfigListsBuilder() { + return getServingConfigListsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.Model.ServingConfigList.getDefaultInstance()); + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder + addServingConfigListsBuilder(int index) { + return getServingConfigListsFieldBuilder() + .addBuilder( + index, com.google.cloud.retail.v2alpha.Model.ServingConfigList.getDefaultInstance()); + } + /** + * + * + *
    +     * Output only. The list of valid serving configs associated with the
    +     * PageOptimizationConfig.
    +     * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServingConfigListsBuilderList() { + return getServingConfigListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.ServingConfigList, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder, + com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder> + getServingConfigListsFieldBuilder() { + if (servingConfigListsBuilder_ == null) { + servingConfigListsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model.ServingConfigList, + com.google.cloud.retail.v2alpha.Model.ServingConfigList.Builder, + com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder>( + servingConfigLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + servingConfigLists_ = null; + } + return servingConfigListsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.Model) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.Model) + private static final com.google.cloud.retail.v2alpha.Model DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.Model(); + } + + public static com.google.cloud.retail.v2alpha.Model getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Model parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Model(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelName.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelName.java new file mode 100644 index 00000000..0c0d5a45 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelName.java @@ -0,0 +1,257 @@ +/* + * 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.v2alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ModelName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CATALOG_MODEL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String catalog; + private final String model; + + @Deprecated + protected ModelName() { + project = null; + location = null; + catalog = null; + model = null; + } + + private ModelName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + catalog = Preconditions.checkNotNull(builder.getCatalog()); + model = Preconditions.checkNotNull(builder.getModel()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCatalog() { + return catalog; + } + + public String getModel() { + return model; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ModelName of(String project, String location, String catalog, String model) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCatalog(catalog) + .setModel(model) + .build(); + } + + public static String format(String project, String location, String catalog, String model) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCatalog(catalog) + .setModel(model) + .build() + .toString(); + } + + public static ModelName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CATALOG_MODEL.validatedMatch( + formattedString, "ModelName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("catalog"), + matchMap.get("model")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ModelName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CATALOG_MODEL.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (catalog != null) { + fieldMapBuilder.put("catalog", catalog); + } + if (model != null) { + fieldMapBuilder.put("model", model); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CATALOG_MODEL.instantiate( + "project", project, "location", location, "catalog", catalog, "model", model); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ModelName that = ((ModelName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.catalog, that.catalog) + && Objects.equals(this.model, that.model); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(catalog); + h *= 1000003; + h ^= Objects.hashCode(model); + return h; + } + + /** Builder for projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. */ + public static class Builder { + private String project; + private String location; + private String catalog; + private String model; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCatalog() { + return catalog; + } + + public String getModel() { + return model; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCatalog(String catalog) { + this.catalog = catalog; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + private Builder(ModelName modelName) { + this.project = modelName.project; + this.location = modelName.location; + this.catalog = modelName.catalog; + this.model = modelName.model; + } + + public ModelName build() { + return new ModelName(this); + } + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java new file mode 100644 index 00000000..7f8bc77f --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelOrBuilder.java @@ -0,0 +1,601 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model.proto + +package com.google.cloud.retail.v2alpha; + +public interface ModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.Model) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Optional. The page optimization config.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pageOptimizationConfig field is set. + */ + boolean hasPageOptimizationConfig(); + /** + * + * + *
    +   * Optional. The page optimization config.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pageOptimizationConfig. + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig getPageOptimizationConfig(); + /** + * + * + *
    +   * Optional. The page optimization config.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PageOptimizationConfig page_optimization_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfigOrBuilder + getPageOptimizationConfigOrBuilder(); + + /** + * + * + *
    +   * Required. The fully qualified resource name of the model.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * catalog_id has char limit of 50.
    +   * recommendation_model_id has char limit of 40.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The fully qualified resource name of the model.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * catalog_id has char limit of 50.
    +   * recommendation_model_id has char limit of 40.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * Required. The display name of the model.
    +   * Should be human readable, used to display Recommendation Models in the
    +   * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +   * characters.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
    +   * Required. The display name of the model.
    +   * Should be human readable, used to display Recommendation Models in the
    +   * Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024
    +   * characters.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Optional. The training state that the model is in (e.g.
    +   * TRAINING or PAUSED).
    +   * Since part of the cost of running the service
    +   * is frequency of training - this can be used to determine when to train
    +   * model in order to control cost. If not specified: the default value for
    +   * CreateModel method is TRAINING. the default value for
    +   * UpdateModel method is to keep the state the same as before.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + int getTrainingStateValue(); + /** + * + * + *
    +   * Optional. The training state that the model is in (e.g.
    +   * TRAINING or PAUSED).
    +   * Since part of the cost of running the service
    +   * is frequency of training - this can be used to determine when to train
    +   * model in order to control cost. If not specified: the default value for
    +   * CreateModel method is TRAINING. the default value for
    +   * UpdateModel method is to keep the state the same as before.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trainingState. + */ + com.google.cloud.retail.v2alpha.Model.TrainingState getTrainingState(); + + /** + * + * + *
    +   * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for servingState. + */ + int getServingStateValue(); + /** + * + * + *
    +   * Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The servingState. + */ + com.google.cloud.retail.v2alpha.Model.ServingState getServingState(); + + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was created at.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was created at.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was created at.
    +   * 
    + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +   * if a Recommendation Model was paused - this would be the time the pause was
    +   * initiated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +   * if a Recommendation Model was paused - this would be the time the pause was
    +   * initiated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
    +   * Output only. Timestamp the Recommendation Model was last updated. E.g.
    +   * if a Recommendation Model was paused - this would be the time the pause was
    +   * initiated.
    +   * 
    + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
    +   * Required. The type of model e.g. `home-page`.
    +   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +   * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +   * 'buy-it-again', `recently-viewed`(readonly value).
    +   * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
    +   * Required. The type of model e.g. `home-page`.
    +   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
    +   * `frequently-bought-together`, `page-optimization`, 'similar-items',
    +   * 'buy-it-again', `recently-viewed`(readonly value).
    +   * 
    + * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
    +   * Optional. The optimization objective e.g. `cvr`.
    +   * Currently supported
    +   * values: `ctr`, `cvr`, `revenue-per-order`.
    +   *  If not specified, we choose default based on model type.
    +   * Default depends on type of recommendation:
    +   * `recommended-for-you` => `ctr`
    +   * `others-you-may-like` => `ctr`
    +   * `frequently-bought-together` => `revenue_per_order`
    +   * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optimizationObjective. + */ + java.lang.String getOptimizationObjective(); + /** + * + * + *
    +   * Optional. The optimization objective e.g. `cvr`.
    +   * Currently supported
    +   * values: `ctr`, `cvr`, `revenue-per-order`.
    +   *  If not specified, we choose default based on model type.
    +   * Default depends on type of recommendation:
    +   * `recommended-for-you` => `ctr`
    +   * `others-you-may-like` => `ctr`
    +   * `frequently-bought-together` => `revenue_per_order`
    +   * 
    + * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for optimizationObjective. + */ + com.google.protobuf.ByteString getOptimizationObjectiveBytes(); + + /** + * + * + *
    +   * Optional. The state of periodic tuning.
    +   * The period we use is 3 months - to do a
    +   * one-off tune earlier use the TuneModel method. Default value
    +   * is PERIODIC_TUNING_ENABLED.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for periodicTuningState. + */ + int getPeriodicTuningStateValue(); + /** + * + * + *
    +   * Optional. The state of periodic tuning.
    +   * The period we use is 3 months - to do a
    +   * one-off tune earlier use the TuneModel method. Default value
    +   * is PERIODIC_TUNING_ENABLED.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The periodicTuningState. + */ + com.google.cloud.retail.v2alpha.Model.PeriodicTuningState getPeriodicTuningState(); + + /** + * + * + *
    +   * Output only. The timestamp when the latest successful tune finished.
    +   * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTuneTime field is set. + */ + boolean hasLastTuneTime(); + /** + * + * + *
    +   * Output only. The timestamp when the latest successful tune finished.
    +   * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTuneTime. + */ + com.google.protobuf.Timestamp getLastTuneTime(); + /** + * + * + *
    +   * Output only. The timestamp when the latest successful tune finished.
    +   * 
    + * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder(); + + /** + * + * + *
    +   * Output only. The tune operation associated with the model.
    +   * Can be used to determine if there is an ongoing tune for this
    +   * recommendation. Empty field implies no tune is goig on.
    +   * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningOperation. + */ + java.lang.String getTuningOperation(); + /** + * + * + *
    +   * Output only. The tune operation associated with the model.
    +   * Can be used to determine if there is an ongoing tune for this
    +   * recommendation. Empty field implies no tune is goig on.
    +   * 
    + * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tuningOperation. + */ + com.google.protobuf.ByteString getTuningOperationBytes(); + + /** + * + * + *
    +   * Output only. The state of data requirements for this model: DATA_OK and
    +   * DATA_ERROR.
    +   * Recommendation model cannot be trained if the data is in
    +   * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +   * serving state is ACTIVE: models were trained successfully before, but
    +   * cannot be refreshed because model no longer has sufficient
    +   * data for training.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataState. + */ + int getDataStateValue(); + /** + * + * + *
    +   * Output only. The state of data requirements for this model: DATA_OK and
    +   * DATA_ERROR.
    +   * Recommendation model cannot be trained if the data is in
    +   * DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
    +   * serving state is ACTIVE: models were trained successfully before, but
    +   * cannot be refreshed because model no longer has sufficient
    +   * data for training.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataState. + */ + com.google.cloud.retail.v2alpha.Model.DataState getDataState(); + + /** + * + * + *
    +   * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +   * attributes is enabled for the model.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringOption. + */ + int getFilteringOptionValue(); + /** + * + * + *
    +   * Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
    +   * attributes is enabled for the model.
    +   * 
    + * + * + * .google.cloud.retail.v2alpha.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringOption. + */ + com.google.cloud.retail.v2alpha.RecommendationsFilteringOption getFilteringOption(); + + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getServingConfigListsList(); + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2alpha.Model.ServingConfigList getServingConfigLists(int index); + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getServingConfigListsCount(); + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getServingConfigListsOrBuilderList(); + /** + * + * + *
    +   * Output only. The list of valid serving configs associated with the
    +   * PageOptimizationConfig.
    +   * 
    + * + * + * repeated .google.cloud.retail.v2alpha.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2alpha.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder( + int index); + + public com.google.cloud.retail.v2alpha.Model.TrainingConfigCase getTrainingConfigCase(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java new file mode 100644 index 00000000..7cbc9488 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelProto.java @@ -0,0 +1,207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model.proto + +package com.google.cloud.retail.v2alpha; + +public final class ModelProto { + private ModelProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/retail/v2alpha/model.prot" + + "o\022\033google.cloud.retail.v2alpha\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\032(google/cloud/retail/v2alpha/" + + "common.proto\032\037google/protobuf/timestamp." + + "proto\"\374\020\n\005Model\022b\n\030page_optimization_con" + + "fig\030\021 \001(\01329.google.cloud.retail.v2alpha." + + "Model.PageOptimizationConfigB\003\340A\001H\000\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\002\022\031\n\014display_name\030\002 \001(\tB\003\340A" + + "\002\022M\n\016training_state\030\003 \001(\01620.google.cloud" + + ".retail.v2alpha.Model.TrainingStateB\003\340A\001" + + "\022K\n\rserving_state\030\004 \001(\0162/.google.cloud.r" + + "etail.v2alpha.Model.ServingStateB\003\340A\003\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\0224\n\013update_time\030\006 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022\021\n\004type\030\007 \001(\tB" + + "\003\340A\002\022#\n\026optimization_objective\030\010 \001(\tB\003\340A" + + "\001\022Z\n\025periodic_tuning_state\030\013 \001(\01626.googl" + + "e.cloud.retail.v2alpha.Model.PeriodicTun" + + "ingStateB\003\340A\001\0227\n\016last_tune_time\030\014 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022\035\n\020tuning" + + "_operation\030\017 \001(\tB\003\340A\003\022E\n\ndata_state\030\020 \001(" + + "\0162,.google.cloud.retail.v2alpha.Model.Da" + + "taStateB\003\340A\003\022Z\n\020filtering_option\030\022 \001(\0162;" + + ".google.cloud.retail.v2alpha.Recommendat" + + "ionsFilteringOptionB\003\340A\001\022W\n\024serving_conf" + + "ig_lists\030\023 \003(\01324.google.cloud.retail.v2a" + + "lpha.Model.ServingConfigListB\003\340A\003\032\302\005\n\026Pa" + + "geOptimizationConfig\022)\n\034page_optimizatio" + + "n_event_type\030\001 \001(\tB\003\340A\002\022T\n\006panels\030\002 \003(\0132" + + "?.google.cloud.retail.v2alpha.Model.Page" + + "OptimizationConfig.PanelB\003\340A\002\022_\n\013restric" + + "tion\030\003 \001(\0162E.google.cloud.retail.v2alpha" + + ".Model.PageOptimizationConfig.Restrictio" + + "nB\003\340A\001\0325\n\tCandidate\022\033\n\021serving_config_id" + + "\030\001 \001(\tH\000B\013\n\tcandidate\032\345\001\n\005Panel\022\031\n\014displ" + + "ay_name\030\001 \001(\tB\003\340A\001\022\\\n\ncandidates\030\002 \003(\0132C" + + ".google.cloud.retail.v2alpha.Model.PageO" + + "ptimizationConfig.CandidateB\003\340A\002\022c\n\021defa" + + "ult_candidate\030\003 \001(\0132C.google.cloud.retai" + + "l.v2alpha.Model.PageOptimizationConfig.C" + + "andidateB\003\340A\002\"\246\001\n\013Restriction\022\033\n\027RESTRIC" + + "TION_UNSPECIFIED\020\000\022\022\n\016NO_RESTRICTION\020\001\022%" + + "\n!UNIQUE_SERVING_CONFIG_RESTRICTION\020\002\022\034\n" + + "\030UNIQUE_MODEL_RESTRICTION\020\003\022!\n\035UNIQUE_MO" + + "DEL_TYPE_RESTRICTION\020\004\0324\n\021ServingConfigL" + + "ist\022\037\n\022serving_config_ids\030\001 \003(\tB\003\340A\001\"R\n\014" + + "ServingState\022\035\n\031SERVING_STATE_UNSPECIFIE" + + "D\020\000\022\014\n\010INACTIVE\020\001\022\n\n\006ACTIVE\020\002\022\t\n\005TUNED\020\003" + + "\"I\n\rTrainingState\022\036\n\032TRAINING_STATE_UNSP" + + "ECIFIED\020\000\022\n\n\006PAUSED\020\001\022\014\n\010TRAINING\020\002\"\220\001\n\023" + + "PeriodicTuningState\022%\n!PERIODIC_TUNING_S" + + "TATE_UNSPECIFIED\020\000\022\034\n\030PERIODIC_TUNING_DI" + + "SABLED\020\001\022\027\n\023ALL_TUNING_DISABLED\020\003\022\033\n\027PER" + + "IODIC_TUNING_ENABLED\020\002\"D\n\tDataState\022\032\n\026D" + + "ATA_STATE_UNSPECIFIED\020\000\022\013\n\007DATA_OK\020\001\022\016\n\n" + + "DATA_ERROR\020\002:k\352Ah\n\033retail.googleapis.com" + + "/Model\022Iprojects/{project}/locations/{lo" + + "cation}/catalogs/{catalog}/models/{model" + + "}B\021\n\017training_configB\330\001\n\037com.google.clou" + + "d.retail.v2alphaB\nModelProtoP\001ZAgoogle.g" + + "olang.org/genproto/googleapis/cloud/reta" + + "il/v2alpha;retail\242\002\006RETAIL\252\002\033Google.Clou" + + "d.Retail.V2Alpha\312\002\033Google\\Cloud\\Retail\\V" + + "2alpha\352\002\036Google::Cloud::Retail::V2alphab" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2alpha_Model_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2alpha_Model_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_descriptor, + new java.lang.String[] { + "PageOptimizationConfig", + "Name", + "DisplayName", + "TrainingState", + "ServingState", + "CreateTime", + "UpdateTime", + "Type", + "OptimizationObjective", + "PeriodicTuningState", + "LastTuneTime", + "TuningOperation", + "DataState", + "FilteringOption", + "ServingConfigLists", + "TrainingConfig", + }); + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor = + internal_static_google_cloud_retail_v2alpha_Model_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor, + new java.lang.String[] { + "PageOptimizationEventType", "Panels", "Restriction", + }); + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor = + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor, + new java.lang.String[] { + "ServingConfigId", "Candidate", + }); + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor = + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor, + new java.lang.String[] { + "DisplayName", "Candidates", "DefaultCandidate", + }); + internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor = + internal_static_google_cloud_retail_v2alpha_Model_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor, + new java.lang.String[] { + "ServingConfigIds", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2alpha.CommonProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceProto.java new file mode 100644 index 00000000..cf9d31ab --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceProto.java @@ -0,0 +1,278 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public final class ModelServiceProto { + private ModelServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CreateModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_PauseModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ListModelsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_ListModelsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_TuneModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_TuneModelResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/retail/v2alpha/model_serv" + + "ice.proto\022\033google.cloud.retail.v2alpha\032\034" + + "google/api/annotations.proto\032\027google/api" + + "/client.proto\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032\'googl" + + "e/cloud/retail/v2alpha/model.proto\032#goog" + + "le/longrunning/operations.proto\032\033google/" + + "protobuf/empty.proto\032 google/protobuf/fi" + + "eld_mask.proto\"\231\001\n\022CreateModelRequest\0225\n" + + "\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis" + + ".com/Catalog\0226\n\005model\030\002 \001(\0132\".google.clo" + + "ud.retail.v2alpha.ModelB\003\340A\002\022\024\n\007dry_run\030" + + "\003 \001(\010B\003\340A\001\"\202\001\n\022UpdateModelRequest\0226\n\005mod" + + "el\030\001 \001(\0132\".google.cloud.retail.v2alpha.M" + + "odelB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\001\"F\n\021PauseModelReq" + + "uest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033retail.googl" + + "eapis.com/Model\"\'\n\022ResumeModelRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\"{\n\021ListModelsRequest\0225\n" + + "\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis" + + ".com/Catalog\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"G\n\022DeleteModelRequ" + + "est\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033retail.google" + + "apis.com/Model\"a\n\022ListModelsResponse\0222\n\006" + + "models\030\001 \003(\0132\".google.cloud.retail.v2alp" + + "ha.Model\022\027\n\017next_page_token\030\002 \001(\t\"E\n\020Tun" + + "eModelRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033ret" + + "ail.googleapis.com/Model\"$\n\023CreateModelM" + + "etadata\022\r\n\005model\030\001 \001(\t\"\"\n\021TuneModelMetad" + + "ata\022\r\n\005model\030\001 \001(\t\"\023\n\021TuneModelResponse2" + + "\246\013\n\014ModelService\022\326\001\n\013CreateModel\022/.googl" + + "e.cloud.retail.v2alpha.CreateModelReques" + + "t\032\035.google.longrunning.Operation\"w\202\323\344\223\002C" + + "\":/v2alpha/{parent=projects/*/locations/" + + "*/catalogs/*}/models:\005model\332A\014parent,mod" + + "el\312A\034\n\005Model\022\023CreateModelMetadata\022\264\001\n\nPa" + + "useModel\022..google.cloud.retail.v2alpha.P" + + "auseModelRequest\032\".google.cloud.retail.v" + + "2alpha.Model\"R\202\323\344\223\002E\"@/v2alpha/{name=pro" + + "jects/*/locations/*/catalogs/*/models/*}" + + ":pause:\001*\332A\004name\022\267\001\n\013ResumeModel\022/.googl" + + "e.cloud.retail.v2alpha.ResumeModelReques" + + "t\032\".google.cloud.retail.v2alpha.Model\"S\202" + + "\323\344\223\002F\"A/v2alpha/{name=projects/*/locatio" + + "ns/*/catalogs/*/models/*}:resume:\001*\332A\004na" + + "me\022\241\001\n\013DeleteModel\022/.google.cloud.retail" + + ".v2alpha.DeleteModelRequest\032\026.google.pro" + + "tobuf.Empty\"I\202\323\344\223\002<*:/v2alpha/{name=proj" + + "ects/*/locations/*/catalogs/*/models/*}\332" + + "A\004name\022\272\001\n\nListModels\022..google.cloud.ret" + + "ail.v2alpha.ListModelsRequest\032/.google.c" + + "loud.retail.v2alpha.ListModelsResponse\"K" + + "\202\323\344\223\002<\022:/v2alpha/{parent=projects/*/loca" + + "tions/*/catalogs/*}/models\332A\006parent\022\307\001\n\013" + + "UpdateModel\022/.google.cloud.retail.v2alph" + + "a.UpdateModelRequest\032\".google.cloud.reta" + + "il.v2alpha.Model\"c\202\323\344\223\002I2@/v2alpha/{mode" + + "l.name=projects/*/locations/*/catalogs/*" + + "/models/*}:\005model\332A\021model,update_mask\022\325\001" + + "\n\tTuneModel\022-.google.cloud.retail.v2alph" + + "a.TuneModelRequest\032\035.google.longrunning." + + "Operation\"z\202\323\344\223\002D\"?/v2alpha/{name=projec" + + "ts/*/locations/*/catalogs/*/models/*}:tu" + + "ne:\001*\332A\004name\312A&\n\021TuneModelResponse\022\021Tune" + + "ModelMetadata\032I\312A\025retail.googleapis.com\322" + + "A.https://www.googleapis.com/auth/cloud-" + + "platformB\337\001\n\037com.google.cloud.retail.v2a" + + "lphaB\021ModelServiceProtoP\001ZAgoogle.golang" + + ".org/genproto/googleapis/cloud/retail/v2" + + "alpha;retail\242\002\006RETAIL\252\002\033Google.Cloud.Ret" + + "ail.V2Alpha\312\002\033Google\\Cloud\\Retail\\V2alph" + + "a\352\002\036Google::Cloud::Retail::V2alphab\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.retail.v2alpha.ModelProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2alpha_CreateModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor, + new java.lang.String[] { + "Parent", "Model", "DryRun", + }); + internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor, + new java.lang.String[] { + "Model", "UpdateMask", + }); + internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_retail_v2alpha_PauseModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_retail_v2alpha_ListModelsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_retail_v2alpha_ListModelsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor, + new java.lang.String[] { + "Models", "NextPageToken", + }); + internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_retail_v2alpha_TuneModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_retail_v2alpha_TuneModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2alpha.ModelProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java new file mode 100644 index 00000000..54eba04b --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java @@ -0,0 +1,966 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/export_config.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Output result.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.OutputResult} + */ +public final class OutputResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.OutputResult) + OutputResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputResult.newBuilder() to construct. + private OutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputResult() { + bigqueryResult_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bigqueryResult_.add( + input.readMessage( + com.google.cloud.retail.v2alpha.BigQueryOutputResult.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = java.util.Collections.unmodifiableList(bigqueryResult_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.OutputResult.class, + com.google.cloud.retail.v2alpha.OutputResult.Builder.class); + } + + public static final int BIGQUERY_RESULT_FIELD_NUMBER = 1; + private java.util.List bigqueryResult_; + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public java.util.List + getBigqueryResultList() { + return bigqueryResult_; + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public java.util.List + getBigqueryResultOrBuilderList() { + return bigqueryResult_; + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public int getBigqueryResultCount() { + return bigqueryResult_.size(); + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.BigQueryOutputResult getBigqueryResult(int index) { + return bigqueryResult_.get(index); + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder getBigqueryResultOrBuilder( + int index) { + return bigqueryResult_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < bigqueryResult_.size(); i++) { + output.writeMessage(1, bigqueryResult_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bigqueryResult_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bigqueryResult_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.OutputResult)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.OutputResult other = + (com.google.cloud.retail.v2alpha.OutputResult) obj; + + if (!getBigqueryResultList().equals(other.getBigqueryResultList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBigqueryResultCount() > 0) { + hash = (37 * hash) + BIGQUERY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryResultList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.OutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Output result.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.OutputResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.OutputResult) + com.google.cloud.retail.v2alpha.OutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.OutputResult.class, + com.google.cloud.retail.v2alpha.OutputResult.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.OutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBigqueryResultFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (bigqueryResultBuilder_ == null) { + bigqueryResult_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bigqueryResultBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ExportConfigProto + .internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResult getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResult build() { + com.google.cloud.retail.v2alpha.OutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResult buildPartial() { + com.google.cloud.retail.v2alpha.OutputResult result = + new com.google.cloud.retail.v2alpha.OutputResult(this); + int from_bitField0_ = bitField0_; + if (bigqueryResultBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = java.util.Collections.unmodifiableList(bigqueryResult_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bigqueryResult_ = bigqueryResult_; + } else { + result.bigqueryResult_ = bigqueryResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.OutputResult) { + return mergeFrom((com.google.cloud.retail.v2alpha.OutputResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.OutputResult other) { + if (other == com.google.cloud.retail.v2alpha.OutputResult.getDefaultInstance()) return this; + if (bigqueryResultBuilder_ == null) { + if (!other.bigqueryResult_.isEmpty()) { + if (bigqueryResult_.isEmpty()) { + bigqueryResult_ = other.bigqueryResult_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBigqueryResultIsMutable(); + bigqueryResult_.addAll(other.bigqueryResult_); + } + onChanged(); + } + } else { + if (!other.bigqueryResult_.isEmpty()) { + if (bigqueryResultBuilder_.isEmpty()) { + bigqueryResultBuilder_.dispose(); + bigqueryResultBuilder_ = null; + bigqueryResult_ = other.bigqueryResult_; + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryResultBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBigqueryResultFieldBuilder() + : null; + } else { + bigqueryResultBuilder_.addAllMessages(other.bigqueryResult_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.OutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.retail.v2alpha.OutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List bigqueryResult_ = + java.util.Collections.emptyList(); + + private void ensureBigqueryResultIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = + new java.util.ArrayList( + bigqueryResult_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.BigQueryOutputResult, + com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder, + com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder> + bigqueryResultBuilder_; + + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public java.util.List + getBigqueryResultList() { + if (bigqueryResultBuilder_ == null) { + return java.util.Collections.unmodifiableList(bigqueryResult_); + } else { + return bigqueryResultBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public int getBigqueryResultCount() { + if (bigqueryResultBuilder_ == null) { + return bigqueryResult_.size(); + } else { + return bigqueryResultBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2alpha.BigQueryOutputResult getBigqueryResult(int index) { + if (bigqueryResultBuilder_ == null) { + return bigqueryResult_.get(index); + } else { + return bigqueryResultBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder setBigqueryResult( + int index, com.google.cloud.retail.v2alpha.BigQueryOutputResult value) { + if (bigqueryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryResultIsMutable(); + bigqueryResult_.set(index, value); + onChanged(); + } else { + bigqueryResultBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder setBigqueryResult( + int index, com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder builderForValue) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.set(index, builderForValue.build()); + onChanged(); + } else { + bigqueryResultBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult(com.google.cloud.retail.v2alpha.BigQueryOutputResult value) { + if (bigqueryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(value); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult( + int index, com.google.cloud.retail.v2alpha.BigQueryOutputResult value) { + if (bigqueryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(index, value); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult( + com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder builderForValue) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(builderForValue.build()); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult( + int index, com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder builderForValue) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(index, builderForValue.build()); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addAllBigqueryResult( + java.lang.Iterable values) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bigqueryResult_); + onChanged(); + } else { + bigqueryResultBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder clearBigqueryResult() { + if (bigqueryResultBuilder_ == null) { + bigqueryResult_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bigqueryResultBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public Builder removeBigqueryResult(int index) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.remove(index); + onChanged(); + } else { + bigqueryResultBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder getBigqueryResultBuilder( + int index) { + return getBigqueryResultFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder getBigqueryResultOrBuilder( + int index) { + if (bigqueryResultBuilder_ == null) { + return bigqueryResult_.get(index); + } else { + return bigqueryResultBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public java.util.List + getBigqueryResultOrBuilderList() { + if (bigqueryResultBuilder_ != null) { + return bigqueryResultBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bigqueryResult_); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder addBigqueryResultBuilder() { + return getBigqueryResultFieldBuilder() + .addBuilder(com.google.cloud.retail.v2alpha.BigQueryOutputResult.getDefaultInstance()); + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder addBigqueryResultBuilder( + int index) { + return getBigqueryResultFieldBuilder() + .addBuilder( + index, com.google.cloud.retail.v2alpha.BigQueryOutputResult.getDefaultInstance()); + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + public java.util.List + getBigqueryResultBuilderList() { + return getBigqueryResultFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.BigQueryOutputResult, + com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder, + com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder> + getBigqueryResultFieldBuilder() { + if (bigqueryResultBuilder_ == null) { + bigqueryResultBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2alpha.BigQueryOutputResult, + com.google.cloud.retail.v2alpha.BigQueryOutputResult.Builder, + com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder>( + bigqueryResult_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bigqueryResult_ = null; + } + return bigqueryResultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.OutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.OutputResult) + private static final com.google.cloud.retail.v2alpha.OutputResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.OutputResult(); + } + + public static com.google.cloud.retail.v2alpha.OutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.OutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResultOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResultOrBuilder.java new file mode 100644 index 00000000..0382c712 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResultOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/export_config.proto + +package com.google.cloud.retail.v2alpha; + +public interface OutputResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.OutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + java.util.List getBigqueryResultList(); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + com.google.cloud.retail.v2alpha.BigQueryOutputResult getBigqueryResult(int index); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + int getBigqueryResultCount(); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + java.util.List + getBigqueryResultOrBuilderList(); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2alpha.BigQueryOutputResult bigquery_result = 1; + */ + com.google.cloud.retail.v2alpha.BigQueryOutputResultOrBuilder getBigqueryResultOrBuilder( + int index); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java new file mode 100644 index 00000000..df518a4f --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java @@ -0,0 +1,666 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request for pausing training of a model.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.PauseModelRequest} + */ +public final class PauseModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.PauseModelRequest) + PauseModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PauseModelRequest.newBuilder() to construct. + private PauseModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PauseModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PauseModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PauseModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_PauseModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.PauseModelRequest.class, + com.google.cloud.retail.v2alpha.PauseModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The name of the model to pause.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The name of the model to pause.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.PauseModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.PauseModelRequest other = + (com.google.cloud.retail.v2alpha.PauseModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.PauseModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request for pausing training of a model.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.PauseModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.PauseModelRequest) + com.google.cloud.retail.v2alpha.PauseModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_PauseModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.PauseModelRequest.class, + com.google.cloud.retail.v2alpha.PauseModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.PauseModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.PauseModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.PauseModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.PauseModelRequest build() { + com.google.cloud.retail.v2alpha.PauseModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.PauseModelRequest buildPartial() { + com.google.cloud.retail.v2alpha.PauseModelRequest result = + new com.google.cloud.retail.v2alpha.PauseModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.PauseModelRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.PauseModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.PauseModelRequest other) { + if (other == com.google.cloud.retail.v2alpha.PauseModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.PauseModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.PauseModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The name of the model to pause.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The name of the model to pause.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The name of the model to pause.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The name of the model to pause.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The name of the model to pause.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.PauseModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.PauseModelRequest) + private static final com.google.cloud.retail.v2alpha.PauseModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.PauseModelRequest(); + } + + public static com.google.cloud.retail.v2alpha.PauseModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PauseModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PauseModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.PauseModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequestOrBuilder.java new file mode 100644 index 00000000..a3e021d6 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface PauseModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.PauseModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the model to pause.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The name of the model to pause.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java index b4516184..eb96c0f4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java @@ -202,13 +202,18 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -232,13 +237,18 @@ public java.lang.String getPlacement() { * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -268,6 +278,15 @@ public com.google.protobuf.ByteString getPlacementBytes() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. *
    * * @@ -288,6 +307,15 @@ public boolean hasUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. *
    * * @@ -310,6 +338,15 @@ public com.google.cloud.retail.v2alpha.UserEvent getUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. *
    * * @@ -348,14 +385,17 @@ public int getPageSize() { * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return The pageToken. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -371,14 +411,17 @@ public java.lang.String getPageToken() { * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return The bytes for pageToken. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -420,6 +463,12 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) *
    * * string filter = 5; @@ -465,6 +514,12 @@ public java.lang.String getFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) *
    * * string filter = 5; @@ -560,6 +615,8 @@ public int getParamsCount() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -604,6 +661,8 @@ public java.util.Map getParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -639,6 +698,8 @@ public java.util.Map getParamsMap() * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -679,6 +740,8 @@ public com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -728,7 +791,7 @@ public int getLabelsCount() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -764,7 +827,7 @@ public java.util.Map getLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -791,7 +854,7 @@ public java.util.Map getLabelsMap() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -822,7 +885,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -1330,13 +1393,18 @@ public Builder mergeFrom( * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1359,13 +1427,18 @@ public java.lang.String getPlacement() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1388,13 +1461,18 @@ public com.google.protobuf.ByteString getPlacementBytes() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1416,13 +1494,18 @@ public Builder setPlacement(java.lang.String value) { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1440,13 +1523,18 @@ public Builder clearPlacement() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1479,6 +1567,15 @@ public Builder setPlacementBytes(com.google.protobuf.ByteString value) { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1498,6 +1595,15 @@ public boolean hasUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1523,6 +1629,15 @@ public com.google.cloud.retail.v2alpha.UserEvent getUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1550,6 +1665,15 @@ public Builder setUserEvent(com.google.cloud.retail.v2alpha.UserEvent value) { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1574,6 +1698,15 @@ public Builder setUserEvent(com.google.cloud.retail.v2alpha.UserEvent.Builder bu * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1605,6 +1738,15 @@ public Builder mergeUserEvent(com.google.cloud.retail.v2alpha.UserEvent value) { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1630,6 +1772,15 @@ public Builder clearUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1649,6 +1800,15 @@ public com.google.cloud.retail.v2alpha.UserEvent.Builder getUserEventBuilder() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1672,6 +1832,15 @@ public com.google.cloud.retail.v2alpha.UserEventOrBuilder getUserEventOrBuilder( * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -1761,13 +1930,16 @@ public Builder clearPageSize() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return The pageToken. */ + @java.lang.Deprecated public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { @@ -1783,13 +1955,16 @@ public java.lang.String getPageToken() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return The bytes for pageToken. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { @@ -1805,14 +1980,17 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @param value The pageToken to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -1826,13 +2004,16 @@ public Builder setPageToken(java.lang.String value) { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); @@ -1843,14 +2024,17 @@ public Builder clearPageToken() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @param value The bytes for pageToken to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1890,6 +2074,12 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -1934,6 +2124,12 @@ public java.lang.String getFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -1978,6 +2174,12 @@ public com.google.protobuf.ByteString getFilterBytes() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2021,6 +2223,12 @@ public Builder setFilter(java.lang.String value) { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2060,6 +2268,12 @@ public Builder clearFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2192,6 +2406,8 @@ public int getParamsCount() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2236,6 +2452,8 @@ public java.util.Map getParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2271,6 +2489,8 @@ public java.util.Map getParamsMap() * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2311,6 +2531,8 @@ public com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2358,6 +2580,8 @@ public Builder clearParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2401,6 +2625,8 @@ public java.util.Map getMutablePara * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2443,6 +2669,8 @@ public Builder putParams(java.lang.String key, com.google.protobuf.Value value) * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2485,7 +2713,7 @@ public int getLabelsCount() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2521,7 +2749,7 @@ public java.util.Map getLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2548,7 +2776,7 @@ public java.util.Map getLabelsMap() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2580,7 +2808,7 @@ public java.lang.String getLabelsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2619,7 +2847,7 @@ public Builder clearLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2654,7 +2882,7 @@ public java.util.Map getMutableLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2688,7 +2916,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequestOrBuilder.java index f3423fbc..e9243f49 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequestOrBuilder.java @@ -28,13 +28,18 @@ public interface PredictRequestOrBuilder * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -47,13 +52,18 @@ public interface PredictRequestOrBuilder * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -70,6 +80,15 @@ public interface PredictRequestOrBuilder * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -87,6 +106,15 @@ public interface PredictRequestOrBuilder * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -104,6 +132,15 @@ public interface PredictRequestOrBuilder * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + * same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. * * * @@ -132,25 +169,31 @@ public interface PredictRequestOrBuilder * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return The pageToken. */ + @java.lang.Deprecated java.lang.String getPageToken(); /** * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2alpha.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2alpha/prediction_service.proto;l=94 * @return The bytes for pageToken. */ + @java.lang.Deprecated com.google.protobuf.ByteString getPageTokenBytes(); /** @@ -180,6 +223,12 @@ public interface PredictRequestOrBuilder * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -214,6 +263,12 @@ public interface PredictRequestOrBuilder * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -265,6 +320,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -297,6 +354,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -332,6 +391,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -364,6 +425,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -401,6 +464,8 @@ com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -415,7 +480,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -439,7 +504,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -466,7 +531,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -490,7 +555,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -519,7 +584,7 @@ java.lang.String getLabelsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java index 52e570d5..1f64a370 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java @@ -187,9 +187,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -202,9 +202,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -220,9 +220,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -235,9 +235,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -255,9 +255,9 @@ com.google.protobuf.Value getMetadataOrDefault( *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -471,9 +471,9 @@ public int getMetadataCount() { *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -498,9 +498,9 @@ public java.util.Map getMetadata() *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -516,9 +516,9 @@ public java.util.Map getMetadataMap *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -540,9 +540,9 @@ public com.google.protobuf.Value getMetadataOrDefault( *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -1076,9 +1076,9 @@ public int getMetadataCount() { *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1103,9 +1103,9 @@ public java.util.Map getMetadata() *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1121,9 +1121,9 @@ public java.util.Map getMetadataMap *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1145,9 +1145,9 @@ public com.google.protobuf.Value getMetadataOrDefault( *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1176,9 +1176,9 @@ public Builder clearMetadata() { *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1202,9 +1202,9 @@ public java.util.Map getMutableMeta *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1227,9 +1227,9 @@ public Builder putMetadata(java.lang.String key, com.google.protobuf.Value value *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceProto.java index d5a84b10..cb5bcab8 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceProto.java @@ -64,42 +64,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_service.proto\022\033google.cloud.retail.v2al" + "pha\032\034google/api/annotations.proto\032\027googl" + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032,google/cloud/retail/v2alpha" - + "/user_event.proto\032\034google/protobuf/struc" - + "t.proto\"\277\003\n\016PredictRequest\022\026\n\tplacement\030" - + "\001 \001(\tB\003\340A\002\022?\n\nuser_event\030\002 \001(\0132&.google." - + "cloud.retail.v2alpha.UserEventB\003\340A\002\022\021\n\tp" - + "age_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\016\n\006fi" - + "lter\030\005 \001(\t\022\025\n\rvalidate_only\030\006 \001(\010\022G\n\006par" - + "ams\030\007 \003(\01327.google.cloud.retail.v2alpha." - + "PredictRequest.ParamsEntry\022G\n\006labels\030\010 \003" - + "(\01327.google.cloud.retail.v2alpha.Predict" - + "Request.LabelsEntry\032E\n\013ParamsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf" - + ".Value:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001\"\361\002\n\017PredictResponse\022N\n" - + "\007results\030\001 \003(\0132=.google.cloud.retail.v2a" - + "lpha.PredictResponse.PredictionResult\022\031\n" - + "\021attribution_token\030\002 \001(\t\022\023\n\013missing_ids\030" - + "\003 \003(\t\022\025\n\rvalidate_only\030\004 \001(\010\032\306\001\n\020Predict" - + "ionResult\022\n\n\002id\030\001 \001(\t\022]\n\010metadata\030\002 \003(\0132" - + "K.google.cloud.retail.v2alpha.PredictRes" - + "ponse.PredictionResult.MetadataEntry\032G\n\r" - + "MetadataEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(" - + "\0132\026.google.protobuf.Value:\0028\0012\235\002\n\021Predic" - + "tionService\022\274\001\n\007Predict\022+.google.cloud.r" - + "etail.v2alpha.PredictRequest\032,.google.cl" - + "oud.retail.v2alpha.PredictResponse\"V\202\323\344\223" - + "\002P\"K/v2alpha/{placement=projects/*/locat" - + "ions/*/catalogs/*/placements/*}:predict:" - + "\001*\032I\312A\025retail.googleapis.com\322A.https://w" - + "ww.googleapis.com/auth/cloud-platformB\344\001" - + "\n\037com.google.cloud.retail.v2alphaB\026Predi" - + "ctionServiceProtoP\001ZAgoogle.golang.org/g" - + "enproto/googleapis/cloud/retail/v2alpha;" - + "retail\242\002\006RETAIL\252\002\033Google.Cloud.Retail.V2" - + "Alpha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036Go" - + "ogle::Cloud::Retail::V2alphab\006proto3" + + "avior.proto\032\031google/api/resource.proto\032," + + "google/cloud/retail/v2alpha/user_event.p" + + "roto\032\034google/protobuf/struct.proto\"\303\003\n\016P" + + "redictRequest\022\026\n\tplacement\030\001 \001(\tB\003\340A\002\022?\n" + + "\nuser_event\030\002 \001(\0132&.google.cloud.retail." + + "v2alpha.UserEventB\003\340A\002\022\021\n\tpage_size\030\003 \001(" + + "\005\022\026\n\npage_token\030\004 \001(\tB\002\030\001\022\016\n\006filter\030\005 \001(" + + "\t\022\025\n\rvalidate_only\030\006 \001(\010\022G\n\006params\030\007 \003(\013" + + "27.google.cloud.retail.v2alpha.PredictRe" + + "quest.ParamsEntry\022G\n\006labels\030\010 \003(\01327.goog" + + "le.cloud.retail.v2alpha.PredictRequest.L" + + "abelsEntry\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%" + + "\n\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028" + + "\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\361\002\n\017PredictResponse\022N\n\007results\030" + + "\001 \003(\0132=.google.cloud.retail.v2alpha.Pred" + + "ictResponse.PredictionResult\022\031\n\021attribut" + + "ion_token\030\002 \001(\t\022\023\n\013missing_ids\030\003 \003(\t\022\025\n\r" + + "validate_only\030\004 \001(\010\032\306\001\n\020PredictionResult" + + "\022\n\n\002id\030\001 \001(\t\022]\n\010metadata\030\002 \003(\0132K.google." + + "cloud.retail.v2alpha.PredictResponse.Pre" + + "dictionResult.MetadataEntry\032G\n\rMetadataE" + + "ntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.googl" + + "e.protobuf.Value:\0028\0012\365\002\n\021PredictionServi" + + "ce\022\224\002\n\007Predict\022+.google.cloud.retail.v2a" + + "lpha.PredictRequest\032,.google.cloud.retai" + + "l.v2alpha.PredictResponse\"\255\001\202\323\344\223\002\246\001\"K/v2" + + "alpha/{placement=projects/*/locations/*/" + + "catalogs/*/placements/*}:predict:\001*ZT\"O/" + + "v2alpha/{placement=projects/*/locations/" + + "*/catalogs/*/servingConfigs/*}:predict:\001" + + "*\032I\312A\025retail.googleapis.com\322A.https://ww" + + "w.googleapis.com/auth/cloud-platformB\344\001\n" + + "\037com.google.cloud.retail.v2alphaB\026Predic" + + "tionServiceProtoP\001ZAgoogle.golang.org/ge" + + "nproto/googleapis/cloud/retail/v2alpha;r" + + "etail\242\002\006RETAIL\252\002\033Google.Cloud.Retail.V2A" + + "lpha\312\002\033Google\\Cloud\\Retail\\V2alpha\352\002\036Goo" + + "gle::Cloud::Retail::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -108,6 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.retail.v2alpha.UserEventProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); @@ -185,6 +189,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.retail.v2alpha.UserEventProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java index 0e118ccf..bc87f918 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java @@ -1503,7 +1503,11 @@ public float getPrice() { * *
        * Price of the product without any discount. If zero, by default set to be
    -   * the [price][google.cloud.retail.v2alpha.PriceInfo.price].
    +   * the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set,
    +   * [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price]
    +   * should be greater than or equal to
    +   * [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an
    +   * INVALID_ARGUMENT error is thrown.
        * 
    * * float original_price = 3; @@ -2458,7 +2462,11 @@ public Builder clearPrice() { * *
          * Price of the product without any discount. If zero, by default set to be
    -     * the [price][google.cloud.retail.v2alpha.PriceInfo.price].
    +     * the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set,
    +     * [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price]
    +     * should be greater than or equal to
    +     * [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an
    +     * INVALID_ARGUMENT error is thrown.
          * 
    * * float original_price = 3; @@ -2474,7 +2482,11 @@ public float getOriginalPrice() { * *
          * Price of the product without any discount. If zero, by default set to be
    -     * the [price][google.cloud.retail.v2alpha.PriceInfo.price].
    +     * the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set,
    +     * [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price]
    +     * should be greater than or equal to
    +     * [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an
    +     * INVALID_ARGUMENT error is thrown.
          * 
    * * float original_price = 3; @@ -2493,7 +2505,11 @@ public Builder setOriginalPrice(float value) { * *
          * Price of the product without any discount. If zero, by default set to be
    -     * the [price][google.cloud.retail.v2alpha.PriceInfo.price].
    +     * the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set,
    +     * [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price]
    +     * should be greater than or equal to
    +     * [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an
    +     * INVALID_ARGUMENT error is thrown.
          * 
    * * float original_price = 3; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfoOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfoOrBuilder.java index b60e35f3..3007ad3c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfoOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfoOrBuilder.java @@ -89,7 +89,11 @@ public interface PriceInfoOrBuilder * *
        * Price of the product without any discount. If zero, by default set to be
    -   * the [price][google.cloud.retail.v2alpha.PriceInfo.price].
    +   * the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set,
    +   * [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price]
    +   * should be greater than or equal to
    +   * [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an
    +   * INVALID_ARGUMENT error is thrown.
        * 
    * * float original_price = 3; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java index 0ed408fe..612ec780 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java @@ -3544,10 +3544,10 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -3604,10 +3604,10 @@ public boolean hasRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -3666,10 +3666,10 @@ public com.google.protobuf.FieldMask getRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12390,10 +12390,10 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12449,10 +12449,10 @@ public boolean hasRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12514,10 +12514,10 @@ public com.google.protobuf.FieldMask getRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12581,10 +12581,10 @@ public Builder setRetrievableFields(com.google.protobuf.FieldMask value) { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12645,10 +12645,10 @@ public Builder setRetrievableFields(com.google.protobuf.FieldMask.Builder builde * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12716,10 +12716,10 @@ public Builder mergeRetrievableFields(com.google.protobuf.FieldMask value) { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12781,10 +12781,10 @@ public Builder clearRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12840,10 +12840,10 @@ public com.google.protobuf.FieldMask.Builder getRetrievableFieldsBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -12903,10 +12903,10 @@ public com.google.protobuf.FieldMaskOrBuilder getRetrievableFieldsOrBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java index 2010f15e..69047a67 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java @@ -136,10 +136,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -147,8 +147,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -180,10 +180,10 @@ public java.lang.String getIngestionProductType() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -191,8 +191,8 @@ public java.lang.String getIngestionProductType() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -232,8 +232,8 @@ public com.google.protobuf.ByteString getIngestionProductTypeBytes() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -270,8 +270,8 @@ public java.lang.String getMerchantCenterProductIdField() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -643,10 +643,10 @@ public Builder mergeFrom( * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -654,8 +654,8 @@ public Builder mergeFrom( * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -686,10 +686,10 @@ public java.lang.String getIngestionProductType() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -697,8 +697,8 @@ public java.lang.String getIngestionProductType() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -729,10 +729,10 @@ public com.google.protobuf.ByteString getIngestionProductTypeBytes() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -740,8 +740,8 @@ public com.google.protobuf.ByteString getIngestionProductTypeBytes() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -771,10 +771,10 @@ public Builder setIngestionProductType(java.lang.String value) { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -782,8 +782,8 @@ public Builder setIngestionProductType(java.lang.String value) { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -809,10 +809,10 @@ public Builder clearIngestionProductType() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -820,8 +820,8 @@ public Builder clearIngestionProductType() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -859,8 +859,8 @@ public Builder setIngestionProductTypeBytes(com.google.protobuf.ByteString value * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -896,8 +896,8 @@ public java.lang.String getMerchantCenterProductIdField() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -933,8 +933,8 @@ public com.google.protobuf.ByteString getMerchantCenterProductIdFieldBytes() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -969,8 +969,8 @@ public Builder setMerchantCenterProductIdField(java.lang.String value) { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -1001,8 +1001,8 @@ public Builder clearMerchantCenterProductIdField() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfigOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfigOrBuilder.java index 283a4e13..fc306bab 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfigOrBuilder.java @@ -35,10 +35,10 @@ public interface ProductLevelConfigOrBuilder * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -46,8 +46,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -68,10 +68,10 @@ public interface ProductLevelConfigOrBuilder * default to * [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2alpha.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2alpha.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -79,8 +79,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -107,8 +107,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -134,8 +134,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java index 494811a7..633205ed 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductOrBuilder.java @@ -2058,10 +2058,10 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -2115,10 +2115,10 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * @@ -2172,10 +2172,10 @@ com.google.cloud.retail.v2alpha.CustomAttribute getAttributesOrDefault( * following fields are always returned in by default: * * [name][google.cloud.retail.v2alpha.Product.name] * * [color_info][google.cloud.retail.v2alpha.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase * response payload size and serving latency. * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeConfigProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeConfigProto.java index 0c8bf340..24f36b8c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeConfigProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeConfigProto.java @@ -74,16 +74,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ilter\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"f\n\025Purge" + "ProductsResponse\022\023\n\013purge_count\030\001 \001(\003\0228\n" + "\014purge_sample\030\002 \003(\tB\"\372A\037\n\035retail.googlea" - + "pis.com/Product\"Q\n\026PurgeUserEventsReques" - + "t\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\023\n\006filter\030\002 \001(\tB\003" - + "\340A\002\022\r\n\005force\030\003 \001(\010\"6\n\027PurgeUserEventsRes" - + "ponse\022\033\n\023purged_events_count\030\001 \001(\003B\336\001\n\037c" - + "om.google.cloud.retail.v2alphaB\020PurgeCon" - + "figProtoP\001ZAgoogle.golang.org/genproto/g" - + "oogleapis/cloud/retail/v2alpha;retail\242\002\006" - + "RETAIL\252\002\033Google.Cloud.Retail.V2Alpha\312\002\033G" - + "oogle\\Cloud\\Retail\\V2alpha\352\002\036Google::Clo" - + "ud::Retail::V2alphab\006proto3" + + "pis.com/Product\"s\n\026PurgeUserEventsReques" + + "t\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035retail.google" + + "apis.com/Catalog\022\023\n\006filter\030\002 \001(\tB\003\340A\002\022\r\n" + + "\005force\030\003 \001(\010\"6\n\027PurgeUserEventsResponse\022" + + "\033\n\023purged_events_count\030\001 \001(\003B\336\001\n\037com.goo" + + "gle.cloud.retail.v2alphaB\020PurgeConfigPro" + + "toP\001ZAgoogle.golang.org/genproto/googlea" + + "pis/cloud/retail/v2alpha;retail\242\002\006RETAIL" + + "\252\002\033Google.Cloud.Retail.V2Alpha\312\002\033Google\\" + + "Cloud\\Retail\\V2alpha\352\002\036Google::Cloud::Re" + + "tail::V2alphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java index 1f242169..ca4afb0c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java @@ -137,7 +137,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -162,7 +164,9 @@ public java.lang.String getParent() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -646,7 +650,9 @@ public Builder mergeFrom( * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -670,7 +676,9 @@ public java.lang.String getParent() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -694,7 +702,9 @@ public com.google.protobuf.ByteString getParentBytes() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -717,7 +727,9 @@ public Builder setParent(java.lang.String value) { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -736,7 +748,9 @@ public Builder clearParent() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequestOrBuilder.java index df635b3d..f324a12a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface PurgeUserEventsRequestOrBuilder * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -46,7 +48,9 @@ public interface PurgeUserEventsRequestOrBuilder * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RecommendationsFilteringOption.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RecommendationsFilteringOption.java new file mode 100644 index 00000000..b3c4be1c --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RecommendationsFilteringOption.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/common.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * If filtering for recommendations is enabled.
    + * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.RecommendationsFilteringOption} + */ +public enum RecommendationsFilteringOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +   * Value used when unset.
    +   * In this case, server behavior defaults to
    +   * [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2alpha.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED].
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0; + */ + RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED(0), + /** + * + * + *
    +   * Recommendation filtering is disabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_DISABLED = 1; + */ + RECOMMENDATIONS_FILTERING_DISABLED(1), + /** + * + * + *
    +   * Recommendation filtering is enabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_ENABLED = 3; + */ + RECOMMENDATIONS_FILTERING_ENABLED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +   * Value used when unset.
    +   * In this case, server behavior defaults to
    +   * [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2alpha.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED].
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0; + */ + public static final int RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +   * Recommendation filtering is disabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_DISABLED = 1; + */ + public static final int RECOMMENDATIONS_FILTERING_DISABLED_VALUE = 1; + /** + * + * + *
    +   * Recommendation filtering is enabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_ENABLED = 3; + */ + public static final int RECOMMENDATIONS_FILTERING_ENABLED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RecommendationsFilteringOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RecommendationsFilteringOption forNumber(int value) { + switch (value) { + case 0: + return RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED; + case 1: + return RECOMMENDATIONS_FILTERING_DISABLED; + case 3: + return RECOMMENDATIONS_FILTERING_ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RecommendationsFilteringOption findValueByNumber(int number) { + return RecommendationsFilteringOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.CommonProto.getDescriptor().getEnumTypes().get(2); + } + + private static final RecommendationsFilteringOption[] VALUES = values(); + + public static RecommendationsFilteringOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RecommendationsFilteringOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.RecommendationsFilteringOption) +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java index 44d4c699..db3cd81a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java @@ -130,7 +130,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -156,7 +156,7 @@ public java.lang.String getAttributesConfig() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -575,7 +575,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -600,7 +600,7 @@ public java.lang.String getAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -625,7 +625,7 @@ public com.google.protobuf.ByteString getAttributesConfigBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -649,7 +649,7 @@ public Builder setAttributesConfig(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -669,7 +669,7 @@ public Builder clearAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequestOrBuilder.java index b77ddcac..70a2549a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface RemoveCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface RemoveCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java index 77229477..c8a3d966 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the RemoveFulfillmentPlaces operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [RemoveFulfillmentPlaces][] method.
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata} @@ -264,7 +265,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the RemoveFulfillmentPlaces operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [RemoveFulfillmentPlaces][] method.
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java index bda7f931..c72fd58c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [RemoveFulfillmentPlaces][] method.
    + * Request message for
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest} @@ -240,7 +242,8 @@ public com.google.protobuf.ByteString getProductBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -277,7 +280,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -677,7 +681,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [RemoveFulfillmentPlaces][] method.
    +   * Request message for
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest} @@ -1042,7 +1048,8 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1078,7 +1085,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1114,7 +1122,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1149,7 +1158,8 @@ public Builder setType(java.lang.String value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1180,7 +1190,8 @@ public Builder clearType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequestOrBuilder.java index dc278ee3..f5446d17 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequestOrBuilder.java @@ -80,7 +80,8 @@ public interface RemoveFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -106,7 +107,8 @@ public interface RemoveFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java index 3686cdb3..c329d6c2 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
    - * is no meaningful response populated from the [RemoveFulfillmentPlaces][]
    + * is no meaningful response populated from the
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
      * method.
      * 
    * @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
    -   * is no meaningful response populated from the [RemoveFulfillmentPlaces][]
    +   * is no meaningful response populated from the
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java index 7b4b0571..b735b3f3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the RemoveLocalInventories operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [RemoveLocalInventories][] method.
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata} @@ -264,7 +265,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the RemoveLocalInventories operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [RemoveLocalInventories][] method.
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java index ad311792..3c0ff764 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [RemoveLocalInventories][] method.
    + * Request message for
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest} @@ -554,7 +556,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [RemoveLocalInventories][] method.
    +   * Request message for
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java index 3f87f011..445c0a2f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java @@ -22,8 +22,11 @@ * * *
    - * Response of the [RemoveLocalInventories][] API.  Currently empty because
    - * there is no meaningful response populated from the [RemoveLocalInventories][]
    + * Response of the
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
    + * API.  Currently empty because there is no meaningful response populated from
    + * the
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
      * method.
      * 
    * @@ -262,8 +265,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Response of the [RemoveLocalInventories][] API.  Currently empty because
    -   * there is no meaningful response populated from the [RemoveLocalInventories][]
    +   * Response of the
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
    +   * API.  Currently empty because there is no meaningful response populated from
    +   * the
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java index 69c73d13..5cdfe144 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java @@ -154,7 +154,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -180,7 +180,7 @@ public java.lang.String getAttributesConfig() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -703,7 +703,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -728,7 +728,7 @@ public java.lang.String getAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -753,7 +753,7 @@ public com.google.protobuf.ByteString getAttributesConfigBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -777,7 +777,7 @@ public Builder setAttributesConfig(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -797,7 +797,7 @@ public Builder clearAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequestOrBuilder.java index 8cceeda0..12be5aa3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ReplaceCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface ReplaceCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java new file mode 100644 index 00000000..a1a87233 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request for resuming training of a model.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.ResumeModelRequest} + */ +public final class ResumeModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.ResumeModelRequest) + ResumeModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResumeModelRequest.newBuilder() to construct. + private ResumeModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResumeModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResumeModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResumeModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ResumeModelRequest.class, + com.google.cloud.retail.v2alpha.ResumeModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The name of the model to resume.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The name of the model to resume.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.ResumeModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.ResumeModelRequest other = + (com.google.cloud.retail.v2alpha.ResumeModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.ResumeModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request for resuming training of a model.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.ResumeModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.ResumeModelRequest) + com.google.cloud.retail.v2alpha.ResumeModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.ResumeModelRequest.class, + com.google.cloud.retail.v2alpha.ResumeModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.ResumeModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ResumeModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.ResumeModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ResumeModelRequest build() { + com.google.cloud.retail.v2alpha.ResumeModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ResumeModelRequest buildPartial() { + com.google.cloud.retail.v2alpha.ResumeModelRequest result = + new com.google.cloud.retail.v2alpha.ResumeModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.ResumeModelRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.ResumeModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.ResumeModelRequest other) { + if (other == com.google.cloud.retail.v2alpha.ResumeModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.ResumeModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.ResumeModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The name of the model to resume.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The name of the model to resume.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The name of the model to resume.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The name of the model to resume.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The name of the model to resume.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.ResumeModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.ResumeModelRequest) + private static final com.google.cloud.retail.v2alpha.ResumeModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.ResumeModelRequest(); + } + + public static com.google.cloud.retail.v2alpha.ResumeModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResumeModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResumeModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.ResumeModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequestOrBuilder.java new file mode 100644 index 00000000..c398d890 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface ResumeModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.ResumeModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the model to resume.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The name of the model to resume.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java index 8b1db61c..269303c5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java @@ -1257,10 +1257,13 @@ public interface FilterActionOrBuilder * *
        * * Rule Condition:
    -   *   - No [Condition][query_terms] provided is a global match.
    -   *   - 1 or more [Condition][query_terms] provided is combined with OR
    -   *   operator.
    -   * * Action Input: The request query and filter that will be applied to the
    +   *   - No
    +   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
    +   *   provided is a global match.
    +   *   - 1 or more
    +   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
    +   *   provided are combined with OR operator.
    +   * * Action Input: The request query and filter that are applied to the
        * retrieved products, in addition to any filters already provided with the
        * SearchRequest. The AND operator is used to combine the query's existing
        * filters with the filter rule(s). NOTE: May result in 0 results when
    @@ -1597,10 +1600,13 @@ protected Builder newBuilderForType(
          *
          * 
          * * Rule Condition:
    -     *   - No [Condition][query_terms] provided is a global match.
    -     *   - 1 or more [Condition][query_terms] provided is combined with OR
    -     *   operator.
    -     * * Action Input: The request query and filter that will be applied to the
    +     *   - No
    +     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
    +     *   provided is a global match.
    +     *   - 1 or more
    +     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]
    +     *   provided are combined with OR operator.
    +     * * Action Input: The request query and filter that are applied to the
          * retrieved products, in addition to any filters already provided with the
          * SearchRequest. The AND operator is used to combine the query's existing
          * filters with the filter rule(s). NOTE: May result in 0 results when
    @@ -2023,7 +2029,8 @@ public interface RedirectActionOrBuilder
        * 
        * Redirects a shopper to a specific page.
        * * Rule Condition:
    -   *   - Must specify [Condition][query_terms].
    +   *   - Must specify
    +   *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms].
        * * Action Input: Request Query
        * * Action Result: Redirects shopper to provided uri.
        * 
    @@ -2332,7 +2339,8 @@ protected Builder newBuilderForType( *
          * Redirects a shopper to a specific page.
          * * Rule Condition:
    -     *   - Must specify [Condition][query_terms].
    +     *   - Must specify
    +     *   [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms].
          * * Action Input: Request Query
          * * Action Result: Redirects shopper to provided uri.
          * 
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java index 0986968e..c09114b9 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java @@ -284,6 +284,37 @@ private SearchRequest( personalizationSpec_ = subBuilder.buildPartial(); } + break; + } + case 274: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 282: + { + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder subBuilder = + null; + if (((bitField0_ & 0x00000001) != 0)) { + subBuilder = spellCorrectionSpec_.toBuilder(); + } + spellCorrectionSpec_ = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(spellCorrectionSpec_); + spellCorrectionSpec_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; break; } default: @@ -321,6 +352,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 34: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -347,7 +389,7 @@ public enum RelevanceThreshold implements com.google.protobuf.ProtocolMessageEnu * * *
    -     * Default value. Defaults to
    +     * Default value. In this case, server behavior defaults to
          * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH].
          * 
    * @@ -401,7 +443,7 @@ public enum RelevanceThreshold implements com.google.protobuf.ProtocolMessageEnu * * *
    -     * Default value. Defaults to
    +     * Default value. In this case, server behavior defaults to
          * [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH].
          * 
    * @@ -584,7 +626,9 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { *
          * Only faceted search will be performed. The product search will be
          * disabled.
    -     * When in this mode, one or both of [SearchRequest.facet_spec][] and
    +     * When in this mode, one or both of
    +     * [SearchRequest.facet_specs][google.cloud.retail.v2alpha.SearchRequest.facet_specs]
    +     * and
          * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec]
          * should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
          * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
    @@ -632,7 +676,9 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum {
          * 
          * Only faceted search will be performed. The product search will be
          * disabled.
    -     * When in this mode, one or both of [SearchRequest.facet_spec][] and
    +     * When in this mode, one or both of
    +     * [SearchRequest.facet_specs][google.cloud.retail.v2alpha.SearchRequest.facet_specs]
    +     * and
          * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec]
          * should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
          * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
    @@ -797,14 +843,22 @@ public interface FacetSpecOrBuilder
          * By default,
          * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
          * is not excluded from the filter unless it is listed in this field.
    -     * For example, suppose there are 100 products with color facet "Red" and
    -     * 200 products with color facet "Blue". A query containing the filter
    -     * "colorFamilies:ANY("Red")" and have "colorFamilies" as
    +     * Listing a facet key in this field allows its values to appear as facet
    +     * results, even when they are filtered out of search results. Using this
    +     * field does not affect what search results are returned.
    +     * For example, suppose there are 100 products with the color facet "Red"
    +     * and 200 products with the color facet "Blue". A query containing the
    +     * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as
          * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    -     * will by default return the "Red" with count 100.
    -     * If this field contains "colorFamilies", then the query returns both the
    -     * "Red" with count 100 and "Blue" with count 200, because the
    -     * "colorFamilies" key is now excluded from the filter.
    +     * would by default return only "Red" products in the search results, and
    +     * also return "Red" with count 100 as the only color facet. Although there
    +     * are also blue products available, "Blue" would not be shown as an
    +     * available facet value.
    +     * If "colorFamilies" is listed in "excludedFilterKeys", then the query
    +     * returns the facet values "Red" with count 100 and "Blue" with count
    +     * 200, because the "colorFamilies" key is now excluded from the filter.
    +     * Because this field doesn't affect search results, the search results
    +     * are still correctly filtered to return only "Red" products.
          * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
          * is returned.
          * 
    @@ -822,14 +876,22 @@ public interface FacetSpecOrBuilder * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -847,14 +909,22 @@ public interface FacetSpecOrBuilder * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -873,14 +943,22 @@ public interface FacetSpecOrBuilder * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -1229,8 +1307,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1255,8 +1333,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1281,8 +1359,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1308,8 +1386,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1467,11 +1545,29 @@ public interface FacetKeyOrBuilder * * *
    -       * The order in which [Facet.values][] are returned.
    +       * True to make facet keys case insensitive when getting faceting
    +       * values with prefixes or contains; false otherwise.
    +       * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + boolean getCaseInsensitive(); + + /** + * + * + *
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -1492,11 +1588,15 @@ public interface FacetKeyOrBuilder
            *
            *
            * 
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -1526,9 +1626,11 @@ public interface FacetKeyOrBuilder
            * on
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -1556,9 +1658,11 @@ public interface FacetKeyOrBuilder
            * on
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -1574,6 +1678,20 @@ public interface FacetKeyOrBuilder
            * @return The bytes for query.
            */
           com.google.protobuf.ByteString getQueryBytes();
    +
    +      /**
    +       *
    +       *
    +       * 
    +       * Returns the min and max value for each numerical facet intervals.
    +       * Ignored for textual facets.
    +       * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + boolean getReturnMinMax(); } /** * @@ -1697,6 +1815,16 @@ private FacetKey( contains_.add(s); break; } + case 80: + { + caseInsensitive_ = input.readBool(); + break; + } + case 88: + { + returnMinMax_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -1957,8 +2085,8 @@ public com.google.cloud.retail.v2alpha.IntervalOrBuilder getIntervalsOrBuilder(i * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1985,8 +2113,8 @@ public com.google.protobuf.ProtocolStringList getRestrictedValuesList() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -2013,8 +2141,8 @@ public int getRestrictedValuesCount() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -2042,8 +2170,8 @@ public java.lang.String getRestrictedValues(int index) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -2219,17 +2347,40 @@ public com.google.protobuf.ByteString getContainsBytes(int index) { return contains_.getByteString(index); } + public static final int CASE_INSENSITIVE_FIELD_NUMBER = 10; + private boolean caseInsensitive_; + /** + * + * + *
    +       * True to make facet keys case insensitive when getting faceting
    +       * values with prefixes or contains; false otherwise.
    +       * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + public static final int ORDER_BY_FIELD_NUMBER = 4; private volatile java.lang.Object orderBy_; /** * * *
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -2261,11 +2412,15 @@ public java.lang.String getOrderBy() {
            *
            *
            * 
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -2308,9 +2463,11 @@ public com.google.protobuf.ByteString getOrderByBytes() {
            * on
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -2349,9 +2506,11 @@ public java.lang.String getQuery() {
            * on
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -2379,6 +2538,25 @@ public com.google.protobuf.ByteString getQueryBytes() {
             }
           }
     
    +      public static final int RETURN_MIN_MAX_FIELD_NUMBER = 11;
    +      private boolean returnMinMax_;
    +      /**
    +       *
    +       *
    +       * 
    +       * Returns the min and max value for each numerical facet intervals.
    +       * Ignored for textual facets.
    +       * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + @java.lang.Override + public boolean getReturnMinMax() { + return returnMinMax_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2415,6 +2593,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < contains_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, contains_.getRaw(i)); } + if (caseInsensitive_ != false) { + output.writeBool(10, caseInsensitive_); + } + if (returnMinMax_ != false) { + output.writeBool(11, returnMinMax_); + } unknownFields.writeTo(output); } @@ -2460,6 +2644,12 @@ public int getSerializedSize() { size += dataSize; size += 1 * getContainsList().size(); } + if (caseInsensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, caseInsensitive_); + } + if (returnMinMax_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnMinMax_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2481,8 +2671,10 @@ public boolean equals(final java.lang.Object obj) { if (!getRestrictedValuesList().equals(other.getRestrictedValuesList())) return false; if (!getPrefixesList().equals(other.getPrefixesList())) return false; if (!getContainsList().equals(other.getContainsList())) return false; + if (getCaseInsensitive() != other.getCaseInsensitive()) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getQuery().equals(other.getQuery())) return false; + if (getReturnMinMax() != other.getReturnMinMax()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2512,10 +2704,14 @@ public int hashCode() { hash = (37 * hash) + CONTAINS_FIELD_NUMBER; hash = (53 * hash) + getContainsList().hashCode(); } + hash = (37 * hash) + CASE_INSENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseInsensitive()); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + RETURN_MIN_MAX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnMinMax()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2683,10 +2879,14 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); contains_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); + caseInsensitive_ = false; + orderBy_ = ""; query_ = ""; + returnMinMax_ = false; + return this; } @@ -2742,8 +2942,10 @@ public com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey buildPar bitField0_ = (bitField0_ & ~0x00000008); } result.contains_ = contains_; + result.caseInsensitive_ = caseInsensitive_; result.orderBy_ = orderBy_; result.query_ = query_; + result.returnMinMax_ = returnMinMax_; onBuilt(); return result; } @@ -2860,6 +3062,9 @@ public Builder mergeFrom( } onChanged(); } + if (other.getCaseInsensitive() != false) { + setCaseInsensitive(other.getCaseInsensitive()); + } if (!other.getOrderBy().isEmpty()) { orderBy_ = other.orderBy_; onChanged(); @@ -2868,6 +3073,9 @@ public Builder mergeFrom( query_ = other.query_; onChanged(); } + if (other.getReturnMinMax() != false) { + setReturnMinMax(other.getReturnMinMax()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3598,8 +3806,8 @@ private void ensureRestrictedValuesIsMutable() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3626,8 +3834,8 @@ public com.google.protobuf.ProtocolStringList getRestrictedValuesList() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3654,8 +3862,8 @@ public int getRestrictedValuesCount() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3683,8 +3891,8 @@ public java.lang.String getRestrictedValues(int index) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3712,8 +3920,8 @@ public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3748,8 +3956,8 @@ public Builder setRestrictedValues(int index, java.lang.String value) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3783,8 +3991,8 @@ public Builder addRestrictedValues(java.lang.String value) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3815,8 +4023,8 @@ public Builder addAllRestrictedValues(java.lang.Iterable value * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3846,8 +4054,8 @@ public Builder clearRestrictedValues() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -4284,16 +4492,75 @@ public Builder addContainsBytes(com.google.protobuf.ByteString value) { return this; } + private boolean caseInsensitive_; + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @param value The caseInsensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseInsensitive(boolean value) { + + caseInsensitive_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @return This builder for chaining. + */ + public Builder clearCaseInsensitive() { + + caseInsensitive_ = false; + onChanged(); + return this; + } + private java.lang.Object orderBy_ = ""; /** * * *
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4324,11 +4591,15 @@ public java.lang.String getOrderBy() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4359,11 +4630,15 @@ public com.google.protobuf.ByteString getOrderByBytes() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4393,11 +4668,15 @@ public Builder setOrderBy(java.lang.String value) {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4423,11 +4702,15 @@ public Builder clearOrderBy() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4468,9 +4751,11 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
              * on
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4508,9 +4793,11 @@ public java.lang.String getQuery() {
              * on
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4548,9 +4835,11 @@ public com.google.protobuf.ByteString getQueryBytes() {
              * on
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4587,9 +4876,11 @@ public Builder setQuery(java.lang.String value) {
              * on
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4622,9 +4913,11 @@ public Builder clearQuery() {
              * on
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4651,6 +4944,61 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
               return this;
             }
     
    +        private boolean returnMinMax_;
    +        /**
    +         *
    +         *
    +         * 
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + @java.lang.Override + public boolean getReturnMinMax() { + return returnMinMax_; + } + /** + * + * + *
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @param value The returnMinMax to set. + * @return This builder for chaining. + */ + public Builder setReturnMinMax(boolean value) { + + returnMinMax_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @return This builder for chaining. + */ + public Builder clearReturnMinMax() { + + returnMinMax_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4792,14 +5140,22 @@ public int getLimit() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -4819,14 +5175,22 @@ public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -4846,14 +5210,22 @@ public int getExcludedFilterKeysCount() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -4874,14 +5246,22 @@ public java.lang.String getExcludedFilterKeys(int index) { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5626,14 +6006,22 @@ private void ensureExcludedFilterKeysIsMutable() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5653,14 +6041,22 @@ public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5680,14 +6076,22 @@ public int getExcludedFilterKeysCount() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5708,14 +6112,22 @@ public java.lang.String getExcludedFilterKeys(int index) { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5736,14 +6148,22 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5771,14 +6191,22 @@ public Builder setExcludedFilterKeys(int index, java.lang.String value) { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -5805,14 +6233,22 @@ public Builder addExcludedFilterKeys(java.lang.String value) { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -5836,14 +6272,22 @@ public Builder addAllExcludedFilterKeys(java.lang.Iterable val * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -5866,14 +6310,22 @@ public Builder clearExcludedFilterKeys() { * By default, * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -6901,7 +7353,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6917,7 +7369,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6933,7 +7385,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6948,7 +7400,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6966,7 +7418,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8073,7 +8525,7 @@ public com.google.protobuf.Parser getParserForType() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8093,7 +8545,7 @@ public com.google.protobuf.Parser getParserForType() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8114,7 +8566,7 @@ public com.google.protobuf.Parser getParserForType() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8132,7 +8584,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8151,7 +8603,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8626,7 +9078,7 @@ private void ensureConditionBoostSpecsIsMutable() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8649,7 +9101,7 @@ private void ensureConditionBoostSpecsIsMutable() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8670,7 +9122,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8692,7 +9144,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8721,7 +9173,7 @@ public Builder setConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8748,7 +9200,7 @@ public Builder setConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8776,7 +9228,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8805,7 +9257,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8831,7 +9283,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8858,7 +9310,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8886,7 +9338,7 @@ public Builder addAllConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8910,7 +9362,7 @@ public Builder clearConditionBoostSpecs() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8934,7 +9386,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8952,7 +9404,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8974,7 +9426,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8999,7 +9451,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -9020,7 +9472,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -9042,7 +9494,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -9380,7 +9832,8 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Unspecified query expansion condition. This defaults to
    +       * Unspecified query expansion condition. In this case, server behavior
    +       * defaults to
            * [Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
            * 
    * @@ -9416,7 +9869,8 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Unspecified query expansion condition. This defaults to
    +       * Unspecified query expansion condition. In this case, server behavior
    +       * defaults to
            * [Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
            * 
    * @@ -10313,7 +10767,7 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Default value. Defaults to
    +       * Default value. In this case, server behavior defaults to
            * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Mode.AUTO].
            * 
    * @@ -10347,7 +10801,7 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Default value. Defaults to
    +       * Default value. In this case, server behavior defaults to
            * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Mode.AUTO].
            * 
    * @@ -10988,103 +11442,943 @@ public com.google.protobuf.Parser getParserForType() { } } - public static final int PLACEMENT_FIELD_NUMBER = 1; - private volatile java.lang.Object placement_; - /** - * - * - *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    -   * This field is used to identify the serving configuration name and the set
    -   * of models that will be used to make the search.
    -   * 
    - * - * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The placement. - */ - @java.lang.Override - public java.lang.String getPlacement() { - java.lang.Object ref = placement_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - placement_ = s; - return s; - } + public interface SpellCorrectionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The mode. + */ + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode getMode(); } /** * * *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    -   * This field is used to identify the serving configuration name and the set
    -   * of models that will be used to make the search.
    +   * The specification for query spell correction.
        * 
    * - * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for placement. + * Protobuf type {@code google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec} */ - @java.lang.Override - public com.google.protobuf.ByteString getPlacementBytes() { - java.lang.Object ref = placement_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - placement_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class SpellCorrectionSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) + SpellCorrectionSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpellCorrectionSpec.newBuilder() to construct. + private SpellCorrectionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int BRANCH_FIELD_NUMBER = 2; - private volatile java.lang.Object branch_; - /** - * - * - *
    -   * The branch resource name, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    -   * Use "default_branch" as the branch ID or leave this field empty, to search
    -   * products under the default branch.
    -   * 
    - * - * string branch = 2 [(.google.api.resource_reference) = { ... } - * - * @return The branch. - */ - @java.lang.Override - public java.lang.String getBranch() { - java.lang.Object ref = branch_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - branch_ = s; - return s; + private SpellCorrectionSpec() { + mode_ = 0; } - } - /** - * - * - *
    -   * The branch resource name, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    -   * Use "default_branch" as the branch ID or leave this field empty, to search
    -   * products under the default branch.
    -   * 
    - * - * string branch = 2 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for branch. - */ + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpellCorrectionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SpellCorrectionSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + mode_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.SearchServiceProto + .internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.SearchServiceProto + .internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.class, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder.class); + } + + /** + * + * + *
    +     * Enum describing under which mode spell correction should occur.
    +     * 
    + * + * Protobuf enum {@code google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Unspecified spell correction mode. In this case, server behavior
    +       * defaults to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
    +       * Google Retail Search will try to find a spell suggestion if there
    +       * is any and put in the
    +       * [SearchResponse.corrected_query][google.cloud.retail.v2alpha.SearchResponse.corrected_query].
    +       * The spell suggestion will not be used as the search query.
    +       * 
    + * + * SUGGESTION_ONLY = 1; + */ + SUGGESTION_ONLY(1), + /** + * + * + *
    +       * Automatic spell correction built by Google Retail Search. Search will
    +       * be based on the corrected query if found.
    +       * 
    + * + * AUTO = 2; + */ + AUTO(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +       * Unspecified spell correction mode. In this case, server behavior
    +       * defaults to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +       * Google Retail Search will try to find a spell suggestion if there
    +       * is any and put in the
    +       * [SearchResponse.corrected_query][google.cloud.retail.v2alpha.SearchResponse.corrected_query].
    +       * The spell suggestion will not be used as the search query.
    +       * 
    + * + * SUGGESTION_ONLY = 1; + */ + public static final int SUGGESTION_ONLY_VALUE = 1; + /** + * + * + *
    +       * Automatic spell correction built by Google Retail Search. Search will
    +       * be based on the corrected query if found.
    +       * 
    + * + * AUTO = 2; + */ + public static final int AUTO_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return SUGGESTION_ONLY; + case 2: + return AUTO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_; + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode result = + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.valueOf(mode_); + return result == null + ? com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mode_ + != com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec other = + (com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) obj; + + if (mode_ != other.mode_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +     * The specification for query spell correction.
    +     * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.SearchServiceProto + .internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.SearchServiceProto + .internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.class, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.SearchServiceProto + .internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec build() { + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec buildPartial() { + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec result = + new com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec(this); + result.mode_ = mode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) { + return mergeFrom( + (com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec other) { + if (other + == com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int mode_ = 0; + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode result = + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.valueOf(mode_); + return result == null + ? com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.UNRECOGNIZED + : result; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) + private static final com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec(); + } + + public static com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpellCorrectionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SpellCorrectionSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PLACEMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object placement_; + /** + * + * + *
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
    +   * This field is used to identify the serving configuration name and the set
    +   * of models that will be used to make the search.
    +   * 
    + * + * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The placement. + */ + @java.lang.Override + public java.lang.String getPlacement() { + java.lang.Object ref = placement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + placement_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
    +   * This field is used to identify the serving configuration name and the set
    +   * of models that will be used to make the search.
    +   * 
    + * + * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for placement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlacementBytes() { + java.lang.Object ref = placement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + placement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCH_FIELD_NUMBER = 2; + private volatile java.lang.Object branch_; + /** + * + * + *
    +   * The branch resource name, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    +   * Use "default_branch" as the branch ID or leave this field empty, to search
    +   * products under the default branch.
    +   * 
    + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + @java.lang.Override + public java.lang.String getBranch() { + java.lang.Object ref = branch_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + branch_ = s; + return s; + } + } + /** + * + * + *
    +   * The branch resource name, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    +   * Use "default_branch" as the branch ID or leave this field empty, to search
    +   * products under the default branch.
    +   * 
    + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ @java.lang.Override public com.google.protobuf.ByteString getBranchBytes() { java.lang.Object ref = branch_; @@ -11105,6 +12399,10 @@ public com.google.protobuf.ByteString getBranchBytes() { * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -11128,6 +12426,10 @@ public java.lang.String getQuery() { * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -11651,7 +12953,7 @@ public com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacet *
    * * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=536 + * google/cloud/retail/v2alpha/search_service.proto;l=600 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Override @@ -11674,7 +12976,7 @@ public boolean hasDynamicFacetSpec() { *
    * * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=536 + * google/cloud/retail/v2alpha/search_service.proto;l=600 * @return The dynamicFacetSpec. */ @java.lang.Override @@ -11715,10 +13017,11 @@ public com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec getDynamic * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -11737,10 +13040,11 @@ public boolean hasBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -11761,10 +13065,11 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec getBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -11913,7 +13218,8 @@ public com.google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold getRelev * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -12000,7 +13306,8 @@ public com.google.protobuf.ProtocolStringList getVariantRollupKeysList() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -12087,7 +13394,8 @@ public int getVariantRollupKeysCount() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -12175,7 +13483,8 @@ public java.lang.String getVariantRollupKeys(int index) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -12385,45 +13694,260 @@ public com.google.cloud.retail.v2alpha.SearchRequest.SearchMode getSearchMode() * .google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalization_spec = 32; * * - * @return Whether the personalizationSpec field is set. + * @return Whether the personalizationSpec field is set. + */ + @java.lang.Override + public boolean hasPersonalizationSpec() { + return personalizationSpec_ != null; + } + /** + * + * + *
    +   * The specification for personalization.
    +   * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * + * @return The personalizationSpec. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec + getPersonalizationSpec() { + return personalizationSpec_ == null + ? com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.getDefaultInstance() + : personalizationSpec_; + } + /** + * + * + *
    +   * The specification for personalization.
    +   * 
    + * + * .google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder() { + return getPersonalizationSpec(); + } + + public static final int LABELS_FIELD_NUMBER = 34; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.retail.v2alpha.SearchServiceProto + .internal_static_google_cloud_retail_v2alpha_SearchRequest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SPELL_CORRECTION_SPEC_FIELD_NUMBER = 35; + private com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spellCorrectionSpec_; + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return Whether the spellCorrectionSpec field is set. */ @java.lang.Override - public boolean hasPersonalizationSpec() { - return personalizationSpec_ != null; + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
    -   * The specification for personalization.
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
        * 
    * - * .google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; * * - * @return The personalizationSpec. + * @return The spellCorrectionSpec. */ @java.lang.Override - public com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec - getPersonalizationSpec() { - return personalizationSpec_ == null - ? com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.getDefaultInstance() - : personalizationSpec_; + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; } /** * * *
    -   * The specification for personalization.
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
        * 
    * - * .google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; * */ @java.lang.Override - public com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpecOrBuilder - getPersonalizationSpecOrBuilder() { - return getPersonalizationSpec(); + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; } private byte memoizedIsInitialized = -1; @@ -12505,6 +14029,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (personalizationSpec_ != null) { output.writeMessage(32, getPersonalizationSpec()); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 34); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(35, getSpellCorrectionSpec()); + } unknownFields.writeTo(output); } @@ -12590,6 +14119,20 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getPersonalizationSpec()); } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, labels__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(35, getSpellCorrectionSpec()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -12641,6 +14184,11 @@ public boolean equals(final java.lang.Object obj) { if (hasPersonalizationSpec()) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasSpellCorrectionSpec() != other.hasSpellCorrectionSpec()) return false; + if (hasSpellCorrectionSpec()) { + if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -12708,6 +14256,14 @@ public int hashCode() { hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSpec().hashCode(); } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasSpellCorrectionSpec()) { + hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -12828,6 +14384,26 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 34: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 34: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -12851,6 +14427,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getFacetSpecsFieldBuilder(); + getSpellCorrectionSpecFieldBuilder(); } } @@ -12921,6 +14498,13 @@ public Builder clear() { personalizationSpec_ = null; personalizationSpecBuilder_ = null; } + internalGetMutableLabels().clear(); + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = null; + } else { + spellCorrectionSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -12949,6 +14533,7 @@ public com.google.cloud.retail.v2alpha.SearchRequest buildPartial() { com.google.cloud.retail.v2alpha.SearchRequest result = new com.google.cloud.retail.v2alpha.SearchRequest(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.placement_ = placement_; result.branch_ = branch_; result.query_ = query_; @@ -13005,6 +14590,17 @@ public com.google.cloud.retail.v2alpha.SearchRequest buildPartial() { } else { result.personalizationSpec_ = personalizationSpecBuilder_.build(); } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (((from_bitField0_ & 0x00000010) != 0)) { + if (spellCorrectionSpecBuilder_ == null) { + result.spellCorrectionSpec_ = spellCorrectionSpec_; + } else { + result.spellCorrectionSpec_ = spellCorrectionSpecBuilder_.build(); + } + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -13160,6 +14756,10 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchRequest other) { if (other.hasPersonalizationSpec()) { mergePersonalizationSpec(other.getPersonalizationSpec()); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasSpellCorrectionSpec()) { + mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -13196,8 +14796,10 @@ public Builder mergeFrom( * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -13221,8 +14823,10 @@ public java.lang.String getPlacement() { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -13246,8 +14850,10 @@ public com.google.protobuf.ByteString getPlacementBytes() { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -13270,8 +14876,10 @@ public Builder setPlacement(java.lang.String value) { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -13290,8 +14898,10 @@ public Builder clearPlacement() { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -13439,6 +15049,10 @@ public Builder setBranchBytes(com.google.protobuf.ByteString value) { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13461,6 +15075,10 @@ public java.lang.String getQuery() { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13483,6 +15101,10 @@ public com.google.protobuf.ByteString getQueryBytes() { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13504,6 +15126,10 @@ public Builder setQuery(java.lang.String value) { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13521,6 +15147,10 @@ public Builder clearQuery() { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -14975,7 +16605,7 @@ public com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.Builder addFacetS *
    * * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=536 + * google/cloud/retail/v2alpha/search_service.proto;l=600 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -14997,7 +16627,7 @@ public boolean hasDynamicFacetSpec() { *
    * * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=536 + * google/cloud/retail/v2alpha/search_service.proto;l=600 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -15216,10 +16846,11 @@ public Builder clearDynamicFacetSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15237,10 +16868,11 @@ public boolean hasBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15264,10 +16896,11 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec getBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15293,10 +16926,11 @@ public Builder setBoostSpec(com.google.cloud.retail.v2alpha.SearchRequest.BoostS * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15320,10 +16954,11 @@ public Builder setBoostSpec( * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15353,10 +16988,11 @@ public Builder mergeBoostSpec(com.google.cloud.retail.v2alpha.SearchRequest.Boos * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15380,10 +17016,11 @@ public Builder clearBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15401,10 +17038,11 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder getBoostS * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15427,10 +17065,11 @@ public com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder getBoostS * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -15843,7 +17482,8 @@ private void ensureVariantRollupKeysIsMutable() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15930,7 +17570,8 @@ public com.google.protobuf.ProtocolStringList getVariantRollupKeysList() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16017,7 +17658,8 @@ public int getVariantRollupKeysCount() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16105,7 +17747,8 @@ public java.lang.String getVariantRollupKeys(int index) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16193,7 +17836,8 @@ public com.google.protobuf.ByteString getVariantRollupKeysBytes(int index) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16288,7 +17932,8 @@ public Builder setVariantRollupKeys(int index, java.lang.String value) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16382,7 +18027,8 @@ public Builder addVariantRollupKeys(java.lang.String value) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16473,7 +18119,8 @@ public Builder addAllVariantRollupKeys(java.lang.Iterable valu * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16563,7 +18210,8 @@ public Builder clearVariantRollupKeys() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -17188,6 +18836,484 @@ public Builder clearPersonalizationSpec() { return personalizationSpecBuilder_; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spellCorrectionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder> + spellCorrectionSpecBuilder_; + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return The spellCorrectionSpec. + */ + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + if (spellCorrectionSpecBuilder_ == null) { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; + } else { + return spellCorrectionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder setSpellCorrectionSpec( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spellCorrectionSpec_ = value; + onChanged(); + } else { + spellCorrectionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder setSpellCorrectionSpec( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder builderForValue) { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = builderForValue.build(); + onChanged(); + } else { + spellCorrectionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder mergeSpellCorrectionSpec( + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && spellCorrectionSpec_ != null + && spellCorrectionSpec_ + != com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) { + spellCorrectionSpec_ = + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.newBuilder( + spellCorrectionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + spellCorrectionSpec_ = value; + } + onChanged(); + } else { + spellCorrectionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder clearSpellCorrectionSpec() { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = null; + onChanged(); + } else { + spellCorrectionSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder + getSpellCorrectionSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSpellCorrectionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + if (spellCorrectionSpecBuilder_ != null) { + return spellCorrectionSpecBuilder_.getMessageOrBuilder(); + } else { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; + } + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder> + getSpellCorrectionSpecFieldBuilder() { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder>( + getSpellCorrectionSpec(), getParentForChildren(), isClean()); + spellCorrectionSpec_ = null; + } + return spellCorrectionSpecBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java index 654314dd..b1a6f0f6 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequestOrBuilder.java @@ -27,8 +27,10 @@ public interface SearchRequestOrBuilder * * *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
        * 
    @@ -42,8 +44,10 @@ public interface SearchRequestOrBuilder * * *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
        * 
    @@ -90,6 +94,10 @@ public interface SearchRequestOrBuilder * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -102,6 +110,10 @@ public interface SearchRequestOrBuilder * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -451,7 +463,7 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=536 + * google/cloud/retail/v2alpha/search_service.proto;l=600 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -471,7 +483,7 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * * @deprecated google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2alpha/search_service.proto;l=536 + * google/cloud/retail/v2alpha/search_service.proto;l=600 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -502,10 +514,11 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -521,10 +534,11 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -540,10 +554,11 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2alpha.SearchRequest.BoostSpec boost_spec = 13; @@ -660,7 +675,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -745,7 +761,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -830,7 +847,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -916,7 +934,8 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. * * pickupInStore.id, where id is any @@ -1127,4 +1146,178 @@ com.google.cloud.retail.v2alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOr */ com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpecOrBuilder getPersonalizationSpecOrBuilder(); + + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + int getLabelsCount(); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + boolean hasSpellCorrectionSpec(); + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return The spellCorrectionSpec. + */ + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec getSpellCorrectionSpec(); + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder(); } diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java index 19a8343c..fdb8751b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java @@ -3197,6 +3197,40 @@ public interface FacetValueOrBuilder */ long getCount(); + /** + * + * + *
    +       * The minimum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + double getMinValue(); + + /** + * + * + *
    +       * The maximum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + double getMaxValue(); + public com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.FacetValueCase getFacetValueCase(); } @@ -3279,6 +3313,16 @@ private FacetValue( count_ = input.readInt64(); break; } + case 41: + { + minValue_ = input.readDouble(); + break; + } + case 49: + { + maxValue_ = input.readDouble(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -3502,6 +3546,50 @@ public long getCount() { return count_; } + public static final int MIN_VALUE_FIELD_NUMBER = 5; + private double minValue_; + /** + * + * + *
    +       * The minimum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 6; + private double maxValue_; + /** + * + * + *
    +       * The maximum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3525,6 +3613,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (count_ != 0L) { output.writeInt64(3, count_); } + if (java.lang.Double.doubleToRawLongBits(minValue_) != 0) { + output.writeDouble(5, minValue_); + } + if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { + output.writeDouble(6, maxValue_); + } unknownFields.writeTo(output); } @@ -3545,6 +3639,12 @@ public int getSerializedSize() { if (count_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); } + if (java.lang.Double.doubleToRawLongBits(minValue_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, minValue_); + } + if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, maxValue_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3562,6 +3662,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue) obj; if (getCount() != other.getCount()) return false; + if (java.lang.Double.doubleToLongBits(getMinValue()) + != java.lang.Double.doubleToLongBits(other.getMinValue())) return false; + if (java.lang.Double.doubleToLongBits(getMaxValue()) + != java.lang.Double.doubleToLongBits(other.getMaxValue())) return false; if (!getFacetValueCase().equals(other.getFacetValueCase())) return false; switch (facetValueCase_) { case 1: @@ -3586,6 +3690,16 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinValue())); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxValue())); switch (facetValueCase_) { case 1: hash = (37 * hash) + VALUE_FIELD_NUMBER; @@ -3751,6 +3865,10 @@ public Builder clear() { super.clear(); count_ = 0L; + minValue_ = 0D; + + maxValue_ = 0D; + facetValueCase_ = 0; facetValue_ = null; return this; @@ -3793,6 +3911,8 @@ public com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue buildPart } } result.count_ = count_; + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; result.facetValueCase_ = facetValueCase_; onBuilt(); return result; @@ -3852,6 +3972,12 @@ public Builder mergeFrom( if (other.getCount() != 0L) { setCount(other.getCount()); } + if (other.getMinValue() != 0D) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != 0D) { + setMaxValue(other.getMaxValue()); + } switch (other.getFacetValueCase()) { case VALUE: { @@ -4311,6 +4437,134 @@ public Builder clearCount() { return this; } + private double minValue_; + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(double value) { + + minValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = 0D; + onChanged(); + return this; + } + + private double maxValue_; + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(double value) { + + maxValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = 0D; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -6365,7 +6619,9 @@ public int getTotalSize() { * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -6388,7 +6644,9 @@ public java.lang.String getCorrectedQuery() { * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -6575,10 +6833,10 @@ public com.google.cloud.retail.v2alpha.SearchResponse.QueryExpansionInfo getQuer * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; @@ -6602,10 +6860,10 @@ public java.lang.String getRedirectUri() { * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; @@ -8188,7 +8446,9 @@ public Builder clearTotalSize() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8210,7 +8470,9 @@ public java.lang.String getCorrectedQuery() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8232,7 +8494,9 @@ public com.google.protobuf.ByteString getCorrectedQueryBytes() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8253,7 +8517,9 @@ public Builder setCorrectedQuery(java.lang.String value) { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8270,7 +8536,9 @@ public Builder clearCorrectedQuery() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8742,10 +9010,10 @@ public Builder clearQueryExpansionInfo() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8768,10 +9036,10 @@ public java.lang.String getRedirectUri() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8794,10 +9062,10 @@ public com.google.protobuf.ByteString getRedirectUriBytes() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8819,10 +9087,10 @@ public Builder setRedirectUri(java.lang.String value) { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8840,10 +9108,10 @@ public Builder clearRedirectUri() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponseOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponseOrBuilder.java index dae37ddc..3626ecc4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponseOrBuilder.java @@ -149,7 +149,9 @@ com.google.cloud.retail.v2alpha.SearchResponse.SearchResultOrBuilder getResultsO * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -161,7 +163,9 @@ com.google.cloud.retail.v2alpha.SearchResponse.SearchResultOrBuilder getResultsO * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -274,10 +278,10 @@ com.google.cloud.retail.v2alpha.SearchResponse.SearchResultOrBuilder getResultsO * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; @@ -290,10 +294,10 @@ com.google.cloud.retail.v2alpha.SearchResponse.SearchResultOrBuilder getResultsO * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceProto.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceProto.java index 6632bd44..6b63bc62 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceProto.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceProto.java @@ -59,6 +59,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2alpha_SearchRequest_PersonalizationSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2alpha_SearchRequest_PersonalizationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2alpha_SearchRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2alpha_SearchRequest_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2alpha_SearchResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -104,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "le/cloud/retail/v2alpha/common.proto\032)go" + "ogle/cloud/retail/v2alpha/product.proto\032" + " google/protobuf/field_mask.proto\032\034googl" - + "e/protobuf/struct.proto\"\361\021\n\rSearchReques" + + "e/protobuf/struct.proto\"\300\025\n\rSearchReques" + "t\022\026\n\tplacement\030\001 \001(\tB\003\340A\002\0221\n\006branch\030\002 \001(" + "\tB!\372A\036\n\034retail.googleapis.com/Branch\022\r\n\005" + "query\030\003 \001(\t\022\027\n\nvisitor_id\030\004 \001(\tB\003\340A\002\0228\n\t" @@ -128,87 +136,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.retail.v2alpha.SearchRequest.Sear" + "chMode\022\\\n\024personalization_spec\030 \001(\0132>.g" + "oogle.cloud.retail.v2alpha.SearchRequest" - + ".PersonalizationSpec\032\351\002\n\tFacetSpec\022U\n\tfa" - + "cet_key\030\001 \001(\0132=.google.cloud.retail.v2al" - + "pha.SearchRequest.FacetSpec.FacetKeyB\003\340A" - + "\002\022\r\n\005limit\030\002 \001(\005\022\034\n\024excluded_filter_keys" - + "\030\003 \003(\t\022\037\n\027enable_dynamic_position\030\004 \001(\010\032" - + "\266\001\n\010FacetKey\022\020\n\003key\030\001 \001(\tB\003\340A\002\0228\n\tinterv" - + "als\030\002 \003(\0132%.google.cloud.retail.v2alpha." - + "Interval\022\031\n\021restricted_values\030\003 \003(\t\022\020\n\010p" - + "refixes\030\010 \003(\t\022\020\n\010contains\030\t \003(\t\022\020\n\010order" - + "_by\030\004 \001(\t\022\r\n\005query\030\005 \001(\t\032\233\001\n\020DynamicFace" - + "tSpec\022N\n\004mode\030\001 \001(\0162@.google.cloud.retai" - + "l.v2alpha.SearchRequest.DynamicFacetSpec" - + ".Mode\"7\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\014\n\010D" - + "ISABLED\020\001\022\013\n\007ENABLED\020\002\032\363\001\n\tBoostSpec\022f\n\025" - + "condition_boost_specs\030\001 \003(\0132G.google.clo" - + "ud.retail.v2alpha.SearchRequest.BoostSpe" - + "c.ConditionBoostSpec\022\'\n\032skip_boost_spec_" - + "validation\030\002 \001(\010H\000\210\001\001\0326\n\022ConditionBoostS" - + "pec\022\021\n\tcondition\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002B\035\n" - + "\033_skip_boost_spec_validation\032\320\001\n\022QueryEx" - + "pansionSpec\022Z\n\tcondition\030\001 \001(\0162G.google." - + "cloud.retail.v2alpha.SearchRequest.Query" - + "ExpansionSpec.Condition\022\036\n\026pin_unexpande" - + "d_results\030\002 \001(\010\">\n\tCondition\022\031\n\025CONDITIO" - + "N_UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\010\n\004AUTO\020\003\032" - + "\236\001\n\023PersonalizationSpec\022Q\n\004mode\030\001 \001(\0162C." - + "google.cloud.retail.v2alpha.SearchReques" - + "t.PersonalizationSpec.Mode\"4\n\004Mode\022\024\n\020MO" - + "DE_UNSPECIFIED\020\000\022\010\n\004AUTO\020\001\022\014\n\010DISABLED\020\002" - + "\"d\n\022RelevanceThreshold\022#\n\037RELEVANCE_THRE" - + "SHOLD_UNSPECIFIED\020\000\022\010\n\004HIGH\020\001\022\n\n\006MEDIUM\020" - + "\002\022\007\n\003LOW\020\003\022\n\n\006LOWEST\020\004\"[\n\nSearchMode\022\033\n\027" - + "SEARCH_MODE_UNSPECIFIED\020\000\022\027\n\023PRODUCT_SEA" - + "RCH_ONLY\020\001\022\027\n\023FACETED_SEARCH_ONLY\020\002\"\306\n\n\016" - + "SearchResponse\022I\n\007results\030\001 \003(\01328.google" - + ".cloud.retail.v2alpha.SearchResponse.Sea" - + "rchResult\022A\n\006facets\030\002 \003(\01321.google.cloud" - + ".retail.v2alpha.SearchResponse.Facet\022\022\n\n" - + "total_size\030\003 \001(\005\022\027\n\017corrected_query\030\004 \001(" - + "\t\022\031\n\021attribution_token\030\005 \001(\t\022\027\n\017next_pag" - + "e_token\030\006 \001(\t\022\\\n\024query_expansion_info\030\007 " + + ".PersonalizationSpec\022F\n\006labels\030\" \003(\01326.g" + + "oogle.cloud.retail.v2alpha.SearchRequest" + + ".LabelsEntry\022b\n\025spell_correction_spec\030# " + "\001(\0132>.google.cloud.retail.v2alpha.Search" - + "Response.QueryExpansionInfo\022\024\n\014redirect_" - + "uri\030\n \001(\t\022\030\n\020applied_controls\030\014 \003(\t\022n\n\035i" - + "nvalid_condition_boost_specs\030\016 \003(\0132G.goo" - + "gle.cloud.retail.v2alpha.SearchRequest.B" - + "oostSpec.ConditionBoostSpec\032\207\004\n\014SearchRe" - + "sult\022\n\n\002id\030\001 \001(\t\0225\n\007product\030\002 \001(\0132$.goog" - + "le.cloud.retail.v2alpha.Product\022\036\n\026match" - + "ing_variant_count\030\003 \001(\005\022t\n\027matching_vari" - + "ant_fields\030\004 \003(\0132S.google.cloud.retail.v" - + "2alpha.SearchResponse.SearchResult.Match" - + "ingVariantFieldsEntry\022p\n\025variant_rollup_" - + "values\030\005 \003(\0132Q.google.cloud.retail.v2alp" - + "ha.SearchResponse.SearchResult.VariantRo" - + "llupValuesEntry\032X\n\032MatchingVariantFields" - + "Entry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.goog" - + "le.protobuf.FieldMask:\0028\001\032R\n\030VariantRoll" - + "upValuesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(" - + "\0132\026.google.protobuf.Value:\0028\001\032\361\001\n\005Facet\022" - + "\013\n\003key\030\001 \001(\t\022L\n\006values\030\002 \003(\0132<.google.cl" - + "oud.retail.v2alpha.SearchResponse.Facet." - + "FacetValue\022\025\n\rdynamic_facet\030\003 \001(\010\032v\n\nFac" - + "etValue\022\017\n\005value\030\001 \001(\tH\000\0229\n\010interval\030\002 \001" - + "(\0132%.google.cloud.retail.v2alpha.Interva" - + "lH\000\022\r\n\005count\030\003 \001(\003B\r\n\013facet_value\032I\n\022Que" - + "ryExpansionInfo\022\026\n\016expanded_query\030\001 \001(\010\022" - + "\033\n\023pinned_result_count\030\002 \001(\0032\225\002\n\rSearchS" - + "ervice\022\270\001\n\006Search\022*.google.cloud.retail." - + "v2alpha.SearchRequest\032+.google.cloud.ret" - + "ail.v2alpha.SearchResponse\"U\202\323\344\223\002O\"J/v2a" - + "lpha/{placement=projects/*/locations/*/c" - + "atalogs/*/placements/*}:search:\001*\032I\312A\025re" - + "tail.googleapis.com\322A.https://www.google" - + "apis.com/auth/cloud-platformB\340\001\n\037com.goo" - + "gle.cloud.retail.v2alphaB\022SearchServiceP" - + "rotoP\001ZAgoogle.golang.org/genproto/googl" - + "eapis/cloud/retail/v2alpha;retail\242\002\006RETA" - + "IL\252\002\033Google.Cloud.Retail.V2Alpha\312\002\033Googl" - + "e\\Cloud\\Retail\\V2alpha\352\002\036Google::Cloud::" - + "Retail::V2alphab\006proto3" + + "Request.SpellCorrectionSpecH\000\210\001\001\032\233\003\n\tFac" + + "etSpec\022U\n\tfacet_key\030\001 \001(\0132=.google.cloud" + + ".retail.v2alpha.SearchRequest.FacetSpec." + + "FacetKeyB\003\340A\002\022\r\n\005limit\030\002 \001(\005\022\034\n\024excluded" + + "_filter_keys\030\003 \003(\t\022\037\n\027enable_dynamic_pos" + + "ition\030\004 \001(\010\032\350\001\n\010FacetKey\022\020\n\003key\030\001 \001(\tB\003\340" + + "A\002\0228\n\tintervals\030\002 \003(\0132%.google.cloud.ret" + + "ail.v2alpha.Interval\022\031\n\021restricted_value" + + "s\030\003 \003(\t\022\020\n\010prefixes\030\010 \003(\t\022\020\n\010contains\030\t " + + "\003(\t\022\030\n\020case_insensitive\030\n \001(\010\022\020\n\010order_b" + + "y\030\004 \001(\t\022\r\n\005query\030\005 \001(\t\022\026\n\016return_min_max" + + "\030\013 \001(\010\032\233\001\n\020DynamicFacetSpec\022N\n\004mode\030\001 \001(" + + "\0162@.google.cloud.retail.v2alpha.SearchRe" + + "quest.DynamicFacetSpec.Mode\"7\n\004Mode\022\024\n\020M" + + "ODE_UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\013\n\007ENABL" + + "ED\020\002\032\363\001\n\tBoostSpec\022f\n\025condition_boost_sp" + + "ecs\030\001 \003(\0132G.google.cloud.retail.v2alpha." + + "SearchRequest.BoostSpec.ConditionBoostSp" + + "ec\022\'\n\032skip_boost_spec_validation\030\002 \001(\010H\000" + + "\210\001\001\0326\n\022ConditionBoostSpec\022\021\n\tcondition\030\001" + + " \001(\t\022\r\n\005boost\030\002 \001(\002B\035\n\033_skip_boost_spec_" + + "validation\032\320\001\n\022QueryExpansionSpec\022Z\n\tcon" + + "dition\030\001 \001(\0162G.google.cloud.retail.v2alp" + + "ha.SearchRequest.QueryExpansionSpec.Cond" + + "ition\022\036\n\026pin_unexpanded_results\030\002 \001(\010\">\n" + + "\tCondition\022\031\n\025CONDITION_UNSPECIFIED\020\000\022\014\n" + + "\010DISABLED\020\001\022\010\n\004AUTO\020\003\032\236\001\n\023Personalizatio" + + "nSpec\022Q\n\004mode\030\001 \001(\0162C.google.cloud.retai" + + "l.v2alpha.SearchRequest.PersonalizationS" + + "pec.Mode\"4\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\010" + + "\n\004AUTO\020\001\022\014\n\010DISABLED\020\002\032\245\001\n\023SpellCorrecti" + + "onSpec\022Q\n\004mode\030\001 \001(\0162C.google.cloud.reta" + + "il.v2alpha.SearchRequest.SpellCorrection" + + "Spec.Mode\";\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022" + + "\023\n\017SUGGESTION_ONLY\020\001\022\010\n\004AUTO\020\002\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"d\n" + + "\022RelevanceThreshold\022#\n\037RELEVANCE_THRESHO" + + "LD_UNSPECIFIED\020\000\022\010\n\004HIGH\020\001\022\n\n\006MEDIUM\020\002\022\007" + + "\n\003LOW\020\003\022\n\n\006LOWEST\020\004\"[\n\nSearchMode\022\033\n\027SEA" + + "RCH_MODE_UNSPECIFIED\020\000\022\027\n\023PRODUCT_SEARCH" + + "_ONLY\020\001\022\027\n\023FACETED_SEARCH_ONLY\020\002B\030\n\026_spe" + + "ll_correction_spec\"\355\n\n\016SearchResponse\022I\n" + + "\007results\030\001 \003(\01328.google.cloud.retail.v2a" + + "lpha.SearchResponse.SearchResult\022A\n\006face" + + "ts\030\002 \003(\01321.google.cloud.retail.v2alpha.S" + + "earchResponse.Facet\022\022\n\ntotal_size\030\003 \001(\005\022" + + "\027\n\017corrected_query\030\004 \001(\t\022\031\n\021attribution_" + + "token\030\005 \001(\t\022\027\n\017next_page_token\030\006 \001(\t\022\\\n\024" + + "query_expansion_info\030\007 \001(\0132>.google.clou" + + "d.retail.v2alpha.SearchResponse.QueryExp" + + "ansionInfo\022\024\n\014redirect_uri\030\n \001(\t\022\030\n\020appl" + + "ied_controls\030\014 \003(\t\022n\n\035invalid_condition_" + + "boost_specs\030\016 \003(\0132G.google.cloud.retail." + + "v2alpha.SearchRequest.BoostSpec.Conditio" + + "nBoostSpec\032\207\004\n\014SearchResult\022\n\n\002id\030\001 \001(\t\022" + + "5\n\007product\030\002 \001(\0132$.google.cloud.retail.v" + + "2alpha.Product\022\036\n\026matching_variant_count" + + "\030\003 \001(\005\022t\n\027matching_variant_fields\030\004 \003(\0132" + + "S.google.cloud.retail.v2alpha.SearchResp" + + "onse.SearchResult.MatchingVariantFieldsE" + + "ntry\022p\n\025variant_rollup_values\030\005 \003(\0132Q.go" + + "ogle.cloud.retail.v2alpha.SearchResponse" + + ".SearchResult.VariantRollupValuesEntry\032X" + + "\n\032MatchingVariantFieldsEntry\022\013\n\003key\030\001 \001(" + + "\t\022)\n\005value\030\002 \001(\0132\032.google.protobuf.Field" + + "Mask:\0028\001\032R\n\030VariantRollupValuesEntry\022\013\n\003" + + "key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protob" + + "uf.Value:\0028\001\032\230\002\n\005Facet\022\013\n\003key\030\001 \001(\t\022L\n\006v" + + "alues\030\002 \003(\0132<.google.cloud.retail.v2alph" + + "a.SearchResponse.Facet.FacetValue\022\025\n\rdyn" + + "amic_facet\030\003 \001(\010\032\234\001\n\nFacetValue\022\017\n\005value" + + "\030\001 \001(\tH\000\0229\n\010interval\030\002 \001(\0132%.google.clou" + + "d.retail.v2alpha.IntervalH\000\022\r\n\005count\030\003 \001" + + "(\003\022\021\n\tmin_value\030\005 \001(\001\022\021\n\tmax_value\030\006 \001(\001" + + "B\r\n\013facet_value\032I\n\022QueryExpansionInfo\022\026\n" + + "\016expanded_query\030\001 \001(\010\022\033\n\023pinned_result_c" + + "ount\030\002 \001(\0032\354\002\n\rSearchService\022\217\002\n\006Search\022" + + "*.google.cloud.retail.v2alpha.SearchRequ" + + "est\032+.google.cloud.retail.v2alpha.Search" + + "Response\"\253\001\202\323\344\223\002\244\001\"J/v2alpha/{placement=" + + "projects/*/locations/*/catalogs/*/placem" + + "ents/*}:search:\001*ZS\"N/v2alpha/{placement" + + "=projects/*/locations/*/catalogs/*/servi" + + "ngConfigs/*}:search:\001*\032I\312A\025retail.google" + + "apis.com\322A.https://www.googleapis.com/au" + + "th/cloud-platformB\340\001\n\037com.google.cloud.r" + + "etail.v2alphaB\022SearchServiceProtoP\001ZAgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/retail/v2alpha;retail\242\002\006RETAIL\252\002\033Google" + + ".Cloud.Retail.V2Alpha\312\002\033Google\\Cloud\\Ret" + + "ail\\V2alpha\352\002\036Google::Cloud::Retail::V2a" + + "lphab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -249,6 +272,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageCategories", "SearchMode", "PersonalizationSpec", + "Labels", + "SpellCorrectionSpec", + "SpellCorrectionSpec", }); internal_static_google_cloud_retail_v2alpha_SearchRequest_FacetSpec_descriptor = internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor @@ -268,7 +294,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2alpha_SearchRequest_FacetSpec_FacetKey_descriptor, new java.lang.String[] { - "Key", "Intervals", "RestrictedValues", "Prefixes", "Contains", "OrderBy", "Query", + "Key", + "Intervals", + "RestrictedValues", + "Prefixes", + "Contains", + "CaseInsensitive", + "OrderBy", + "Query", + "ReturnMinMax", }); internal_static_google_cloud_retail_v2alpha_SearchRequest_DynamicFacetSpec_descriptor = internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor @@ -320,6 +354,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Mode", }); + internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor = + internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor, + new java.lang.String[] { + "Mode", + }); + internal_static_google_cloud_retail_v2alpha_SearchRequest_LabelsEntry_descriptor = + internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_retail_v2alpha_SearchRequest_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2alpha_SearchRequest_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_retail_v2alpha_SearchResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_retail_v2alpha_SearchResponse_fieldAccessorTable = @@ -389,7 +443,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2alpha_SearchResponse_Facet_FacetValue_descriptor, new java.lang.String[] { - "Value", "Interval", "Count", "FacetValue", + "Value", "Interval", "Count", "MinValue", "MaxValue", "FacetValue", }); internal_static_google_cloud_retail_v2alpha_SearchResponse_QueryExpansionInfo_descriptor = internal_static_google_cloud_retail_v2alpha_SearchResponse_descriptor diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchSolutionUseCase.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchSolutionUseCase.java index 2a5fdbd5..46295b0f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchSolutionUseCase.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchSolutionUseCase.java @@ -32,8 +32,8 @@ public enum SearchSolutionUseCase implements com.google.protobuf.ProtocolMessage * * *
    -   * The value when it's unspecified. Defaults to
    -   * [SEARCH][].
    +   * The value when it's unspecified. In this case, server behavior defaults to
    +   * [SEARCH_SOLUTION_USE_CASE_SEARCH][].
        * 
    * * SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; @@ -68,8 +68,8 @@ public enum SearchSolutionUseCase implements com.google.protobuf.ProtocolMessage * * *
    -   * The value when it's unspecified. Defaults to
    -   * [SEARCH][].
    +   * The value when it's unspecified. In this case, server behavior defaults to
    +   * [SEARCH_SOLUTION_USE_CASE_SEARCH][].
        * 
    * * SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; @@ -159,7 +159,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.retail.v2alpha.CommonProto.getDescriptor().getEnumTypes().get(2); + return com.google.cloud.retail.v2alpha.CommonProto.getDescriptor().getEnumTypes().get(3); } private static final SearchSolutionUseCase[] VALUES = values(); diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java index 6669df5f..2a214244 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java @@ -337,7 +337,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -361,7 +361,7 @@ public java.lang.String getName() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -760,10 +760,11 @@ public com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec getDynamic * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -787,10 +788,11 @@ public com.google.protobuf.ProtocolStringList getBoostControlIdsList() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -814,10 +816,11 @@ public int getBoostControlIdsCount() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -842,10 +845,11 @@ public java.lang.String getBoostControlIds(int index) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -2531,7 +2535,7 @@ public Builder mergeFrom( * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2554,7 +2558,7 @@ public java.lang.String getName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2577,7 +2581,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2599,7 +2603,7 @@ public Builder setName(java.lang.String value) { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2617,7 +2621,7 @@ public Builder clearName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3606,10 +3610,11 @@ private void ensureBoostControlIdsIsMutable() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3633,10 +3638,11 @@ public com.google.protobuf.ProtocolStringList getBoostControlIdsList() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3660,10 +3666,11 @@ public int getBoostControlIdsCount() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3688,10 +3695,11 @@ public java.lang.String getBoostControlIds(int index) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3716,10 +3724,11 @@ public com.google.protobuf.ByteString getBoostControlIdsBytes(int index) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3751,10 +3760,11 @@ public Builder setBoostControlIds(int index, java.lang.String value) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3785,10 +3795,11 @@ public Builder addBoostControlIds(java.lang.String value) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3816,10 +3827,11 @@ public Builder addAllBoostControlIds(java.lang.Iterable values * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -3846,10 +3858,11 @@ public Builder clearBoostControlIds() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java index 8347fd13..8e9cee98 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigOrBuilder.java @@ -28,7 +28,7 @@ public interface ServingConfigOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -41,7 +41,7 @@ public interface ServingConfigOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -332,10 +332,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -357,10 +358,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -382,10 +384,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is @@ -408,10 +411,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] * is diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java index a9e4515a..8f38103d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the SetInventory operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [SetInventory][] method.
    + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.SetInventoryMetadata} @@ -262,7 +263,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the SetInventory operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [SetInventory][] method.
    +   * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.SetInventoryMetadata} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java index 14738eb4..19444c20 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [SetInventory][] method.
    + * Request message for
    + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.SetInventoryRequest} @@ -169,8 +171,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -188,22 +191,25 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -228,8 +234,9 @@ public boolean hasInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -247,22 +254,25 @@ public boolean hasInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -289,8 +299,9 @@ public com.google.cloud.retail.v2alpha.Product getInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -308,22 +319,25 @@ public com.google.cloud.retail.v2alpha.Product getInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -673,7 +687,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [SetInventory][] method.
    +   * Request message for
    +   * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.SetInventoryRequest} @@ -887,8 +903,9 @@ public Builder mergeFrom( * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -906,22 +923,25 @@ public Builder mergeFrom( * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -945,8 +965,9 @@ public boolean hasInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -964,22 +985,25 @@ public boolean hasInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1009,8 +1033,9 @@ public com.google.cloud.retail.v2alpha.Product getInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1028,22 +1053,25 @@ public com.google.cloud.retail.v2alpha.Product getInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1075,8 +1103,9 @@ public Builder setInventory(com.google.cloud.retail.v2alpha.Product value) { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1094,22 +1123,25 @@ public Builder setInventory(com.google.cloud.retail.v2alpha.Product value) { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1138,8 +1170,9 @@ public Builder setInventory(com.google.cloud.retail.v2alpha.Product.Builder buil * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1157,22 +1190,25 @@ public Builder setInventory(com.google.cloud.retail.v2alpha.Product.Builder buil * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1208,8 +1244,9 @@ public Builder mergeInventory(com.google.cloud.retail.v2alpha.Product value) { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1227,22 +1264,25 @@ public Builder mergeInventory(com.google.cloud.retail.v2alpha.Product value) { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1272,8 +1312,9 @@ public Builder clearInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1291,22 +1332,25 @@ public Builder clearInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1330,8 +1374,9 @@ public com.google.cloud.retail.v2alpha.Product.Builder getInventoryBuilder() { * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1349,22 +1394,25 @@ public com.google.cloud.retail.v2alpha.Product.Builder getInventoryBuilder() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1392,8 +1440,9 @@ public com.google.cloud.retail.v2alpha.ProductOrBuilder getInventoryOrBuilder() * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -1411,22 +1460,25 @@ public com.google.cloud.retail.v2alpha.ProductOrBuilder getInventoryOrBuilder() * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequestOrBuilder.java index 272b5383..a043a2b8 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequestOrBuilder.java @@ -35,8 +35,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -54,22 +55,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -91,8 +95,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -110,22 +115,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -147,8 +155,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2alpha.Product] named in * [Product.name][google.cloud.retail.v2alpha.Product.name], regardless of @@ -166,22 +175,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] * * [Product.availability][google.cloud.retail.v2alpha.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + * should be invoked instead. * * * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java index b27674c4..7a1758bd 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the SetInventoryRequest.  Currently empty because
    - * there is no meaningful response populated from the [SetInventory][]
    + * there is no meaningful response populated from the
    + * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory]
      * method.
      * 
    * @@ -261,7 +262,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the SetInventoryRequest.  Currently empty because
    -   * there is no meaningful response populated from the [SetInventory][]
    +   * there is no meaningful response populated from the
    +   * [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java new file mode 100644 index 00000000..c19a0532 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Metadata associated with a tune operation.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.TuneModelMetadata} + */ +public final class TuneModelMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.TuneModelMetadata) + TuneModelMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuneModelMetadata.newBuilder() to construct. + private TuneModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuneModelMetadata() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuneModelMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TuneModelMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.TuneModelMetadata.class, + com.google.cloud.retail.v2alpha.TuneModelMetadata.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
    +   * The resource name of the model that this tune applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
    +   * The resource name of the model that this tune applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.TuneModelMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.TuneModelMetadata other = + (com.google.cloud.retail.v2alpha.TuneModelMetadata) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.TuneModelMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Metadata associated with a tune operation.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.TuneModelMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.TuneModelMetadata) + com.google.cloud.retail.v2alpha.TuneModelMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.TuneModelMetadata.class, + com.google.cloud.retail.v2alpha.TuneModelMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.TuneModelMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.TuneModelMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelMetadata build() { + com.google.cloud.retail.v2alpha.TuneModelMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelMetadata buildPartial() { + com.google.cloud.retail.v2alpha.TuneModelMetadata result = + new com.google.cloud.retail.v2alpha.TuneModelMetadata(this); + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.TuneModelMetadata) { + return mergeFrom((com.google.cloud.retail.v2alpha.TuneModelMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.TuneModelMetadata other) { + if (other == com.google.cloud.retail.v2alpha.TuneModelMetadata.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.TuneModelMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.TuneModelMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object model_ = ""; + /** + * + * + *
    +     * The resource name of the model that this tune applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The resource name of the model that this tune applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The resource name of the model that this tune applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The resource name of the model that this tune applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The resource name of the model that this tune applies to.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * string model = 1; + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.TuneModelMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.TuneModelMetadata) + private static final com.google.cloud.retail.v2alpha.TuneModelMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.TuneModelMetadata(); + } + + public static com.google.cloud.retail.v2alpha.TuneModelMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuneModelMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TuneModelMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadataOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadataOrBuilder.java new file mode 100644 index 00000000..d0d6d8d8 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadataOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface TuneModelMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.TuneModelMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The resource name of the model that this tune applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
    +   * The resource name of the model that this tune applies to.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * string model = 1; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java new file mode 100644 index 00000000..4da818b2 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request to manually start a tuning process now (instead of waiting for
    + * the periodically scheduled tuning to happen).
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.TuneModelRequest} + */ +public final class TuneModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.TuneModelRequest) + TuneModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuneModelRequest.newBuilder() to construct. + private TuneModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuneModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuneModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TuneModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.TuneModelRequest.class, + com.google.cloud.retail.v2alpha.TuneModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The resource name of the model to tune.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The resource name of the model to tune.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.TuneModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.TuneModelRequest other = + (com.google.cloud.retail.v2alpha.TuneModelRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.TuneModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request to manually start a tuning process now (instead of waiting for
    +   * the periodically scheduled tuning to happen).
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.TuneModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.TuneModelRequest) + com.google.cloud.retail.v2alpha.TuneModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.TuneModelRequest.class, + com.google.cloud.retail.v2alpha.TuneModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.TuneModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.TuneModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelRequest build() { + com.google.cloud.retail.v2alpha.TuneModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelRequest buildPartial() { + com.google.cloud.retail.v2alpha.TuneModelRequest result = + new com.google.cloud.retail.v2alpha.TuneModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.TuneModelRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.TuneModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.TuneModelRequest other) { + if (other == com.google.cloud.retail.v2alpha.TuneModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.TuneModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.retail.v2alpha.TuneModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The resource name of the model to tune.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The resource name of the model to tune.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The resource name of the model to tune.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The resource name of the model to tune.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The resource name of the model to tune.
    +     * Format:
    +     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.TuneModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.TuneModelRequest) + private static final com.google.cloud.retail.v2alpha.TuneModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.TuneModelRequest(); + } + + public static com.google.cloud.retail.v2alpha.TuneModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuneModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TuneModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequestOrBuilder.java new file mode 100644 index 00000000..2f37fd7b --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface TuneModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.TuneModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The resource name of the model to tune.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The resource name of the model to tune.
    +   * Format:
    +   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java new file mode 100644 index 00000000..0dc405d6 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java @@ -0,0 +1,458 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Response associated with a tune operation.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.TuneModelResponse} + */ +public final class TuneModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.TuneModelResponse) + TuneModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuneModelResponse.newBuilder() to construct. + private TuneModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuneModelResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuneModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TuneModelResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.TuneModelResponse.class, + com.google.cloud.retail.v2alpha.TuneModelResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.TuneModelResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.TuneModelResponse other = + (com.google.cloud.retail.v2alpha.TuneModelResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.TuneModelResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Response associated with a tune operation.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.TuneModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.TuneModelResponse) + com.google.cloud.retail.v2alpha.TuneModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.TuneModelResponse.class, + com.google.cloud.retail.v2alpha.TuneModelResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.TuneModelResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.TuneModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelResponse build() { + com.google.cloud.retail.v2alpha.TuneModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelResponse buildPartial() { + com.google.cloud.retail.v2alpha.TuneModelResponse result = + new com.google.cloud.retail.v2alpha.TuneModelResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.TuneModelResponse) { + return mergeFrom((com.google.cloud.retail.v2alpha.TuneModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.TuneModelResponse other) { + if (other == com.google.cloud.retail.v2alpha.TuneModelResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.TuneModelResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.TuneModelResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.TuneModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.TuneModelResponse) + private static final com.google.cloud.retail.v2alpha.TuneModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.TuneModelResponse(); + } + + public static com.google.cloud.retail.v2alpha.TuneModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuneModelResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TuneModelResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.TuneModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponseOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponseOrBuilder.java new file mode 100644 index 00000000..4a0145ac --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface TuneModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.TuneModelResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java new file mode 100644 index 00000000..a50da072 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java @@ -0,0 +1,1037 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +/** + * + * + *
    + * Request for updating an existing model.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.UpdateModelRequest} + */ +public final class UpdateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2alpha.UpdateModelRequest) + UpdateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateModelRequest.newBuilder() to construct. + private UpdateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateModelRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateModelRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Model.Builder subBuilder = null; + if (model_ != null) { + subBuilder = model_.toBuilder(); + } + model_ = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(model_); + model_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.UpdateModelRequest.class, + com.google.cloud.retail.v2alpha.UpdateModelRequest.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private com.google.cloud.retail.v2alpha.Model model_; + /** + * + * + *
    +   * Required. The body of the updated [Model].
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
    +   * Required. The body of the updated [Model].
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.Model getModel() { + return model_ == null ? com.google.cloud.retail.v2alpha.Model.getDefaultInstance() : model_; + } + /** + * + * + *
    +   * Required. The body of the updated [Model].
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2alpha.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
    +   * Optional. Indicates which fields in the provided 'model' to
    +   * update. If not set, will by default update all fields.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
    +   * Optional. Indicates which fields in the provided 'model' to
    +   * update. If not set, will by default update all fields.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
    +   * Optional. Indicates which fields in the provided 'model' to
    +   * update. If not set, will by default update all fields.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (model_ != null) { + output.writeMessage(1, getModel()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getModel()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2alpha.UpdateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2alpha.UpdateModelRequest other = + (com.google.cloud.retail.v2alpha.UpdateModelRequest) obj; + + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2alpha.UpdateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request for updating an existing model.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2alpha.UpdateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2alpha.UpdateModelRequest) + com.google.cloud.retail.v2alpha.UpdateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2alpha.UpdateModelRequest.class, + com.google.cloud.retail.v2alpha.UpdateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2alpha.UpdateModelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2alpha.ModelServiceProto + .internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2alpha.UpdateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateModelRequest build() { + com.google.cloud.retail.v2alpha.UpdateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateModelRequest buildPartial() { + com.google.cloud.retail.v2alpha.UpdateModelRequest result = + new com.google.cloud.retail.v2alpha.UpdateModelRequest(this); + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2alpha.UpdateModelRequest) { + return mergeFrom((com.google.cloud.retail.v2alpha.UpdateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateModelRequest other) { + if (other == com.google.cloud.retail.v2alpha.UpdateModelRequest.getDefaultInstance()) + return this; + if (other.hasModel()) { + mergeModel(other.getModel()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2alpha.UpdateModelRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2alpha.UpdateModelRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.retail.v2alpha.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + public com.google.cloud.retail.v2alpha.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.retail.v2alpha.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2alpha.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2alpha.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeModel(com.google.cloud.retail.v2alpha.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.retail.v2alpha.Model.newBuilder(model_) + .mergeFrom(value) + .buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2alpha.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.retail.v2alpha.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
    +     * Required. The body of the updated [Model].
    +     * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2alpha.Model, + com.google.cloud.retail.v2alpha.Model.Builder, + com.google.cloud.retail.v2alpha.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
    +     * Optional. Indicates which fields in the provided 'model' to
    +     * update. If not set, will by default update all fields.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2alpha.UpdateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2alpha.UpdateModelRequest) + private static final com.google.cloud.retail.v2alpha.UpdateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2alpha.UpdateModelRequest(); + } + + public static com.google.cloud.retail.v2alpha.UpdateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateModelRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2alpha.UpdateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequestOrBuilder.java new file mode 100644 index 00000000..ee10f065 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2alpha/model_service.proto + +package com.google.cloud.retail.v2alpha; + +public interface UpdateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2alpha.UpdateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The body of the updated [Model].
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + /** + * + * + *
    +   * Required. The body of the updated [Model].
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + com.google.cloud.retail.v2alpha.Model getModel(); + /** + * + * + *
    +   * Required. The body of the updated [Model].
    +   * 
    + * + * .google.cloud.retail.v2alpha.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2alpha.ModelOrBuilder getModelOrBuilder(); + + /** + * + * + *
    +   * Optional. Indicates which fields in the provided 'model' to
    +   * update. If not set, will by default update all fields.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
    +   * Optional. Indicates which fields in the provided 'model' to
    +   * update. If not set, will by default update all fields.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
    +   * Optional. Indicates which fields in the provided 'model' to
    +   * update. If not set, will by default update all fields.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java index 10d71a16..c17e9f1e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [UpdateProduct][] method.
    + * Request message for
    + * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.UpdateProductRequest} @@ -227,6 +229,10 @@ public com.google.cloud.retail.v2alpha.ProductOrBuilder getProductOrBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -247,6 +253,10 @@ public boolean hasUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -267,6 +277,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -487,7 +501,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [UpdateProduct][] method.
    +   * Request message for
    +   * [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2alpha.UpdateProductRequest} @@ -951,6 +967,10 @@ public com.google.cloud.retail.v2alpha.ProductOrBuilder getProductOrBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -970,6 +990,10 @@ public boolean hasUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -995,6 +1019,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1022,6 +1050,10 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1046,6 +1078,10 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1075,6 +1111,10 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1100,6 +1140,10 @@ public Builder clearUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1119,6 +1163,10 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1142,6 +1190,10 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequestOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequestOrBuilder.java index 7130a777..fe67f353 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequestOrBuilder.java @@ -95,6 +95,10 @@ public interface UpdateProductRequestOrBuilder * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -112,6 +116,10 @@ public interface UpdateProductRequestOrBuilder * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -129,6 +137,10 @@ public interface UpdateProductRequestOrBuilder * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java index e04da86d..90c32165 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java @@ -415,10 +415,13 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. * @@ -447,10 +450,13 @@ public java.lang.String getVisitorId() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. * @@ -754,11 +760,10 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * *
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -779,11 +784,10 @@ public java.util.List getProductD
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -805,11 +809,10 @@ public java.util.List getProductD
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -830,11 +833,10 @@ public int getProductDetailsCount() {
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -855,11 +857,10 @@ public com.google.cloud.retail.v2alpha.ProductDetail getProductDetails(int index
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -2701,10 +2702,13 @@ public Builder setEventTypeBytes(com.google.protobuf.ByteString value) {
          * For example, this could be implemented with an HTTP cookie, which should be
          * able to uniquely identify a visitor on a single device. This unique
          * identifier should not change if the visitor log in/out of the website.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded model
    +     * quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * The field should not contain PII or user-data. We recommend to use Google
    -     * Analystics [Client
    +     * Analytics [Client
          * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
          * for this field.
          * 
    @@ -2732,10 +2736,13 @@ public java.lang.String getVisitorId() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -2763,10 +2770,13 @@ public com.google.protobuf.ByteString getVisitorIdBytes() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -2793,10 +2803,13 @@ public Builder setVisitorId(java.lang.String value) { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -2819,10 +2832,13 @@ public Builder clearVisitorId() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -3599,11 +3615,10 @@ private void ensureProductDetailsIsMutable() { * *
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3627,11 +3642,10 @@ public java.util.List getProductD
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3655,11 +3669,10 @@ public int getProductDetailsCount() {
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3683,11 +3696,10 @@ public com.google.cloud.retail.v2alpha.ProductDetail getProductDetails(int index
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3718,11 +3730,10 @@ public Builder setProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3750,11 +3761,10 @@ public Builder setProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3784,11 +3794,10 @@ public Builder addProductDetails(com.google.cloud.retail.v2alpha.ProductDetail v
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3819,11 +3828,10 @@ public Builder addProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3851,11 +3859,10 @@ public Builder addProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3883,11 +3890,10 @@ public Builder addProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3915,11 +3921,10 @@ public Builder addAllProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3946,11 +3951,10 @@ public Builder clearProductDetails() {
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3977,11 +3981,10 @@ public Builder removeProductDetails(int index) {
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4002,11 +4005,10 @@ public com.google.cloud.retail.v2alpha.ProductDetail.Builder getProductDetailsBu
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4031,11 +4033,10 @@ public com.google.cloud.retail.v2alpha.ProductDetailOrBuilder getProductDetailsO
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4060,11 +4061,10 @@ public com.google.cloud.retail.v2alpha.ProductDetailOrBuilder getProductDetailsO
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4085,11 +4085,10 @@ public com.google.cloud.retail.v2alpha.ProductDetail.Builder addProductDetailsBu
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4111,11 +4110,10 @@ public com.google.cloud.retail.v2alpha.ProductDetail.Builder addProductDetailsBu
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java
    index 18a0dcdb..bb480d02 100644
    --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java
    +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventOrBuilder.java
    @@ -76,10 +76,13 @@ public interface UserEventOrBuilder
        * For example, this could be implemented with an HTTP cookie, which should be
        * able to uniquely identify a visitor on a single device. This unique
        * identifier should not change if the visitor log in/out of the website.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded model
    +   * quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * The field should not contain PII or user-data. We recommend to use Google
    -   * Analystics [Client
    +   * Analytics [Client
        * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
        * for this field.
        * 
    @@ -97,10 +100,13 @@ public interface UserEventOrBuilder * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -322,11 +328,10 @@ public interface UserEventOrBuilder * *
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -344,11 +349,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -366,11 +370,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -388,11 +391,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -411,11 +413,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java
    index c34f6d96..6c7499f5 100644
    --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java
    +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java
    @@ -141,8 +141,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        *
        * 
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    @@ -168,8 +171,11 @@ public java.lang.String getUserId() { * *
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    @@ -724,8 +730,11 @@ public Builder mergeFrom( * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -750,8 +759,11 @@ public java.lang.String getUserId() { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -776,8 +788,11 @@ public com.google.protobuf.ByteString getUserIdBytes() { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -801,8 +816,11 @@ public Builder setUserId(java.lang.String value) { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -822,8 +840,11 @@ public Builder clearUserId() { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfoOrBuilder.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfoOrBuilder.java index 0cc8a9d5..58140d7f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfoOrBuilder.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfoOrBuilder.java @@ -28,8 +28,11 @@ public interface UserInfoOrBuilder * *
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    @@ -44,8 +47,11 @@ public interface UserInfoOrBuilder * *
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto index 9b3d8cb0..f6c114d7 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog.proto @@ -42,10 +42,10 @@ message ProductLevelConfig { // default to // [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] // if unset. - // * `variant`: You can only ingest - // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] - // [Product][google.cloud.retail.v2alpha.Product]s. - // This means + // * `variant` (incompatible with Retail Search): You can only + // ingest + // [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] + // [Product][google.cloud.retail.v2alpha.Product]s. This means // [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] // cannot be empty. // @@ -56,8 +56,8 @@ message ProductLevelConfig { // [merchant_center_product_id_field][google.cloud.retail.v2alpha.ProductLevelConfig.merchant_center_product_id_field] // is `itemGroupId`, an INVALID_ARGUMENT error is returned. // - // See [Using product - // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + // See [Product + // levels](https://cloud.google.com/retail/docs/catalog#product-levels) // for more details. string ingestion_product_type = 1; @@ -78,8 +78,8 @@ message ProductLevelConfig { // [ingestion_product_type][google.cloud.retail.v2alpha.ProductLevelConfig.ingestion_product_type] // is `variant`, an INVALID_ARGUMENT error is returned. // - // See [Using product - // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + // See [Product + // levels](https://cloud.google.com/retail/docs/catalog#product-levels) // for more details. string merchant_center_product_id_field = 2; } @@ -144,6 +144,10 @@ message CatalogAttribute { // Required. Attribute name. // For example: `color`, `brands`, `attributes.custom_attribute`, such as // `attributes.xyz`. + // To be indexable, the attribute name can contain only alpha-numeric + // characters and underscores. For example, an attribute named + // `attributes.abc_xyz` can be indexed, but an attribute named + // `attributes.abc-xyz` cannot be indexed. string key = 1 [(google.api.field_behavior) = REQUIRED]; // Output only. Indicates whether this attribute has been used by any @@ -153,15 +157,21 @@ message CatalogAttribute { // Otherwise, this field is `False`. // // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be - // pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - // or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + // pre-loaded by using + // [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute], + // [CatalogService.ImportCatalogAttributes][google.cloud.retail.v2alpha.CatalogService.ImportCatalogAttributes], + // or + // [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] + // APIs. This field is `False` for pre-loaded // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. // - // Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that - // are not in use by products can be deleted. + // Only pre-loaded // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are - // in use by products cannot be deleted; however, their configuration - // properties will reset to default values upon removal request. + // neither in use by products nor predefined can be deleted. + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + // either in use by products or are predefined cannot be deleted; however, + // their configuration properties will reset to default values upon removal + // request. // // After catalog changes, it takes about 10 minutes for this field to update. bool in_use = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -194,6 +204,14 @@ message CatalogAttribute { // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], // as there are no text values associated to numerical attributes. SearchableOption searchable_option = 7; + + // When + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, + // attribute values are filterable for recommendations. + // This option works for categorical features only, + // does not work for numerical features, inventory filtering. + RecommendationsFilteringOption recommendations_filtering_option = 8; } // Catalog level attribute config. @@ -254,14 +272,18 @@ message CompletionConfig { // Default value: 'exact-prefix'. string matching_order = 2; - // The maximum number of autocomplete suggestions returned per term. The - // maximum allowed max suggestions is 20. Default value is 20. If left unset - // or set to 0, then will fallback to default value. + // The maximum number of autocomplete suggestions returned per term. Default + // value is 20. If left unset or set to 0, then will fallback to default + // value. + // + // Value range is 1 to 20. int32 max_suggestions = 3; // The minimum number of characters needed to be typed in order to get // suggestions. Default value is 2. If left unset or set to 0, then will // fallback to default value. + // + // Value range is 1 to 20. int32 min_prefix_length = 4; // If set to true, the auto learning function is enabled. Auto learning uses @@ -271,8 +293,8 @@ message CompletionConfig { // [CompleteQueryRequest][google.cloud.retail.v2alpha.CompleteQueryRequest]. bool auto_learning = 11; - // Output only. The input config for the import of the source data that - // contains the autocomplete phrases uploaded by the customer. + // Output only. The source data for the latest import of the autocomplete + // suggestion phrases. CompletionDataInputConfig suggestions_input_config = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -284,24 +306,24 @@ message CompletionConfig { string last_suggestions_import_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The input config for the import of the source data that - // contains the / autocomplete denylist phrases uploaded by the customer. + // Output only. The source data for the latest import of the autocomplete + // denylist phrases. CompletionDataInputConfig denylist_input_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. LRO corresponding to the latest denylist import. + // Output only. Name of the LRO corresponding to the latest denylist import. // // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to // retrieve the latest state of the Long Running Operation. string last_denylist_import_operation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The input config for the import of the source data that - // contains the autocomplete allowlist phrases uploaded by the customer. + // Output only. The source data for the latest import of the autocomplete + // allowlist phrases. CompletionDataInputConfig allowlist_input_config = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. LRO corresponding to the latest allowlist import. + // Output only. Name of the LRO corresponding to the latest allowlist import. // // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to // retrieve the latest state of the Long Running Operation. diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog_service.proto index 6ecab725..088c0192 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/catalog_service.proto @@ -384,7 +384,7 @@ message UpdateCompletionConfigRequest { // method. message GetAttributesConfigRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -417,7 +417,7 @@ message UpdateAttributesConfigRequest { // method. message AddCatalogAttributeRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string attributes_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -436,7 +436,7 @@ message AddCatalogAttributeRequest { // method. message RemoveCatalogAttributeRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string attributes_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -454,7 +454,7 @@ message RemoveCatalogAttributeRequest { // method. message ReplaceCatalogAttributeRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string attributes_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto index ae33d3f6..02cf05ba 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/common.proto @@ -30,7 +30,7 @@ option ruby_package = "Google::Cloud::Retail::V2alpha"; // At which level we offer configuration for attributes. enum AttributeConfigLevel { - // Value used when unset. Defaults to + // Value used when unset. In this case, server behavior defaults to // [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2alpha.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG]. ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED = 0; @@ -55,10 +55,24 @@ enum SolutionType { SOLUTION_TYPE_SEARCH = 2; } +// If filtering for recommendations is enabled. +enum RecommendationsFilteringOption { + // Value used when unset. + // In this case, server behavior defaults to + // [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2alpha.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED]. + RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0; + + // Recommendation filtering is disabled. + RECOMMENDATIONS_FILTERING_DISABLED = 1; + + // Recommendation filtering is enabled. + RECOMMENDATIONS_FILTERING_ENABLED = 3; +} + // The use case of Cloud Retail Search. enum SearchSolutionUseCase { - // The value when it's unspecified. Defaults to - // [SEARCH][]. + // The value when it's unspecified. In this case, server behavior defaults to + // [SEARCH_SOLUTION_USE_CASE_SEARCH][]. SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; // Search use case. Expects the traffic has a non-empty @@ -157,10 +171,13 @@ message Rule { } // * Rule Condition: - // - No [Condition][query_terms] provided is a global match. - // - 1 or more [Condition][query_terms] provided is combined with OR - // operator. - // * Action Input: The request query and filter that will be applied to the + // - No + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // provided is a global match. + // - 1 or more + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms] + // provided are combined with OR operator. + // * Action Input: The request query and filter that are applied to the // retrieved products, in addition to any filters already provided with the // SearchRequest. The AND operator is used to combine the query's existing // filters with the filter rule(s). NOTE: May result in 0 results when @@ -187,8 +204,10 @@ message Rule { } // Redirects a shopper to a specific page. + // // * Rule Condition: - // - Must specify [Condition][query_terms]. + // - Must specify + // [Condition.query_terms][google.cloud.retail.v2alpha.Condition.query_terms]. // * Action Input: Request Query // * Action Result: Redirects shopper to provided uri. message RedirectAction { @@ -388,11 +407,13 @@ message CustomAttribute { // set. Otherwise, an INVALID_ARGUMENT error is returned. repeated double numbers = 2; - // This field will only be used when + // This field is normally ignored unless // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] - // of the [Catalog][google.cloud.retail.v2alpha.Catalog] is - // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are - // searchable by text queries in + // of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the + // deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about + // product-level attribute configuration, see [Configuration + // modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). + // If true, custom attribute values are searchable by text queries in // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. // // This field is ignored in a @@ -400,13 +421,16 @@ message CustomAttribute { // // Only set if type [text][google.cloud.retail.v2alpha.CustomAttribute.text] // is set. Otherwise, a INVALID_ARGUMENT error is returned. - optional bool searchable = 3; + optional bool searchable = 3 [deprecated = true]; - // This field will only be used when + // This field is normally ignored unless // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] - // of the [Catalog][google.cloud.retail.v2alpha.Catalog] is - // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are - // indexed, so that it can be filtered, faceted or boosted in + // of the [Catalog][google.cloud.retail.v2alpha.Catalog] is set to the + // deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about + // product-level attribute configuration, see [Configuration + // modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). + // If true, custom attribute values are indexed, so that they can be filtered, + // faceted or boosted in // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. // // This field is ignored in a @@ -418,7 +442,7 @@ message CustomAttribute { // and // [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] // for more details. - optional bool indexable = 4; + optional bool indexable = 4 [deprecated = true]; } // Fulfillment information, such as the store IDs for in-store pickup or region @@ -490,9 +514,8 @@ message Interval { // The lower bound of the interval. If neither of the min fields are set, then // the lower bound is negative infinity. // - // This field must be not larger than - // [max][google.cloud.retail.v2alpha.Interval.max]. Otherwise, an - // INVALID_ARGUMENT error is returned. + // This field must not be larger than max. + // Otherwise, an INVALID_ARGUMENT error is returned. oneof min { // Inclusive lower bound. double minimum = 1; @@ -504,9 +527,8 @@ message Interval { // The upper bound of the interval. If neither of the max fields are set, then // the upper bound is positive infinity. // - // This field must be not smaller than - // [min][google.cloud.retail.v2alpha.Interval.min]. Otherwise, an - // INVALID_ARGUMENT error is returned. + // This field must be not smaller than min. + // Otherwise, an INVALID_ARGUMENT error is returned. oneof max { // Inclusive upper bound. double maximum = 3; @@ -563,7 +585,11 @@ message PriceInfo { float price = 2; // Price of the product without any discount. If zero, by default set to be - // the [price][google.cloud.retail.v2alpha.PriceInfo.price]. + // the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set, + // [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] + // should be greater than or equal to + // [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an + // INVALID_ARGUMENT error is thrown. float original_price = 3; // The costs associated with the sale of a particular product. Used for gross @@ -650,10 +676,14 @@ message Rating { // Information of an end user. message UserInfo { // Highly recommended for logged-in users. Unique identifier for logged-in - // user, such as a user name. + // user, such as a user name. Don't set for anonymous users. // // Always use a hashed value for this ID. // + // Don't set the field to the same fixed ID for different users. This mixes + // the event history of those users together, which results in degraded + // model quality. + // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an INVALID_ARGUMENT error is returned. string user_id = 1; diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto index a91aa618..9f399d22 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/completion_service.proto @@ -99,6 +99,9 @@ message CompleteQueryRequest { // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 7; + // Note that this field applies for `user-data` dataset only. For requests + // with `cloud-retail` dataset, setting this field has no effect. + // // The language filters applied to the output suggestions. If set, it should // contain the language of the query. If not set, suggestions are returned // without considering language restrictions. This is the BCP-47 language @@ -133,9 +136,9 @@ message CompleteQueryRequest { // // * user-data // - // * cloud-retail - // This option requires additional allowlisting. Before using cloud-retail, - // contact Cloud Retail support team first. + // * cloud-retail: + // This option requires enabling auto-learning function first. See + // [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). string dataset = 6; // Completion max suggestions. If left unset or set to 0, then will fallback @@ -155,10 +158,14 @@ message CompleteQueryResponse { string suggestion = 1; // Custom attributes for the suggestion term. + // // * For "user-data", the attributes are additional custom attributes // ingested through BigQuery. + // // * For "cloud-retail", the attributes are product attributes generated - // by Cloud Retail. + // by Cloud Retail. It requires + // [UserEvent.product_details][google.cloud.retail.v2alpha.UserEvent.product_details] + // is imported properly. map attributes = 2; } @@ -186,11 +193,15 @@ message CompleteQueryResponse { // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id] // field is set and [UserEvent][google.cloud.retail.v2alpha.UserEvent] is // imported. The recent searches satisfy the follow rules: + // // * They are ordered from latest to oldest. + // // * They are matched with // [CompleteQueryRequest.query][google.cloud.retail.v2alpha.CompleteQueryRequest.query] // case insensitively. - // * They are transformed to lower cases. + // + // * They are transformed to lower case. + // // * They are UTF-8 safe. // // Recent searches are deduplicated. More recent searches will be reserved diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control.proto index 4d85015e..cdd683d5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control.proto @@ -54,7 +54,7 @@ message Control { } // Immutable. Fully qualified name - // projects/*/locations/global/catalogs/*/controls/* + // `projects/*/locations/global/catalogs/*/controls/*` string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Required. The human readable control display name. Used in Retail UI. diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control_service.proto index 6372aca6..d69201a3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/control_service.proto @@ -96,7 +96,7 @@ service ControlService { // Request for CreateControl method. message CreateControlRequest { // Required. Full resource name of parent catalog. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } @@ -131,7 +131,7 @@ message UpdateControlRequest { // Request for DeleteControl method. message DeleteControlRequest { // Required. The resource name of the Control to delete. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Control" } @@ -141,7 +141,7 @@ message DeleteControlRequest { // Request for GetControl method. message GetControlRequest { // Required. The resource name of the Control to delete. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Control" } @@ -151,7 +151,7 @@ message GetControlRequest { // Request for ListControls method. message ListControlsRequest { // Required. The catalog resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/export_config.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/export_config.proto index f29c7f9a..7260a139 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/export_config.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/export_config.proto @@ -60,8 +60,11 @@ message ExportProductsResponse { // A sample of errors encountered while processing the request. repeated google.rpc.Status error_samples = 1; - // Echoes the destination for the complete errors in the request if set. + // This field is never set. ExportErrorsConfig errors_config = 2; + + // Output result indicating where the data were exported to. + OutputResult output_result = 3; } // Response of the ExportUserEventsRequest. If the long running @@ -71,7 +74,24 @@ message ExportUserEventsResponse { // A sample of errors encountered while processing the request. repeated google.rpc.Status error_samples = 1; - // Echoes the destination for the complete errors if this field was set in - // the request. + // This field is never set. ExportErrorsConfig errors_config = 2; + + // Output result indicating where the data were exported to. + OutputResult output_result = 3; +} + +// Output result. +message OutputResult { + // Export result in BigQuery. + repeated BigQueryOutputResult bigquery_result = 1; +} + +// A BigQuery output result. +message BigQueryOutputResult { + // The ID of a BigQuery Dataset. + string dataset_id = 1; + + // The ID of a BigQuery Table. + string table_id = 2; } diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto index a1fcf240..319edb1e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/import_config.proto @@ -217,16 +217,32 @@ message ImportProductsRequest { // [ReconciliationMode.INCREMENTAL][google.cloud.retail.v2alpha.ImportProductsRequest.ReconciliationMode.INCREMENTAL]. ReconciliationMode reconciliation_mode = 5; - // Pub/Sub topic for receiving notification. If this field is set, + // Full Pub/Sub topic name for receiving notification. If this field is set, // when the import is finished, a notification will be sent to // specified Pub/Sub topic. The message data will be JSON string of a // [Operation][google.longrunning.Operation]. - // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. + // + // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has + // to be within the same project as + // [ImportProductsRequest.parent][google.cloud.retail.v2alpha.ImportProductsRequest.parent]. + // Make sure that both + // `cloud-retail-customer-data-access@system.gserviceaccount.com` and + // `service-@gcp-sa-retail.iam.gserviceaccount.com` + // have the `pubsub.topics.publish` IAM permission on the topic. // // Only supported when // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] // is set to `FULL`. string notification_pubsub_topic = 7; + + // If true, will perform the FULL import even if it would delete a large + // proportion of the products in the default branch, which could potentially + // cause outages if you have live predict/search traffic. + // + // Only supported when + // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] + // is set to `FULL`. + bool skip_default_branch_protection = 8; } // Request message for the ImportUserEvents request. diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto new file mode 100644 index 00000000..5f4ead9f --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model.proto @@ -0,0 +1,432 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.retail.v2alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/retail/v2alpha/common.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2alpha;retail"; +option java_multiple_files = true; +option java_outer_classname = "ModelProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// Metadata that describes the training and serving parameters of a +// [Model][google.cloud.retail.v2alpha.Model]. A +// [Model][google.cloud.retail.v2alpha.Model] can be associated with a +// [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] and then queried +// through the Predict api. +message Model { + option (google.api.resource) = { + type: "retail.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}" + }; + + // The PageOptimizationConfig for model training. + // + // This determines how many panels to optimize for, and which serving + // configurations to consider for each panel. + // The purpose of this model is to optimize which + // [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to show on which + // panels in way that optimizes the visitors shopping journey. + message PageOptimizationConfig { + // A candidate to consider for a given panel. Currently only + // [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] are valid + // candidates. + message Candidate { + oneof candidate { + // This has to be a valid + // [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] + // identifier. e.g. for a ServingConfig with full name: + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config` + // this would be 'my_candidate_config' + string serving_config_id = 1; + } + } + + // An individual panel with a list of + // [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] to consider + // for it. + message Panel { + // Optional. The name to display for the panel. + string display_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The candidates to consider on the panel. + // + // Limit = 10. + repeated Candidate candidates = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The default candidate (in case the model fails at serving + // time, we can fall back to the default). + Candidate default_candidate = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Restrictions of expected returned results. + enum Restriction { + // Unspecified value for restriction. + RESTRICTION_UNSPECIFIED = 0; + + // Allow any [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] to + // be show on any number of panels. + // + // Example: + // + // `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity + // + // `Panel2 candidates`: home_page_ctr_no_diversity, + // home_page_ctr_diversity, + // pdp_cvr_no_diversity + // + // `Restriction` = NO_RESTRICTION + // + // `Valid combinations`: + // + // * (pdp_ctr, home_page_ctr_no_diversity) + // * (pdp_ctr, home_page_ctr_diversity) + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_cvr, home_page_ctr_no_diversity) + // * (pdp_cvr, home_page_ctr_diversity) + // * (pdp_cvr, pdp_cvr_no_diversity) + // * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) + // * (home_page_ctr_no_diversity, home_page_ctr_diversity) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) + // + // `Invalid combinations`: [] + NO_RESTRICTION = 1; + + // Do not allow the same + // [ServingConfig.name][google.cloud.retail.v2alpha.ServingConfig.name] to + // be shown on multiple panels. + // + // Example: + // + // `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity + // + // + // `Panel2 candidates`: home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, + // pdp_cvr_no_diversity + // + // `Restriction` = UNIQUE_SERVING_CONFIG_RESTRICTION + // + // `Valid combinations`: + // + // * (pdp_ctr, home_page_ctr_no_diversity) + // * (pdp_ctr, home_page_ctr_diversity_low) + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_cvr, home_page_ctr_no_diversity) + // * (pdp_cvr, home_page_ctr_diversity_low) + // * (pdp_cvr, pdp_cvr_no_diversity) + // * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) + // + // `Invalid combinations`: + // + // * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) + UNIQUE_SERVING_CONFIG_RESTRICTION = 2; + + // Do not allow multiple + // [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] with same + // [Model.name][google.cloud.retail.v2alpha.Model.name] to be show on on + // different panels. + // + // Example: + // + // `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity + // + // + // `Panel2 candidates`: home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, + // pdp_cvr_no_diversity + // + // `Restriction` = UNIQUE_MODEL_RESTRICTION + // + // `Valid combinations`: + // + // * (pdp_ctr, home_page_ctr_no_diversity) + // * (pdp_ctr, home_page_ctr_diversity) + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_cvr, home_page_ctr_no_diversity) + // * (pdp_cvr, home_page_ctr_diversity_low) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) + // + // `Invalid combinations`: + // + // * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) + // * (pdp_cvr, pdp_cvr_no_diversity) + UNIQUE_MODEL_RESTRICTION = 3; + + // Do not allow multiple + // [ServingConfigs][google.cloud.retail.v2alpha.ServingConfig] with same + // [Model.type][google.cloud.retail.v2alpha.Model.type] to be shown on + // different panels. + // + // Example: + // + // `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity + // + // + // `Panel2 candidates`: home_page_ctr_no_diversity, + // home_page_ctr_diversity_low, + // pdp_cvr_no_diversity + // + // `Restriction` = UNIQUE_MODEL_RESTRICTION + // + // `Valid combinations`: + // + // * (pdp_ctr, home_page_ctr_no_diversity) + // * (pdp_ctr, home_page_ctr_diversity) + // * (pdp_cvr, home_page_ctr_no_diversity) + // * (pdp_cvr, home_page_ctr_diversity_low) + // * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) + // + // `Invalid combinations`: + // + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_ctr, pdp_cvr_no_diversity) + // * (pdp_cvr, pdp_cvr_no_diversity) + // * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) + // * (home_page_ctr_no_diversity, home_page_ctr_diversity) + UNIQUE_MODEL_TYPE_RESTRICTION = 4; + } + + // Required. The type of [UserEvent][google.cloud.retail.v2alpha.UserEvent] + // this page optimization is shown for. + // + // Each page has an associated event type - this will be the + // corresponding event type for the page that the page optimization + // model is used on. + // + // Supported types: + // + // * `add-to-cart`: Products being added to cart. + // * `detail-page-view`: Products detail page viewed. + // * `home-page-view`: Homepage viewed + // * `category-page-view`: Homepage viewed + // * `shopping-cart-page-view`: User viewing a shopping cart. + // + // `home-page-view` only allows models with type `recommended-for-you`. + // All other page_optimization_event_type allow all + // [Model.types][google.cloud.retail.v2alpha.Model.type]. + string page_optimization_event_type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of panel configurations. + // + // Limit = 5. + repeated Panel panels = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How to restrict results across panels e.g. can the same + // [ServingConfig][google.cloud.retail.v2alpha.ServingConfig] be shown on + // multiple panels at once. + // + // If unspecified, default to `UNIQUE_MODEL_RESTRICTION`. + Restriction restriction = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents an ordered combination of valid serving configs, which + // / may be used for PAGE_OPTIMIZATION recommendations. + message ServingConfigList { + // Optional. A set of valid serving configs that may be used for + // PAGE_OPTIMIZATION. + repeated string serving_config_ids = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The serving state of the model. + enum ServingState { + // Unspecified serving state. + SERVING_STATE_UNSPECIFIED = 0; + + // The model is not serving. + INACTIVE = 1; + + // The model is serving and can be queried. + ACTIVE = 2; + + // The model is trained on tuned hyperparameters, and can be + // queried. + TUNED = 3; + } + + // The training state of the model. + enum TrainingState { + // Unspecified training state. + TRAINING_STATE_UNSPECIFIED = 0; + + // The model training is paused. + PAUSED = 1; + + // The model is training. + TRAINING = 2; + } + + // Describes whether periodic tuning is enabled for this model + // or not. Periodic tuning is scheduled at most every three months. You can + // start a tuning process manually by using the ModelTune + // method, which starts a tuning process immediately and resets the quarterly + // schedule. Enabling or disabling periodic tuning does not affect any + // current tuning processes. + enum PeriodicTuningState { + // Unspecified default value - should never be explicitly set. + PERIODIC_TUNING_STATE_UNSPECIFIED = 0; + + // The model has periodic tuning disabled. Tuning + // can be reenabled by calling the EnableModelPeriodicTuning + // method or by calling the TuneModel method. + PERIODIC_TUNING_DISABLED = 1; + + // The model cannot be tuned with periodic tuning OR the + // TuneModel method. Hide the options in customer UI and + // reject any requests through the backend self serve API. + ALL_TUNING_DISABLED = 3; + + // The model has periodic tuning enabled. Tuning + // can be disabled by calling the DisableModelPeriodicTuning + // method. + PERIODIC_TUNING_ENABLED = 2; + } + + // Describes whether this model have sufficient training data + // to be continuously trained. + enum DataState { + // Unspecified default value - should never be explicitly set. + DATA_STATE_UNSPECIFIED = 0; + + // The model has sufficient training data. + DATA_OK = 1; + + // The model does not have sufficient training data. Error + // messages can be queried via Stackdriver. + DATA_ERROR = 2; + } + + // Training configuration specific to a + // [Model.type][google.cloud.retail.v2alpha.Model.type] - currently, only for + // page optimization. + oneof training_config { + // Optional. The page optimization config. + PageOptimizationConfig page_optimization_config = 17 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The fully qualified resource name of the model. + // + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + // catalog_id has char limit of 50. + // recommendation_model_id has char limit of 40. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The display name of the model. + // + // Should be human readable, used to display Recommendation Models in the + // Retail Cloud Cosole Dashboard. UTF-8 encoded string with limit of 1024 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The training state that the model is in (e.g. + // TRAINING or PAUSED). + // + // Since part of the cost of running the service + // is frequency of training - this can be used to determine when to train + // model in order to control cost. If not specified: the default value for + // CreateModel method is TRAINING. the default value for + // UpdateModel method is to keep the state the same as before. + TrainingState training_state = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The serving state of the model: ACTIVE, NOT_ACTIVE. + ServingState serving_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp the Recommendation Model was created at. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp the Recommendation Model was last updated. E.g. + // if a Recommendation Model was paused - this would be the time the pause was + // initiated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The type of model e.g. `home-page`. + // + // Currently supported values: `recommended-for-you`, `others-you-may-like`, + // `frequently-bought-together`, `page-optimization`, 'similar-items', + // 'buy-it-again', `recently-viewed`(readonly value). + string type = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The optimization objective e.g. `cvr`. + // + // Currently supported + // values: `ctr`, `cvr`, `revenue-per-order`. + // + // If not specified, we choose default based on model type. + // Default depends on type of recommendation: + // + // `recommended-for-you` => `ctr` + // + // `others-you-may-like` => `ctr` + // + // `frequently-bought-together` => `revenue_per_order` + string optimization_objective = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The state of periodic tuning. + // + // The period we use is 3 months - to do a + // one-off tune earlier use the TuneModel method. Default value + // is PERIODIC_TUNING_ENABLED. + PeriodicTuningState periodic_tuning_state = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The timestamp when the latest successful tune finished. + google.protobuf.Timestamp last_tune_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tune operation associated with the model. + // + // Can be used to determine if there is an ongoing tune for this + // recommendation. Empty field implies no tune is goig on. + string tuning_operation = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of data requirements for this model: DATA_OK and + // DATA_ERROR. + // + // Recommendation model cannot be trained if the data is in + // DATA_ERROR state. Recommendation model can have DATA_ERROR state even if + // serving state is ACTIVE: models were trained successfully before, but + // cannot be refreshed because model no longer has sufficient + // data for training. + DataState data_state = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by + // attributes is enabled for the model. + RecommendationsFilteringOption filtering_option = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The list of valid serving configs associated with the + // PageOptimizationConfig. + repeated ServingConfigList serving_config_lists = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model_service.proto new file mode 100644 index 00000000..30690f53 --- /dev/null +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/model_service.proto @@ -0,0 +1,241 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.retail.v2alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/retail/v2alpha/model.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2alpha;retail"; +option java_multiple_files = true; +option java_outer_classname = "ModelServiceProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// Service for performing CRUD operations on models. +// Recommendation models contain all the metadata necessary to generate a set of +// models for the Predict() api. A model is queried +// indirectly via a ServingConfig, which associates a model with a +// given Placement (e.g. Frequently Bought Together on Home Page). +// +// This service allows customers to e.g.: +// +// * Initiate training of a model. +// * Pause training of an existing model. +// * List all the available models along with their metadata. +// * Control their tuning schedule. +service ModelService { + option (google.api.default_host) = "retail.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new model. + rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/models" + body: "model" + }; + option (google.api.method_signature) = "parent,model"; + option (google.longrunning.operation_info) = { + response_type: "Model" + metadata_type: "CreateModelMetadata" + }; + } + + // Pauses the training of an existing model. + rpc PauseModel(PauseModelRequest) returns (Model) { + option (google.api.http) = { + post: "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}:pause" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Resumes the training of an existing model. + rpc ResumeModel(ResumeModelRequest) returns (Model) { + option (google.api.http) = { + post: "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}:resume" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes an existing model. + rpc DeleteModel(DeleteModelRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all the models linked to this event store. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/models" + }; + option (google.api.method_signature) = "parent"; + } + + // Update of model metadata. Only fields that + // currently can be updated are: filtering_option, periodic_tuning_state. + // If other values are provided, this API method will ignore them. + rpc UpdateModel(UpdateModelRequest) returns (Model) { + option (google.api.http) = { + patch: "/v2alpha/{model.name=projects/*/locations/*/catalogs/*/models/*}" + body: "model" + }; + option (google.api.method_signature) = "model,update_mask"; + } + + // Tunes an existing model. + rpc TuneModel(TuneModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha/{name=projects/*/locations/*/catalogs/*/models/*}:tune" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "TuneModelResponse" + metadata_type: "TuneModelMetadata" + }; + } +} + +// Request for creating a model. +message CreateModelRequest { + // Required. The parent resource under which to create the model. Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } + ]; + + // Required. The payload of the [Model] to create. + Model model = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to run a dry_run to validate the request (without + // actually creating the model). + bool dry_run = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for updating an existing model. +message UpdateModelRequest { + // Required. The body of the updated [Model]. + Model model = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates which fields in the provided 'model' to + // update. If not set, will by default update all fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for pausing training of a model. +message PauseModelRequest { + // Required. The name of the model to pause. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Model" } + ]; +} + +// Request for resuming training of a model. +message ResumeModelRequest { + // Required. The name of the model to resume. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for listing models associated with a resource. +message ListModelsRequest { + // Required. The parent for which to list models. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } + ]; + + // Optional. Maximum number of results to return. If unspecified, defaults + // to 50. Max allowed value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListModels` + // call. Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for deleting a model. +message DeleteModelRequest { + // Required. The resource name of the [Model] to delete. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Model" } + ]; +} + +// Response to a ListModelRequest. +message ListModelsResponse { + // List of Models. + repeated Model models = 1; + + // Pagination token, if not returned indicates the last page. + string next_page_token = 2; +} + +// Request to manually start a tuning process now (instead of waiting for +// the periodically scheduled tuning to happen). +message TuneModelRequest { + // Required. The resource name of the model to tune. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Model" } + ]; +} + +// Metadata associated with a create operation. +message CreateModelMetadata { + // The resource name of the model that this create applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + string model = 1; +} + +// Metadata associated with a tune operation. +message TuneModelMetadata { + // The resource name of the model that this tune applies to. + // Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id} + string model = 1; +} + +// Response associated with a tune operation. +message TuneModelResponse {} diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/prediction_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/prediction_service.proto index 5b89bceb..fbb3d1ab 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/prediction_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/prediction_service.proto @@ -19,6 +19,7 @@ package google.cloud.retail.v2alpha; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/user_event.proto"; import "google/protobuf/struct.proto"; @@ -42,6 +43,10 @@ service PredictionService { option (google.api.http) = { post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/placements/*}:predict" body: "*" + additional_bindings { + post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:predict" + body: "*" + } }; } } @@ -49,20 +54,35 @@ service PredictionService { // Request message for Predict method. message PredictRequest { // Required. Full resource name of the format: - // {name=projects/*/locations/global/catalogs/default_catalog/placements/*} - // The ID of the Recommendations AI placement. Before you can request - // predictions from your model, you must create at least one placement for it. - // For more information, see [Managing - // placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). + // `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` + // or + // `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. + // We recommend using the `servingConfigs` resource. `placements` is a legacy + // resource. + // The ID of the Recommendations AI serving config or placement. + // Before you can request predictions from your model, you must create at + // least one serving config or placement for it. For more information, see + // [Managing serving configurations] + // (https://cloud.google.com/retail/docs/manage-configs). // - // The full list of available placements can be seen at - // https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + // The full list of available serving configs can be seen at + // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs string placement = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Context about the user, what they are looking at and what action // they took to trigger the predict request. Note that this user event detail // won't be ingested to userEvent logs. Thus, a separate userEvent write // request is required for event logging. + // + // Don't set + // [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] or + // [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] to the + // same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can negatively + // impact model performance), instead set + // [UserEvent.visitor_id][google.cloud.retail.v2alpha.UserEvent.visitor_id] to + // a random unique ID and leave + // [UserInfo.user_id][google.cloud.retail.v2alpha.UserInfo.user_id] unset. UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; // Maximum number of results to return per page. Set this property @@ -71,8 +91,8 @@ message PredictRequest { // above 100 will be coerced to 100. int32 page_size = 3; - // The previous PredictResponse.next_page_token. - string page_token = 4; + // This field is not used for now; leave it unset. + string page_token = 4 [deprecated = true]; // Filter for restricting prediction results with a length limit of 5,000 // characters. Accepts values for tags and the `filterOutOfStockItems` flag. @@ -103,6 +123,14 @@ message PredictRequest { // receive empty results instead. // Note that the API will never return items with storageStatus of "EXPIRED" // or "DELETED" regardless of filter choices. + // + // If `filterSyntaxV2` is set to true under the `params` field, then + // attribute-based expressions are expected instead of the above described + // tag-based syntax. Examples: + // + // * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + // * (availability: ANY("IN_STOCK")) AND + // (colors: ANY("Red") OR categories: ANY("Phones")) string filter = 5; // Use validate only mode for this prediction query. If set to true, a @@ -136,6 +164,8 @@ message PredictRequest { // 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives // request-level control and adjusts prediction results based on product // category. + // * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + // field is interpreteted according to the new, attribute-based syntax. map params = 7; // The labels applied to a resource must meet the following requirements: @@ -143,7 +173,7 @@ message PredictRequest { // * Each resource can have multiple labels, up to a maximum of 64. // * Each label must be a key-value pair. // * Keys have a minimum length of 1 character and a maximum length of 63 - // characters, and cannot be empty. Values can be empty, and have a maximum + // characters and cannot be empty. Values can be empty and have a maximum // length of 63 characters. // * Keys and values can contain only lowercase letters, numeric characters, // underscores, and dashes. All characters must use UTF-8 encoding, and @@ -169,9 +199,9 @@ message PredictResponse { // // Possible values: // - // * `product`: JSON representation of the product. Will be set if + // * `product`: JSON representation of the product. Is set if // `returnProduct` is set to true in `PredictRequest.params`. - // * `score`: Prediction score in double value. Will be set if + // * `score`: Prediction score in double value. Is set if // `returnScore` is set to true in `PredictRequest.params`. map metadata = 2; } diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto index cbadc568..f4826f1b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product.proto @@ -545,11 +545,11 @@ message Product { // * [name][google.cloud.retail.v2alpha.Product.name] // * [color_info][google.cloud.retail.v2alpha.Product.color_info] // - // Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + // The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is // returned. // // Note: Returning more fields in - // [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase + // [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] can increase // response payload size and serving latency. google.protobuf.FieldMask retrievable_fields = 30; diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto index 7bced3fb..1a5f702b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/product_service.proto @@ -95,8 +95,9 @@ service ProductService { // [Product][google.cloud.retail.v2alpha.Product]s, this operation could take // hours to complete. Before the operation completes, some // [Product][google.cloud.retail.v2alpha.Product]s may still be returned by - // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, // this operation could take hours to complete. To get a sample of @@ -117,7 +118,7 @@ service ProductService { // Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s. // - // Request processing may be synchronous. No partial updating is supported. + // Request processing may be synchronous. // Non-existing items are created. // // Note that it is possible for a subset of the @@ -144,20 +145,21 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, updates are not immediately manifested in the // [Product][google.cloud.retail.v2alpha.Product] queried by - // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // When inventory is updated with - // [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] // and - // [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], + // [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], // the specified inventory field value(s) will overwrite any existing value(s) // while ignoring the last update time for this field. Furthermore, the last // update time for the specified inventory fields will be overwritten to the // time of the - // [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] // or - // [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + // [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] // request. // // If no inventory fields are set in @@ -169,10 +171,10 @@ service ProductService { // then any existing inventory information will be preserved. // // Pre-existing inventory information can only be updated with - // [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], - // [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], + // [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], + // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], // and - // [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -197,8 +199,9 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, the added place IDs are not immediately manifested in the // [Product][google.cloud.retail.v2alpha.Product] queried by - // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -224,8 +227,9 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, the removed place IDs are not immediately manifested in the // [Product][google.cloud.retail.v2alpha.Product] queried by - // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -252,13 +256,14 @@ service ProductService { // and processed downstream. As a consequence, when a response is returned, // updates are not immediately manifested in the // [Product][google.cloud.retail.v2alpha.Product] queried by - // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // Local inventory information can only be modified using this method. - // [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] // and - // [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + // [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. @@ -284,13 +289,14 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, removals are not immediately manifested in the // [Product][google.cloud.retail.v2alpha.Product] queried by - // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // Local inventory information can only be removed using this method. - // [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] // and - // [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + // [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. @@ -309,7 +315,9 @@ service ProductService { } } -// Request message for [CreateProduct][] method. +// Request message for +// [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] +// method. message CreateProductRequest { // Required. The parent catalog resource name, such as // `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. @@ -339,7 +347,9 @@ message CreateProductRequest { string product_id = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [GetProduct][] method. +// Request message for +// [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] +// method. message GetProductRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2alpha.Product], such as @@ -357,7 +367,9 @@ message GetProductRequest { ]; } -// Request message for [UpdateProduct][] method. +// Request message for +// [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] +// method. message UpdateProductRequest { // Required. The product to update/create. // @@ -378,6 +390,11 @@ message UpdateProductRequest { // // If an unsupported or unknown field is provided, an INVALID_ARGUMENT error // is returned. + // + // The attribute key can be updated by setting the mask path as + // "attributes.${key_name}". If a key name is present in the mask but not in + // the patching product from the request, this key will be deleted after the + // update. google.protobuf.FieldMask update_mask = 2; // If set to true, and the [Product][google.cloud.retail.v2alpha.Product] is @@ -386,7 +403,9 @@ message UpdateProductRequest { bool allow_missing = 3; } -// Request message for [DeleteProduct][] method. +// Request message for +// [ProductService.DeleteProduct][google.cloud.retail.v2alpha.ProductService.DeleteProduct] +// method. message DeleteProductRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2alpha.Product], such as @@ -541,10 +560,13 @@ message ListProductsResponse { int32 total_size = 3; } -// Request message for [SetInventory][] method. +// Request message for +// [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory] +// method. message SetInventoryRequest { // Required. The inventory information to update. The allowable fields to // update are: + // // * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] // * [Product.availability][google.cloud.retail.v2alpha.Product.availability] // * [Product.available_quantity][google.cloud.retail.v2alpha.Product.available_quantity] @@ -552,8 +574,9 @@ message SetInventoryRequest { // The updated inventory fields must be specified in // [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask]. // - // If [SetInventoryRequest.inventory.name][] is empty or invalid, an - // INVALID_ARGUMENT error is returned. + // If + // [SetInventoryRequest.inventory.name][google.cloud.retail.v2alpha.Product.name] + // is empty or invalid, an INVALID_ARGUMENT error is returned. // // If the caller does not have permission to update the // [Product][google.cloud.retail.v2alpha.Product] named in @@ -576,7 +599,8 @@ message SetInventoryRequest { // * Adds "fulfillment_info" in // [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] // * Specifies only the desired fulfillment types and corresponding place IDs - // to update in [SetInventoryRequest.inventory.fulfillment_info][] + // to update in + // [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] // // The caller can clear all place IDs from a subset of fulfillment types in // the following ways: @@ -584,9 +608,9 @@ message SetInventoryRequest { // * Adds "fulfillment_info" in // [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] // * Specifies only the desired fulfillment types to clear in - // [SetInventoryRequest.inventory.fulfillment_info][] + // [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] // * Checks that only the desired fulfillment info types have empty - // [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + // [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids] // // The last update time is recorded for the following inventory fields: // * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] @@ -595,7 +619,9 @@ message SetInventoryRequest { // * [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info] // // If a full overwrite of inventory information while ignoring timestamps is - // needed, [UpdateProduct][] should be invoked instead. + // needed, + // [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] + // should be invoked instead. Product inventory = 1 [(google.api.field_behavior) = REQUIRED]; // Indicates which inventory fields in the provided @@ -623,15 +649,19 @@ message SetInventoryRequest { // Metadata related to the progress of the SetInventory operation. // Currently empty because there is no meaningful metadata populated from the -// [SetInventory][] method. +// [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory] +// method. message SetInventoryMetadata {} // Response of the SetInventoryRequest. Currently empty because -// there is no meaningful response populated from the [SetInventory][] +// there is no meaningful response populated from the +// [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory] // method. message SetInventoryResponse {} -// Request message for [AddFulfillmentPlaces][] method. +// Request message for +// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] +// method. message AddFulfillmentPlacesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2alpha.Product], such as @@ -663,7 +693,8 @@ message AddFulfillmentPlacesRequest { // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // - // This field directly corresponds to [Product.fulfillment_info.type][]. + // This field directly corresponds to + // [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. string type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The IDs for this @@ -699,15 +730,19 @@ message AddFulfillmentPlacesRequest { // Metadata related to the progress of the AddFulfillmentPlaces operation. // Currently empty because there is no meaningful metadata populated from the -// [AddFulfillmentPlaces][] method. +// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] +// method. message AddFulfillmentPlacesMetadata {} // Response of the AddFulfillmentPlacesRequest. Currently empty because -// there is no meaningful response populated from the [AddFulfillmentPlaces][] +// there is no meaningful response populated from the +// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces] // method. message AddFulfillmentPlacesResponse {} -// Request message for [AddLocalInventories][] method. +// Request message for +// [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] +// method. message AddLocalInventoriesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2alpha.Product], such as @@ -760,15 +795,21 @@ message AddLocalInventoriesRequest { // Metadata related to the progress of the AddLocalInventories operation. // Currently empty because there is no meaningful metadata populated from the -// [AddLocalInventories][] method. +// [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] +// method. message AddLocalInventoriesMetadata {} -// Response of the [AddLocalInventories][] API. Currently empty because -// there is no meaningful response populated from the [AddLocalInventories][] +// Response of the +// [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] +// API. Currently empty because there is no meaningful response populated from +// the +// [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] // method. message AddLocalInventoriesResponse {} -// Request message for [RemoveLocalInventories][] method. +// Request message for +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] +// method. message RemoveLocalInventoriesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2alpha.Product], such as @@ -802,15 +843,21 @@ message RemoveLocalInventoriesRequest { // Metadata related to the progress of the RemoveLocalInventories operation. // Currently empty because there is no meaningful metadata populated from the -// [RemoveLocalInventories][] method. +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] +// method. message RemoveLocalInventoriesMetadata {} -// Response of the [RemoveLocalInventories][] API. Currently empty because -// there is no meaningful response populated from the [RemoveLocalInventories][] +// Response of the +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] +// API. Currently empty because there is no meaningful response populated from +// the +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] // method. message RemoveLocalInventoriesResponse {} -// Request message for [RemoveFulfillmentPlaces][] method. +// Request message for +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] +// method. message RemoveFulfillmentPlacesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2alpha.Product], such as @@ -842,7 +889,8 @@ message RemoveFulfillmentPlacesRequest { // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // - // This field directly corresponds to [Product.fulfillment_info.type][]. + // This field directly corresponds to + // [Product.fulfillment_info.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]. string type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The IDs for this @@ -873,10 +921,12 @@ message RemoveFulfillmentPlacesRequest { // Metadata related to the progress of the RemoveFulfillmentPlaces operation. // Currently empty because there is no meaningful metadata populated from the -// [RemoveFulfillmentPlaces][] method. +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] +// method. message RemoveFulfillmentPlacesMetadata {} // Response of the RemoveFulfillmentPlacesRequest. Currently empty because there -// is no meaningful response populated from the [RemoveFulfillmentPlaces][] +// is no meaningful response populated from the +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces] // method. message RemoveFulfillmentPlacesResponse {} diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/purge_config.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/purge_config.proto index 6b929f26..d05376b6 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/purge_config.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/purge_config.proto @@ -128,7 +128,10 @@ message PurgeUserEventsRequest { // Required. The resource name of the catalog under which the events are // created. The format is // `projects/${projectId}/locations/global/catalogs/${catalogId}` - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } + ]; // Required. The filter string to specify the events to be deleted with a // length limit of 5,000 characters. Empty string filter is not allowed. The diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto index f9612734..24bfa34a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/search_service.proto @@ -51,6 +51,10 @@ service SearchService { option (google.api.http) = { post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" body: "*" + additional_bindings { + post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search" + body: "*" + } }; } } @@ -114,8 +118,8 @@ message SearchRequest { // Only get facet for the given restricted values. For example, when using // "pickupInStore" as key and set restricted values to // ["store123", "store456"], only facets for "store123" and "store456" are - // returned. Only supported on textual fields and fulfillments. - // Maximum is 20. + // returned. Only supported on predefined textual fields, custom textual + // attributes and fulfillments. Maximum is 20. // // Must be set for the fulfillment facet keys: // @@ -152,14 +156,22 @@ message SearchRequest { // Only supported on textual fields. Maximum is 10. repeated string contains = 9; - // The order in which [Facet.values][] are returned. + // True to make facet keys case insensitive when getting faceting + // values with prefixes or contains; false otherwise. + bool case_insensitive = 10; + + // The order in which + // [SearchResponse.Facet.values][google.cloud.retail.v2alpha.SearchResponse.Facet.values] + // are returned. // // Allowed values are: // - // * "count desc", which means order by [Facet.FacetValue.count][] + // * "count desc", which means order by + // [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] // descending. // - // * "value desc", which means order by [Facet.FacetValue.value][] + // * "value desc", which means order by + // [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] // descending. // Only applies to textual facets. // @@ -181,9 +193,11 @@ message SearchRequest { // [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] // when query is specified. // - // In the response, [FacetValue.value][] will be always "1" and - // [FacetValue.count][] will be the number of results that matches the - // query. + // In the response, + // [SearchResponse.Facet.values.value][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.value] + // will be always "1" and + // [SearchResponse.Facet.values.count][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.count] + // will be the number of results that match the query. // // For example, you can set a customized facet for "shipToStore", // where @@ -194,6 +208,10 @@ message SearchRequest { // Then the facet will count the products that are both in stock and ship // to store "123". string query = 5; + + // Returns the min and max value for each numerical facet intervals. + // Ignored for textual facets. + bool return_min_max = 11; } // Required. The facet key specification. @@ -208,19 +226,29 @@ message SearchRequest { // List of keys to exclude when faceting. // + // // By default, // [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] // is not excluded from the filter unless it is listed in this field. // - // For example, suppose there are 100 products with color facet "Red" and - // 200 products with color facet "Blue". A query containing the filter - // "colorFamilies:ANY("Red")" and have "colorFamilies" as + // Listing a facet key in this field allows its values to appear as facet + // results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. + // + // For example, suppose there are 100 products with the color facet "Red" + // and 200 products with the color facet "Blue". A query containing the + // filter "colorFamilies:ANY("Red")" and having "colorFamilies" as // [FacetKey.key][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.key] - // will by default return the "Red" with count 100. + // would by default return only "Red" products in the search results, and + // also return "Red" with count 100 as the only color facet. Although there + // are also blue products available, "Blue" would not be shown as an + // available facet value. // - // If this field contains "colorFamilies", then the query returns both the - // "Red" with count 100 and "Blue" with count 200, because the - // "colorFamilies" key is now excluded from the filter. + // If "colorFamilies" is listed in "excludedFilterKeys", then the query + // returns the facet values "Red" with count 100 and "Blue" with count + // 200, because the "colorFamilies" key is now excluded from the filter. + // Because this field doesn't affect search results, the search results + // are still correctly filtered to return only "Red" products. // // A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error // is returned. @@ -319,7 +347,7 @@ message SearchRequest { // Condition boost specifications. If a product matches multiple conditions // in the specifictions, boost scores from these specifications are all // applied and combined in a non-linear way. Maximum number of - // specifications is 10. + // specifications is 20. repeated ConditionBoostSpec condition_boost_specs = 1; // Whether to skip boostspec validation. If this field is set to true, @@ -336,7 +364,8 @@ message SearchRequest { message QueryExpansionSpec { // Enum describing under which condition query expansion should occur. enum Condition { - // Unspecified query expansion condition. This defaults to + // Unspecified query expansion condition. In this case, server behavior + // defaults to // [Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. CONDITION_UNSPECIFIED = 0; @@ -363,7 +392,7 @@ message SearchRequest { message PersonalizationSpec { // The personalization mode of each search request. enum Mode { - // Default value. Defaults to + // Default value. In this case, server behavior defaults to // [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Mode.AUTO]. MODE_UNSPECIFIED = 0; @@ -379,11 +408,37 @@ message SearchRequest { Mode mode = 1; } + // The specification for query spell correction. + message SpellCorrectionSpec { + // Enum describing under which mode spell correction should occur. + enum Mode { + // Unspecified spell correction mode. In this case, server behavior + // defaults to + // [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + MODE_UNSPECIFIED = 0; + + // Google Retail Search will try to find a spell suggestion if there + // is any and put in the + // [SearchResponse.corrected_query][google.cloud.retail.v2alpha.SearchResponse.corrected_query]. + // The spell suggestion will not be used as the search query. + SUGGESTION_ONLY = 1; + + // Automatic spell correction built by Google Retail Search. Search will + // be based on the corrected query if found. + AUTO = 2; + } + + // The mode under which spell correction should take effect to + // replace the original search query. Default to + // [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Mode mode = 1; + } + // The relevance threshold of the search results. The higher relevance // threshold is, the higher relevant results are shown and the less number of // results are returned. enum RelevanceThreshold { - // Default value. Defaults to + // Default value. In this case, server behavior defaults to // [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH]. RELEVANCE_THRESHOLD_UNSPECIFIED = 0; @@ -421,7 +476,9 @@ message SearchRequest { // Only faceted search will be performed. The product search will be // disabled. // - // When in this mode, one or both of [SearchRequest.facet_spec][] and + // When in this mode, one or both of + // [SearchRequest.facet_specs][google.cloud.retail.v2alpha.SearchRequest.facet_specs] + // and // [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2alpha.SearchRequest.dynamic_facet_spec] // should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only // [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult] @@ -429,8 +486,10 @@ message SearchRequest { FACETED_SEARCH_ONLY = 2; } - // Required. The resource name of the search engine placement, such as - // `projects/*/locations/global/catalogs/default_catalog/placements/default_search` + // Required. The resource name of the Retail Search serving config, such as + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` + // or the name of the legacy placement resource, such as + // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. // This field is used to identify the serving configuration name and the set // of models that will be used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; @@ -445,6 +504,11 @@ message SearchRequest { ]; // Raw search query. + // + // If this field is empty, the request is considered a category browsing + // request and returned results are based on + // [filter][google.cloud.retail.v2alpha.SearchRequest.filter] and + // [page_categories][google.cloud.retail.v2alpha.SearchRequest.page_categories]. string query = 3; // Required. A unique identifier for tracking visitors. For example, this @@ -541,10 +605,11 @@ message SearchRequest { // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - // and [SearchRequest.boost_spec] are set, the boost conditions from both - // places are evaluated. If a search request matches multiple boost - // conditions, the final boost score is equal to the sum of the boost scores - // from all matched boost conditions. + // and + // [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + // are set, the boost conditions from both places are evaluated. If a search + // request matches multiple boost conditions, the final boost score is equal + // to the sum of the boost scores from all matched boost conditions. BoostSpec boost_spec = 13; // The query expansion specification that specifies the conditions under which @@ -588,7 +653,8 @@ message SearchRequest { // * inventory(place_id,price) // * inventory(place_id,original_price) // * inventory(place_id,attributes.key), where key is any key in the - // [Product.inventories.attributes][] map. + // [Product.local_inventories.attributes][google.cloud.retail.v2alpha.LocalInventory.attributes] + // map. // * attributes.key, where key is any key in the // [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map. // * pickupInStore.id, where id is any @@ -661,6 +727,29 @@ message SearchRequest { // The specification for personalization. PersonalizationSpec personalization_spec = 32; + + // The labels applied to a resource must meet the following requirements: + // + // * Each resource can have multiple labels, up to a maximum of 64. + // * Each label must be a key-value pair. + // * Keys have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a maximum + // length of 63 characters. + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. All characters must use UTF-8 encoding, and + // international characters are allowed. + // * The key portion of a label must be unique. However, you can use the same + // key with multiple resources. + // * Keys must start with a lowercase letter or international character. + // + // See [Google Cloud + // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + map labels = 34; + + // The spell correction specification that specifies the mode under + // which spell correction will take effect. + optional SpellCorrectionSpec spell_correction_spec = 35; } // Response message for @@ -757,6 +846,20 @@ message SearchResponse { // Number of items that have this facet value. int64 count = 3; + + // The minimum value in the + // [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval]. + // Only supported on numerical facets and returned if + // [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max] + // is true. + double min_value = 5; + + // The maximum value in the + // [FacetValue.interval][google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.interval]. + // Only supported on numerical facets and returned if + // [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.return_min_max] + // is true. + double max_value = 6; } // The key for this facet. E.g., "colorFamilies" or "price" or @@ -796,7 +899,9 @@ message SearchResponse { // matches. int32 total_size = 3; - // If spell correction applies, the corrected query. Otherwise, empty. + // Contains the spell corrected query, if found. If the spell correction type + // is AUTOMATIC, then the search results are based on corrected_query. + // Otherwise the original query is used for search. string corrected_query = 4; // A unique search token. This should be included in the @@ -814,10 +919,10 @@ message SearchResponse { QueryExpansionInfo query_expansion_info = 7; // The URI of a customer-defined redirect page. If redirect action is - // triggered, no search will be performed, and only + // triggered, no search is performed, and only // [redirect_uri][google.cloud.retail.v2alpha.SearchResponse.redirect_uri] and // [attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token] - // will be set in the response. + // are set in the response. string redirect_uri = 10; // The fully qualified resource name of applied diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto index c339f310..d0524012 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config.proto @@ -41,7 +41,7 @@ message ServingConfig { }; // Immutable. Fully qualified name - // projects/*/locations/global/catalogs/*/servingConfig/* + // `projects/*/locations/global/catalogs/*/servingConfig/*` string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Required. The human readable serving config display name. Used in Retail @@ -114,10 +114,11 @@ message ServingConfig { // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] - // and [SearchRequest.boost_spec] are set, the boost conditions from both - // places are evaluated. If a search request matches multiple boost - // conditions, the final boost score is equal to the sum of the boost scores - // from all matched boost conditions. + // and + // [SearchRequest.boost_spec][google.cloud.retail.v2alpha.SearchRequest.boost_spec] + // are set, the boost conditions from both places are evaluated. If a search + // request matches multiple boost conditions, the final boost score is equal + // to the sum of the boost scores from all matched boost conditions. // // Can only be set if // [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config_service.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config_service.proto index 48286797..31112651 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config_service.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/serving_config_service.proto @@ -124,7 +124,7 @@ service ServingConfigService { // Request for CreateServingConfig method. message CreateServingConfigRequest { // Required. Full resource name of parent. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } diff --git a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto index 94f72879..ca25f300 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto +++ b/proto-google-cloud-retail-v2alpha/src/main/proto/google/cloud/retail/v2alpha/user_event.proto @@ -54,11 +54,15 @@ message UserEvent { // able to uniquely identify a visitor on a single device. This unique // identifier should not change if the visitor log in/out of the website. // + // Don't set the field to the same fixed ID for different users. This mixes + // the event history of those users together, which results in degraded model + // quality. + // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // The field should not contain PII or user-data. We recommend to use Google - // Analystics [Client + // Analytics [Client // ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) // for this field. string visitor_id = 2 [(google.api.field_behavior) = REQUIRED]; @@ -111,12 +115,11 @@ message UserEvent { // The main product details related to the event. // - // This field is required for the following event types: + // This field is optional except for the following event types: // // * `add-to-cart` // * `detail-page-view` // * `purchase-complete` - // * `search` // // In a `search` event, this field represents the products returned to the end // user on the current page (the end user may have not finished browsing the diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java index 4198af1a..128fc211 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java @@ -138,7 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -164,7 +164,7 @@ public java.lang.String getAttributesConfig() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -598,7 +598,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -623,7 +623,7 @@ public java.lang.String getAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -648,7 +648,7 @@ public com.google.protobuf.ByteString getAttributesConfigBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -672,7 +672,7 @@ public Builder setAttributesConfig(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -692,7 +692,7 @@ public Builder clearAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequestOrBuilder.java index dc6e1df1..707b48f8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface AddCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface AddCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java index 28d558cd..fc803998 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the AddFulfillmentPlaces operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [AddFulfillmentPlaces][] method.
    + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata} @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the AddFulfillmentPlaces operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [AddFulfillmentPlaces][] method.
    +   * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java index 214b7e80..09d344e1 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [AddFulfillmentPlaces][] method.
    + * Request message for
    + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddFulfillmentPlacesRequest} @@ -239,7 +241,8 @@ public com.google.protobuf.ByteString getProductBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -276,7 +279,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -692,7 +696,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [AddFulfillmentPlaces][] method.
    +   * Request message for
    +   * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddFulfillmentPlacesRequest} @@ -1054,7 +1060,8 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1090,7 +1097,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1126,7 +1134,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1161,7 +1170,8 @@ public Builder setType(java.lang.String value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1192,7 +1202,8 @@ public Builder clearType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequestOrBuilder.java index b0fb2982..189cb765 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequestOrBuilder.java @@ -80,7 +80,8 @@ public interface AddFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -106,7 +107,8 @@ public interface AddFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. *
    * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java index 92403c6b..66dbba5a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the AddFulfillmentPlacesRequest.  Currently empty because
    - * there is no meaningful response populated from the [AddFulfillmentPlaces][]
    + * there is no meaningful response populated from the
    + * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
      * method.
      * 
    * @@ -262,7 +263,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the AddFulfillmentPlacesRequest.  Currently empty because
    -   * there is no meaningful response populated from the [AddFulfillmentPlaces][]
    +   * there is no meaningful response populated from the
    +   * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java index 0eebdf37..287b980b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the AddLocalInventories operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [AddLocalInventories][] method.
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddLocalInventoriesMetadata} @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the AddLocalInventories operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [AddLocalInventories][] method.
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddLocalInventoriesMetadata} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java index e1422a41..d3ab1bb6 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [AddLocalInventories][] method.
    + * Request message for
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddLocalInventoriesRequest} @@ -681,7 +683,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [AddLocalInventories][] method.
    +   * Request message for
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.AddLocalInventoriesRequest} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java index 62849d51..5cead3e2 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java @@ -22,8 +22,11 @@ * * *
    - * Response of the [AddLocalInventories][] API.  Currently empty because
    - * there is no meaningful response populated from the [AddLocalInventories][]
    + * Response of the
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
    + * API.  Currently empty because there is no meaningful response populated from
    + * the
    + * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
      * method.
      * 
    * @@ -261,8 +264,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Response of the [AddLocalInventories][] API.  Currently empty because
    -   * there is no meaningful response populated from the [AddLocalInventories][]
    +   * Response of the
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
    +   * API.  Currently empty because there is no meaningful response populated from
    +   * the
    +   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributeConfigLevel.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributeConfigLevel.java index 943dbe32..11c5508e 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributeConfigLevel.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributeConfigLevel.java @@ -32,7 +32,7 @@ public enum AttributeConfigLevel implements com.google.protobuf.ProtocolMessageE * * *
    -   * Value used when unset. Defaults to
    +   * Value used when unset. In this case, server behavior defaults to
        * [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2beta.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG].
        * 
    * @@ -68,7 +68,7 @@ public enum AttributeConfigLevel implements com.google.protobuf.ProtocolMessageE * * *
    -   * Value used when unset. Defaults to
    +   * Value used when unset. In this case, server behavior defaults to
        * [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2beta.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG].
        * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java new file mode 100644 index 00000000..b1201f82 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java @@ -0,0 +1,817 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/export_config.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
    + * A BigQuery output result.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2beta.BigQueryOutputResult} + */ +public final class BigQueryOutputResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.BigQueryOutputResult) + BigQueryOutputResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryOutputResult.newBuilder() to construct. + private BigQueryOutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryOutputResult() { + datasetId_ = ""; + tableId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryOutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryOutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + datasetId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tableId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.BigQueryOutputResult.class, + com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder.class); + } + + public static final int DATASET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object datasetId_; + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object tableId_; + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } + } + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.BigQueryOutputResult)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.BigQueryOutputResult other = + (com.google.cloud.retail.v2beta.BigQueryOutputResult) obj; + + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.BigQueryOutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * A BigQuery output result.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2beta.BigQueryOutputResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.BigQueryOutputResult) + com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.BigQueryOutputResult.class, + com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.BigQueryOutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + datasetId_ = ""; + + tableId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BigQueryOutputResult getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.BigQueryOutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BigQueryOutputResult build() { + com.google.cloud.retail.v2beta.BigQueryOutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BigQueryOutputResult buildPartial() { + com.google.cloud.retail.v2beta.BigQueryOutputResult result = + new com.google.cloud.retail.v2beta.BigQueryOutputResult(this); + result.datasetId_ = datasetId_; + result.tableId_ = tableId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.BigQueryOutputResult) { + return mergeFrom((com.google.cloud.retail.v2beta.BigQueryOutputResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.BigQueryOutputResult other) { + if (other == com.google.cloud.retail.v2beta.BigQueryOutputResult.getDefaultInstance()) + return this; + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2beta.BigQueryOutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2beta.BigQueryOutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object datasetId_ = ""; + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + + datasetId_ = getDefaultInstance().getDatasetId(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Dataset.
    +     * 
    + * + * string dataset_id = 1; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tableId_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + + tableId_ = getDefaultInstance().getTableId(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The ID of a BigQuery Table.
    +     * 
    + * + * string table_id = 2; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tableId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.BigQueryOutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.BigQueryOutputResult) + private static final com.google.cloud.retail.v2beta.BigQueryOutputResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.BigQueryOutputResult(); + } + + public static com.google.cloud.retail.v2beta.BigQueryOutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryOutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryOutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BigQueryOutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResultOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResultOrBuilder.java new file mode 100644 index 00000000..30efb3cc --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResultOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/export_config.proto + +package com.google.cloud.retail.v2beta; + +public interface BigQueryOutputResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.BigQueryOutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + /** + * + * + *
    +   * The ID of a BigQuery Dataset.
    +   * 
    + * + * string dataset_id = 1; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The tableId. + */ + java.lang.String getTableId(); + /** + * + * + *
    +   * The ID of a BigQuery Table.
    +   * 
    + * + * string table_id = 2; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java index 5fa09a0f..0f7c2c7c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java @@ -44,6 +44,7 @@ private CatalogAttribute() { indexableOption_ = 0; dynamicFacetableOption_ = 0; searchableOption_ = 0; + recommendationsFilteringOption_ = 0; } @java.lang.Override @@ -103,6 +104,13 @@ private CatalogAttribute( searchableOption_ = rawValue; break; } + case 64: + { + int rawValue = input.readEnum(); + + recommendationsFilteringOption_ = rawValue; + break; + } case 72: { inUse_ = input.readBool(); @@ -805,6 +813,10 @@ private SearchableOption(int value) { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -830,6 +842,10 @@ public java.lang.String getKey() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -861,14 +877,19 @@ public com.google.protobuf.ByteString getKeyBytes() { * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][], or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * neither in use by products nor predefined can be deleted. + * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. *
    * @@ -1077,6 +1098,60 @@ public com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption getSearc : result; } + public static final int RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER = 8; + private int recommendationsFilteringOption_; + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The enum numeric value on the wire for recommendationsFilteringOption. + */ + @java.lang.Override + public int getRecommendationsFilteringOptionValue() { + return recommendationsFilteringOption_; + } + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The recommendationsFilteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.RecommendationsFilteringOption + getRecommendationsFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = + com.google.cloud.retail.v2beta.RecommendationsFilteringOption.valueOf( + recommendationsFilteringOption_); + return result == null + ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1112,6 +1187,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(7, searchableOption_); } + if (recommendationsFilteringOption_ + != com.google.cloud.retail.v2beta.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, recommendationsFilteringOption_); + } if (inUse_ != false) { output.writeBool(9, inUse_); } @@ -1149,6 +1230,13 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, searchableOption_); } + if (recommendationsFilteringOption_ + != com.google.cloud.retail.v2beta.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(8, recommendationsFilteringOption_); + } if (inUse_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, inUse_); } @@ -1178,6 +1266,7 @@ public boolean equals(final java.lang.Object obj) { if (indexableOption_ != other.indexableOption_) return false; if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; if (searchableOption_ != other.searchableOption_) return false; + if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1201,6 +1290,8 @@ public int hashCode() { hash = (53 * hash) + dynamicFacetableOption_; hash = (37 * hash) + SEARCHABLE_OPTION_FIELD_NUMBER; hash = (53 * hash) + searchableOption_; + hash = (37 * hash) + RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER; + hash = (53 * hash) + recommendationsFilteringOption_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1359,6 +1450,8 @@ public Builder clear() { searchableOption_ = 0; + recommendationsFilteringOption_ = 0; + return this; } @@ -1392,6 +1485,7 @@ public com.google.cloud.retail.v2beta.CatalogAttribute buildPartial() { result.indexableOption_ = indexableOption_; result.dynamicFacetableOption_ = dynamicFacetableOption_; result.searchableOption_ = searchableOption_; + result.recommendationsFilteringOption_ = recommendationsFilteringOption_; onBuilt(); return result; } @@ -1461,6 +1555,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CatalogAttribute other) if (other.searchableOption_ != 0) { setSearchableOptionValue(other.getSearchableOptionValue()); } + if (other.recommendationsFilteringOption_ != 0) { + setRecommendationsFilteringOptionValue(other.getRecommendationsFilteringOptionValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1498,6 +1595,10 @@ public Builder mergeFrom( * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1522,6 +1623,10 @@ public java.lang.String getKey() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1546,6 +1651,10 @@ public com.google.protobuf.ByteString getKeyBytes() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1569,6 +1678,10 @@ public Builder setKey(java.lang.String value) { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1588,6 +1701,10 @@ public Builder clearKey() { * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1617,14 +1734,19 @@ public Builder setKeyBytes(com.google.protobuf.ByteString value) { * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][], or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded + * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are + * neither in use by products nor predefined can be deleted. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. *
    * @@ -1646,14 +1768,19 @@ public boolean getInUse() { * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][], or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * neither in use by products nor predefined can be deleted. + * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. *
    * @@ -1678,14 +1805,19 @@ public Builder setInUse(boolean value) { * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][], or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded + * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are + * neither in use by products nor predefined can be deleted. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. *
    * @@ -2188,6 +2320,137 @@ public Builder clearSearchableOption() { return this; } + private int recommendationsFilteringOption_ = 0; + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The enum numeric value on the wire for recommendationsFilteringOption. + */ + @java.lang.Override + public int getRecommendationsFilteringOptionValue() { + return recommendationsFilteringOption_; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @param value The enum numeric value on the wire for recommendationsFilteringOption to set. + * @return This builder for chaining. + */ + public Builder setRecommendationsFilteringOptionValue(int value) { + + recommendationsFilteringOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The recommendationsFilteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.RecommendationsFilteringOption + getRecommendationsFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = + com.google.cloud.retail.v2beta.RecommendationsFilteringOption.valueOf( + recommendationsFilteringOption_); + return result == null + ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @param value The recommendationsFilteringOption to set. + * @return This builder for chaining. + */ + public Builder setRecommendationsFilteringOption( + com.google.cloud.retail.v2beta.RecommendationsFilteringOption value) { + if (value == null) { + throw new NullPointerException(); + } + + recommendationsFilteringOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * When
    +     * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +     * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +     * attribute values are filterable for recommendations.
    +     * This option works for categorical features only,
    +     * does not work for numerical features, inventory filtering.
    +     * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearRecommendationsFilteringOption() { + + recommendationsFilteringOption_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java index 55cc5b72..0a1d72b4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java @@ -30,6 +30,10 @@ public interface CatalogAttributeOrBuilder * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. *
    * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -44,6 +48,10 @@ public interface CatalogAttributeOrBuilder * Required. Attribute name. * For example: `color`, `brands`, `attributes.custom_attribute`, such as * `attributes.xyz`. + * To be indexable, the attribute name can contain only alpha-numeric + * characters and underscores. For example, an attribute named + * `attributes.abc_xyz` can be indexed, but an attribute named + * `attributes.abc-xyz` cannot be indexed. * * * string key = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -62,14 +70,19 @@ public interface CatalogAttributeOrBuilder * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. * Otherwise, this field is `False`. * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be - * pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - * or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + * pre-loaded by using + * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], + * [CatalogService.ImportCatalogAttributes][], or + * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] + * APIs. This field is `False` for pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. - * Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that - * are not in use by products can be deleted. + * Only pre-loaded * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - * in use by products cannot be deleted; however, their configuration - * properties will reset to default values upon removal request. + * neither in use by products nor predefined can be deleted. + * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are + * either in use by products or are predefined cannot be deleted; however, + * their configuration properties will reset to default values upon removal + * request. * After catalog changes, it takes about 10 minutes for this field to update. * * @@ -221,4 +234,43 @@ public interface CatalogAttributeOrBuilder * @return The searchableOption. */ com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption getSearchableOption(); + + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The enum numeric value on the wire for recommendationsFilteringOption. + */ + int getRecommendationsFilteringOptionValue(); + /** + * + * + *
    +   * When
    +   * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    +   * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED,
    +   * attribute values are filterable for recommendations.
    +   * This option works for categorical features only,
    +   * does not work for numerical features, inventory filtering.
    +   * 
    + * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; + * + * + * @return The recommendationsFilteringOption. + */ + com.google.cloud.retail.v2beta.RecommendationsFilteringOption getRecommendationsFilteringOption(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java index 7b37df8b..61e4ac47 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java @@ -75,7 +75,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ommon.proto\032.google/cloud/retail/v2beta/" + "import_config.proto\"^\n\022ProductLevelConfi" + "g\022\036\n\026ingestion_product_type\030\001 \001(\t\022(\n mer" - + "chant_center_product_id_field\030\002 \001(\t\"\253\006\n\020" + + "chant_center_product_id_field\030\002 \001(\t\"\221\007\n\020" + "CatalogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023\n\006in" + "_use\030\t \001(\010B\003\340A\003\022M\n\004type\030\n \001(\0162:.google.c" + "loud.retail.v2beta.CatalogAttribute.Attr" @@ -86,65 +86,68 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "2beta.CatalogAttribute.DynamicFacetableO" + "ption\022X\n\021searchable_option\030\007 \001(\0162=.googl" + "e.cloud.retail.v2beta.CatalogAttribute.S" - + "earchableOption\"8\n\rAttributeType\022\013\n\007UNKN" - + "OWN\020\000\022\013\n\007TEXTUAL\020\001\022\r\n\tNUMERICAL\020\002\"b\n\017Ind" - + "exableOption\022 \n\034INDEXABLE_OPTION_UNSPECI" - + "FIED\020\000\022\025\n\021INDEXABLE_ENABLED\020\001\022\026\n\022INDEXAB" - + "LE_DISABLED\020\002\"\201\001\n\026DynamicFacetableOption" - + "\022(\n$DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - + "\020\000\022\035\n\031DYNAMIC_FACETABLE_ENABLED\020\001\022\036\n\032DYN" - + "AMIC_FACETABLE_DISABLED\020\002\"f\n\020SearchableO" - + "ption\022!\n\035SEARCHABLE_OPTION_UNSPECIFIED\020\000" - + "\022\026\n\022SEARCHABLE_ENABLED\020\001\022\027\n\023SEARCHABLE_D" - + "ISABLED\020\002\"\302\003\n\020AttributesConfig\022\024\n\004name\030\001" - + " \001(\tB\006\340A\002\340A\005\022_\n\022catalog_attributes\030\002 \003(\013" - + "2C.google.cloud.retail.v2beta.Attributes" - + "Config.CatalogAttributesEntry\022U\n\026attribu" - + "te_config_level\030\003 \001(\01620.google.cloud.ret" - + "ail.v2beta.AttributeConfigLevelB\003\340A\003\032f\n\026" - + "CatalogAttributesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005v" - + "alue\030\002 \001(\0132,.google.cloud.retail.v2beta." - + "CatalogAttribute:\0028\001:x\352Au\n&retail.google" - + "apis.com/AttributesConfig\022Kprojects/{pro" - + "ject}/locations/{location}/catalogs/{cat" - + "alog}/attributesConfig\"\245\005\n\020CompletionCon" - + "fig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016matching_or" - + "der\030\002 \001(\t\022\027\n\017max_suggestions\030\003 \001(\005\022\031\n\021mi" - + "n_prefix_length\030\004 \001(\005\022\025\n\rauto_learning\030\013" - + " \001(\010\022\\\n\030suggestions_input_config\030\005 \001(\01325" - + ".google.cloud.retail.v2beta.CompletionDa" - + "taInputConfigB\003\340A\003\022.\n!last_suggestions_i" - + "mport_operation\030\006 \001(\tB\003\340A\003\022Y\n\025denylist_i" - + "nput_config\030\007 \001(\01325.google.cloud.retail." - + "v2beta.CompletionDataInputConfigB\003\340A\003\022+\n" - + "\036last_denylist_import_operation\030\010 \001(\tB\003\340" - + "A\003\022Z\n\026allowlist_input_config\030\t \001(\01325.goo" - + "gle.cloud.retail.v2beta.CompletionDataIn" - + "putConfigB\003\340A\003\022,\n\037last_allowlist_import_" - + "operation\030\n \001(\tB\003\340A\003:x\352Au\n&retail.google" - + "apis.com/CompletionConfig\022Kprojects/{pro" - + "ject}/locations/{location}/catalogs/{cat" - + "alog}/completionConfig\"\222\001\n\022MerchantCente" - + "rLink\022\'\n\032merchant_center_account_id\030\001 \001(" - + "\003B\003\340A\002\022\021\n\tbranch_id\030\002 \001(\t\022\024\n\014destination" - + "s\030\003 \003(\t\022\023\n\013region_code\030\004 \001(\t\022\025\n\rlanguage" - + "_code\030\005 \001(\t\"\\\n\033MerchantCenterLinkingConf" - + "ig\022=\n\005links\030\001 \003(\0132..google.cloud.retail." - + "v2beta.MerchantCenterLink\"\321\002\n\007Catalog\022\024\n" - + "\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014display_name\030\002 \001(" - + "\tB\006\340A\002\340A\005\022Q\n\024product_level_config\030\004 \001(\0132" - + "..google.cloud.retail.v2beta.ProductLeve" - + "lConfigB\003\340A\002\022_\n\036merchant_center_linking_" - + "config\030\006 \001(\01327.google.cloud.retail.v2bet" - + "a.MerchantCenterLinkingConfig:^\352A[\n\035reta" - + "il.googleapis.com/Catalog\022:projects/{pro" - + "ject}/locations/{location}/catalogs/{cat" - + "alog}B\325\001\n\036com.google.cloud.retail.v2beta" - + "B\014CatalogProtoP\001Z@google.golang.org/genp" - + "roto/googleapis/cloud/retail/v2beta;reta" - + "il\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2Beta" - + "\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Google::" - + "Cloud::Retail::V2betab\006proto3" + + "earchableOption\022d\n recommendations_filte" + + "ring_option\030\010 \001(\0162:.google.cloud.retail." + + "v2beta.RecommendationsFilteringOption\"8\n" + + "\rAttributeType\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTUAL\020\001" + + "\022\r\n\tNUMERICAL\020\002\"b\n\017IndexableOption\022 \n\034IN" + + "DEXABLE_OPTION_UNSPECIFIED\020\000\022\025\n\021INDEXABL" + + "E_ENABLED\020\001\022\026\n\022INDEXABLE_DISABLED\020\002\"\201\001\n\026" + + "DynamicFacetableOption\022(\n$DYNAMIC_FACETA" + + "BLE_OPTION_UNSPECIFIED\020\000\022\035\n\031DYNAMIC_FACE" + + "TABLE_ENABLED\020\001\022\036\n\032DYNAMIC_FACETABLE_DIS" + + "ABLED\020\002\"f\n\020SearchableOption\022!\n\035SEARCHABL" + + "E_OPTION_UNSPECIFIED\020\000\022\026\n\022SEARCHABLE_ENA" + + "BLED\020\001\022\027\n\023SEARCHABLE_DISABLED\020\002\"\302\003\n\020Attr" + + "ibutesConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022_\n\022ca" + + "talog_attributes\030\002 \003(\0132C.google.cloud.re" + + "tail.v2beta.AttributesConfig.CatalogAttr" + + "ibutesEntry\022U\n\026attribute_config_level\030\003 " + + "\001(\01620.google.cloud.retail.v2beta.Attribu" + + "teConfigLevelB\003\340A\003\032f\n\026CatalogAttributesE" + + "ntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.googl" + + "e.cloud.retail.v2beta.CatalogAttribute:\002" + + "8\001:x\352Au\n&retail.googleapis.com/Attribute" + + "sConfig\022Kprojects/{project}/locations/{l" + + "ocation}/catalogs/{catalog}/attributesCo" + + "nfig\"\245\005\n\020CompletionConfig\022\024\n\004name\030\001 \001(\tB" + + "\006\340A\002\340A\005\022\026\n\016matching_order\030\002 \001(\t\022\027\n\017max_s" + + "uggestions\030\003 \001(\005\022\031\n\021min_prefix_length\030\004 " + + "\001(\005\022\025\n\rauto_learning\030\013 \001(\010\022\\\n\030suggestion" + + "s_input_config\030\005 \001(\01325.google.cloud.reta" + + "il.v2beta.CompletionDataInputConfigB\003\340A\003" + + "\022.\n!last_suggestions_import_operation\030\006 " + + "\001(\tB\003\340A\003\022Y\n\025denylist_input_config\030\007 \001(\0132" + + "5.google.cloud.retail.v2beta.CompletionD" + + "ataInputConfigB\003\340A\003\022+\n\036last_denylist_imp" + + "ort_operation\030\010 \001(\tB\003\340A\003\022Z\n\026allowlist_in" + + "put_config\030\t \001(\01325.google.cloud.retail.v" + + "2beta.CompletionDataInputConfigB\003\340A\003\022,\n\037" + + "last_allowlist_import_operation\030\n \001(\tB\003\340" + + "A\003:x\352Au\n&retail.googleapis.com/Completio" + + "nConfig\022Kprojects/{project}/locations/{l" + + "ocation}/catalogs/{catalog}/completionCo" + + "nfig\"\222\001\n\022MerchantCenterLink\022\'\n\032merchant_" + + "center_account_id\030\001 \001(\003B\003\340A\002\022\021\n\tbranch_i" + + "d\030\002 \001(\t\022\024\n\014destinations\030\003 \003(\t\022\023\n\013region_" + + "code\030\004 \001(\t\022\025\n\rlanguage_code\030\005 \001(\t\"\\\n\033Mer" + + "chantCenterLinkingConfig\022=\n\005links\030\001 \003(\0132" + + "..google.cloud.retail.v2beta.MerchantCen" + + "terLink\"\321\002\n\007Catalog\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" + + "\005\022\034\n\014display_name\030\002 \001(\tB\006\340A\002\340A\005\022Q\n\024produ" + + "ct_level_config\030\004 \001(\0132..google.cloud.ret" + + "ail.v2beta.ProductLevelConfigB\003\340A\002\022_\n\036me" + + "rchant_center_linking_config\030\006 \001(\01327.goo" + + "gle.cloud.retail.v2beta.MerchantCenterLi" + + "nkingConfig:^\352A[\n\035retail.googleapis.com/" + + "Catalog\022:projects/{project}/locations/{l" + + "ocation}/catalogs/{catalog}B\325\001\n\036com.goog" + + "le.cloud.retail.v2betaB\014CatalogProtoP\001Z@" + + "google.golang.org/genproto/googleapis/cl" + + "oud/retail/v2beta;retail\242\002\006RETAIL\252\002\032Goog" + + "le.Cloud.Retail.V2Beta\312\002\032Google\\Cloud\\Re" + + "tail\\V2beta\352\002\035Google::Cloud::Retail::V2b" + + "etab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -175,6 +178,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IndexableOption", "DynamicFacetableOption", "SearchableOption", + "RecommendationsFilteringOption", }); internal_static_google_cloud_retail_v2beta_AttributesConfig_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java index 09b6743e..02712480 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CommonProto.java @@ -175,54 +175,58 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Action\022\024\n\014ignore_terms\030\001 \003(\tB\010\n\006action\"/" + "\n\010Audience\022\017\n\007genders\030\001 \003(\t\022\022\n\nage_group" + "s\030\002 \003(\t\"3\n\tColorInfo\022\026\n\016color_families\030\001" - + " \003(\t\022\016\n\006colors\030\002 \003(\t\"~\n\017CustomAttribute\022" - + "\014\n\004text\030\001 \003(\t\022\017\n\007numbers\030\002 \003(\001\022\027\n\nsearch" - + "able\030\003 \001(\010H\000\210\001\001\022\026\n\tindexable\030\004 \001(\010H\001\210\001\001B" - + "\r\n\013_searchableB\014\n\n_indexable\"2\n\017Fulfillm" - + "entInfo\022\014\n\004type\030\001 \001(\t\022\021\n\tplace_ids\030\002 \003(\t" - + "\"8\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006height\030\002 " - + "\001(\005\022\r\n\005width\030\003 \001(\005\"x\n\010Interval\022\021\n\007minimu" - + "m\030\001 \001(\001H\000\022\033\n\021exclusive_minimum\030\002 \001(\001H\000\022\021" - + "\n\007maximum\030\003 \001(\001H\001\022\033\n\021exclusive_maximum\030\004" - + " \001(\001H\001B\005\n\003minB\005\n\003max\"\225\003\n\tPriceInfo\022\025\n\rcu" - + "rrency_code\030\001 \001(\t\022\r\n\005price\030\002 \001(\002\022\026\n\016orig" - + "inal_price\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\0228\n\024price_" - + "effective_time\030\005 \001(\0132\032.google.protobuf.T" - + "imestamp\0225\n\021price_expire_time\030\006 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\022J\n\013price_range\030\007" - + " \001(\01320.google.cloud.retail.v2beta.PriceI" - + "nfo.PriceRangeB\003\340A\003\032\177\n\nPriceRange\0223\n\005pri" - + "ce\030\001 \001(\0132$.google.cloud.retail.v2beta.In" - + "terval\022<\n\016original_price\030\002 \001(\0132$.google." - + "cloud.retail.v2beta.Interval\"P\n\006Rating\022\024" - + "\n\014rating_count\030\001 \001(\005\022\026\n\016average_rating\030\002" - + " \001(\002\022\030\n\020rating_histogram\030\003 \003(\005\"`\n\010UserIn" - + "fo\022\017\n\007user_id\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022" - + "\022\n\nuser_agent\030\003 \001(\t\022\033\n\023direct_user_reque" - + "st\030\004 \001(\010\"\255\002\n\016LocalInventory\022\020\n\010place_id\030" - + "\001 \001(\t\0229\n\nprice_info\030\002 \001(\0132%.google.cloud" - + ".retail.v2beta.PriceInfo\022N\n\nattributes\030\003" - + " \003(\0132:.google.cloud.retail.v2beta.LocalI" - + "nventory.AttributesEntry\022\036\n\021fulfillment_" - + "types\030\004 \003(\tB\003\340A\004\032^\n\017AttributesEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.google.cloud.r" - + "etail.v2beta.CustomAttribute:\0028\001*\206\001\n\024Att" - + "ributeConfigLevel\022&\n\"ATTRIBUTE_CONFIG_LE" - + "VEL_UNSPECIFIED\020\000\022\"\n\036PRODUCT_LEVEL_ATTRI" - + "BUTE_CONFIG\020\001\022\"\n\036CATALOG_LEVEL_ATTRIBUTE" - + "_CONFIG\020\002*i\n\014SolutionType\022\035\n\031SOLUTION_TY" - + "PE_UNSPECIFIED\020\000\022 \n\034SOLUTION_TYPE_RECOMM" - + "ENDATION\020\001\022\030\n\024SOLUTION_TYPE_SEARCH\020\002*\213\001\n" - + "\025SearchSolutionUseCase\022(\n$SEARCH_SOLUTIO" - + "N_USE_CASE_UNSPECIFIED\020\000\022#\n\037SEARCH_SOLUT" - + "ION_USE_CASE_SEARCH\020\001\022#\n\037SEARCH_SOLUTION" - + "_USE_CASE_BROWSE\020\002B\324\001\n\036com.google.cloud." - + "retail.v2betaB\013CommonProtoP\001Z@google.gol" - + "ang.org/genproto/googleapis/cloud/retail" - + "/v2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud.R" - + "etail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2bet" - + "a\352\002\035Google::Cloud::Retail::V2betab\006proto" - + "3" + + " \003(\t\022\016\n\006colors\030\002 \003(\t\"\206\001\n\017CustomAttribute" + + "\022\014\n\004text\030\001 \003(\t\022\017\n\007numbers\030\002 \003(\001\022\033\n\nsearc" + + "hable\030\003 \001(\010B\002\030\001H\000\210\001\001\022\032\n\tindexable\030\004 \001(\010B" + + "\002\030\001H\001\210\001\001B\r\n\013_searchableB\014\n\n_indexable\"2\n" + + "\017FulfillmentInfo\022\014\n\004type\030\001 \001(\t\022\021\n\tplace_" + + "ids\030\002 \003(\t\"8\n\005Image\022\020\n\003uri\030\001 \001(\tB\003\340A\002\022\016\n\006" + + "height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\"x\n\010Interval\022" + + "\021\n\007minimum\030\001 \001(\001H\000\022\033\n\021exclusive_minimum\030" + + "\002 \001(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022\033\n\021exclusive_" + + "maximum\030\004 \001(\001H\001B\005\n\003minB\005\n\003max\"\225\003\n\tPriceI" + + "nfo\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005price\030\002 \001(" + + "\002\022\026\n\016original_price\030\003 \001(\002\022\014\n\004cost\030\004 \001(\002\022" + + "8\n\024price_effective_time\030\005 \001(\0132\032.google.p" + + "rotobuf.Timestamp\0225\n\021price_expire_time\030\006" + + " \001(\0132\032.google.protobuf.Timestamp\022J\n\013pric" + + "e_range\030\007 \001(\01320.google.cloud.retail.v2be" + + "ta.PriceInfo.PriceRangeB\003\340A\003\032\177\n\nPriceRan" + + "ge\0223\n\005price\030\001 \001(\0132$.google.cloud.retail." + + "v2beta.Interval\022<\n\016original_price\030\002 \001(\0132" + + "$.google.cloud.retail.v2beta.Interval\"P\n" + + "\006Rating\022\024\n\014rating_count\030\001 \001(\005\022\026\n\016average" + + "_rating\030\002 \001(\002\022\030\n\020rating_histogram\030\003 \003(\005\"" + + "`\n\010UserInfo\022\017\n\007user_id\030\001 \001(\t\022\022\n\nip_addre" + + "ss\030\002 \001(\t\022\022\n\nuser_agent\030\003 \001(\t\022\033\n\023direct_u" + + "ser_request\030\004 \001(\010\"\255\002\n\016LocalInventory\022\020\n\010" + + "place_id\030\001 \001(\t\0229\n\nprice_info\030\002 \001(\0132%.goo" + + "gle.cloud.retail.v2beta.PriceInfo\022N\n\natt" + + "ributes\030\003 \003(\0132:.google.cloud.retail.v2be" + + "ta.LocalInventory.AttributesEntry\022\036\n\021ful" + + "fillment_types\030\004 \003(\tB\003\340A\004\032^\n\017AttributesE" + + "ntry\022\013\n\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.googl" + + "e.cloud.retail.v2beta.CustomAttribute:\0028" + + "\001*\206\001\n\024AttributeConfigLevel\022&\n\"ATTRIBUTE_" + + "CONFIG_LEVEL_UNSPECIFIED\020\000\022\"\n\036PRODUCT_LE" + + "VEL_ATTRIBUTE_CONFIG\020\001\022\"\n\036CATALOG_LEVEL_" + + "ATTRIBUTE_CONFIG\020\002*i\n\014SolutionType\022\035\n\031SO" + + "LUTION_TYPE_UNSPECIFIED\020\000\022 \n\034SOLUTION_TY" + + "PE_RECOMMENDATION\020\001\022\030\n\024SOLUTION_TYPE_SEA" + + "RCH\020\002*\241\001\n\036RecommendationsFilteringOption" + + "\0220\n,RECOMMENDATIONS_FILTERING_OPTION_UNS" + + "PECIFIED\020\000\022&\n\"RECOMMENDATIONS_FILTERING_" + + "DISABLED\020\001\022%\n!RECOMMENDATIONS_FILTERING_" + + "ENABLED\020\003*\213\001\n\025SearchSolutionUseCase\022(\n$S" + + "EARCH_SOLUTION_USE_CASE_UNSPECIFIED\020\000\022#\n" + + "\037SEARCH_SOLUTION_USE_CASE_SEARCH\020\001\022#\n\037SE" + + "ARCH_SOLUTION_USE_CASE_BROWSE\020\002B\324\001\n\036com." + + "google.cloud.retail.v2betaB\013CommonProtoP" + + "\001Z@google.golang.org/genproto/googleapis" + + "/cloud/retail/v2beta;retail\242\002\006RETAIL\252\002\032G" + + "oogle.Cloud.Retail.V2Beta\312\002\032Google\\Cloud" + + "\\Retail\\V2beta\352\002\035Google::Cloud::Retail::" + + "V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java index 19dda265..3be243ca 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java @@ -338,6 +338,8 @@ public com.google.protobuf.ByteString getVisitorIdBytes() { * * *
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -357,6 +359,8 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -376,6 +380,8 @@ public int getLanguageCodesCount() {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -396,6 +402,8 @@ public java.lang.String getLanguageCodes(int index) {
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -491,9 +499,9 @@ public com.google.protobuf.ByteString getDeviceTypeBytes() {
        * events. If leave empty, it will use the "user-data".
        * Current supported values:
        * * user-data
    -   * * cloud-retail
    -   *   This option requires additional allowlisting. Before using cloud-retail,
    -   *   contact Cloud Retail support team first.
    +   * * cloud-retail:
    +   *   This option requires enabling auto-learning function first. See
    +   *   [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
        * 
    * * string dataset = 6; @@ -523,9 +531,9 @@ public java.lang.String getDataset() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1381,6 +1389,8 @@ private void ensureLanguageCodesIsMutable() { * * *
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1400,6 +1410,8 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1419,6 +1431,8 @@ public int getLanguageCodesCount() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1439,6 +1453,8 @@ public java.lang.String getLanguageCodes(int index) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1459,6 +1475,8 @@ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1486,6 +1504,8 @@ public Builder setLanguageCodes(int index, java.lang.String value) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1512,6 +1532,8 @@ public Builder addLanguageCodes(java.lang.String value) {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1535,6 +1557,8 @@ public Builder addAllLanguageCodes(java.lang.Iterable values)
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1557,6 +1581,8 @@ public Builder clearLanguageCodes() {
          *
          *
          * 
    +     * Note that this field applies for `user-data` dataset only. For requests
    +     * with `cloud-retail` dataset, setting this field has no effect.
          * The language filters applied to the output suggestions. If set, it should
          * contain the language of the query. If not set, suggestions are returned
          * without considering language restrictions. This is the BCP-47 language
    @@ -1739,9 +1765,9 @@ public Builder setDeviceTypeBytes(com.google.protobuf.ByteString value) {
          * events. If leave empty, it will use the "user-data".
          * Current supported values:
          * * user-data
    -     * * cloud-retail
    -     *   This option requires additional allowlisting. Before using cloud-retail,
    -     *   contact Cloud Retail support team first.
    +     * * cloud-retail:
    +     *   This option requires enabling auto-learning function first. See
    +     *   [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
          * 
    * * string dataset = 6; @@ -1770,9 +1796,9 @@ public java.lang.String getDataset() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1801,9 +1827,9 @@ public com.google.protobuf.ByteString getDatasetBytes() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1831,9 +1857,9 @@ public Builder setDataset(java.lang.String value) { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; @@ -1857,9 +1883,9 @@ public Builder clearDataset() { * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java index 0b4d7d43..f683a3d9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequestOrBuilder.java @@ -122,6 +122,8 @@ public interface CompleteQueryRequestOrBuilder * * *
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -139,6 +141,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -156,6 +160,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -174,6 +180,8 @@ public interface CompleteQueryRequestOrBuilder
        *
        *
        * 
    +   * Note that this field applies for `user-data` dataset only. For requests
    +   * with `cloud-retail` dataset, setting this field has no effect.
        * The language filters applied to the output suggestions. If set, it should
        * contain the language of the query. If not set, suggestions are returned
        * without considering language restrictions. This is the BCP-47 language
    @@ -241,9 +249,9 @@ public interface CompleteQueryRequestOrBuilder
        * events. If leave empty, it will use the "user-data".
        * Current supported values:
        * * user-data
    -   * * cloud-retail
    -   *   This option requires additional allowlisting. Before using cloud-retail,
    -   *   contact Cloud Retail support team first.
    +   * * cloud-retail:
    +   *   This option requires enabling auto-learning function first. See
    +   *   [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
        * 
    * * string dataset = 6; @@ -262,9 +270,9 @@ public interface CompleteQueryRequestOrBuilder * events. If leave empty, it will use the "user-data". * Current supported values: * * user-data - * * cloud-retail - * This option requires additional allowlisting. Before using cloud-retail, - * contact Cloud Retail support team first. + * * cloud-retail: + * This option requires enabling auto-learning function first. See + * [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). *
    * * string dataset = 6; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java index cb8c8bef..07f8cca1 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java @@ -190,7 +190,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -204,7 +206,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -221,7 +225,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -236,7 +242,9 @@ public interface CompletionResultOrBuilder * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -255,7 +263,9 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -477,7 +487,9 @@ public int getAttributesCount() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -504,7 +516,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -522,7 +536,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. *
    * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -545,7 +561,9 @@ public com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1090,7 +1108,9 @@ public int getAttributesCount() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1117,7 +1137,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1135,7 +1157,9 @@ public boolean containsAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1158,7 +1182,9 @@ public com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1189,7 +1215,9 @@ public Builder clearAttributes() { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1215,7 +1243,9 @@ public Builder removeAttributes(java.lang.String key) { * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -1240,7 +1270,9 @@ public Builder putAttributes( * * For "user-data", the attributes are additional custom attributes * ingested through BigQuery. * * For "cloud-retail", the attributes are product attributes generated - * by Cloud Retail. + * by Cloud Retail. It requires + * [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + * is imported properly. * * * map<string, .google.cloud.retail.v2beta.CustomAttribute> attributes = 2; @@ -2143,7 +2175,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2173,7 +2205,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2205,7 +2237,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2234,7 +2266,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -2264,7 +2296,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3301,7 +3333,7 @@ private void ensureRecentSearchResultsIsMutable() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3334,7 +3366,7 @@ private void ensureRecentSearchResultsIsMutable() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3366,7 +3398,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3399,7 +3431,7 @@ public int getRecentSearchResultsCount() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3438,7 +3470,7 @@ public Builder setRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3476,7 +3508,7 @@ public Builder setRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3515,7 +3547,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3554,7 +3586,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3591,7 +3623,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3629,7 +3661,7 @@ public Builder addRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3667,7 +3699,7 @@ public Builder addAllRecentSearchResults( * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3702,7 +3734,7 @@ public Builder clearRecentSearchResults() { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3737,7 +3769,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3766,7 +3798,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3799,7 +3831,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3834,7 +3866,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3866,7 +3898,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -3899,7 +3931,7 @@ public Builder removeRecentSearchResults(int index) { * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java index 876e2178..7a48e4a9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponseOrBuilder.java @@ -140,7 +140,7 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult getComplet * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -167,7 +167,7 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult getComplet * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -194,7 +194,7 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -220,7 +220,7 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. @@ -249,7 +249,7 @@ com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult getRecen * * They are matched with * [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] * case insensitively. - * * They are transformed to lower cases. + * * They are transformed to lower case. * * They are UTF-8 safe. * Recent searches are deduplicated. More recent searches will be reserved * when duplication happens. diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java index 89d0066b..7caa6733 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java @@ -334,9 +334,10 @@ public com.google.protobuf.ByteString getMatchingOrderBytes() { * * *
    -   * The maximum number of autocomplete suggestions returned per term. The
    -   * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -   * or set to 0, then will fallback to default value.
    +   * The maximum number of autocomplete suggestions returned per term. Default
    +   * value is 20. If left unset or set to 0, then will fallback to default
    +   * value.
    +   * Value range is 1 to 20.
        * 
    * * int32 max_suggestions = 3; @@ -357,6 +358,7 @@ public int getMaxSuggestions() { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -396,8 +398,8 @@ public boolean getAutoLearning() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -414,8 +416,8 @@ public boolean hasSuggestionsInputConfig() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -434,8 +436,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getSuggestionsIn * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -513,8 +515,8 @@ public com.google.protobuf.ByteString getLastSuggestionsImportOperationBytes() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -531,8 +533,8 @@ public boolean hasDenylistInputConfig() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -551,8 +553,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getDenylistInput * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -571,7 +573,7 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getDenylistInput * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -597,7 +599,7 @@ public java.lang.String getLastDenylistImportOperation() { * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -626,8 +628,8 @@ public com.google.protobuf.ByteString getLastDenylistImportOperationBytes() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -644,8 +646,8 @@ public boolean hasAllowlistInputConfig() { * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -664,8 +666,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getAllowlistInpu * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -684,7 +686,7 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getAllowlistInpu * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -710,7 +712,7 @@ public java.lang.String getLastAllowlistImportOperation() { * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -1517,9 +1519,10 @@ public Builder setMatchingOrderBytes(com.google.protobuf.ByteString value) { * * *
    -     * The maximum number of autocomplete suggestions returned per term. The
    -     * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -     * or set to 0, then will fallback to default value.
    +     * The maximum number of autocomplete suggestions returned per term. Default
    +     * value is 20. If left unset or set to 0, then will fallback to default
    +     * value.
    +     * Value range is 1 to 20.
          * 
    * * int32 max_suggestions = 3; @@ -1534,9 +1537,10 @@ public int getMaxSuggestions() { * * *
    -     * The maximum number of autocomplete suggestions returned per term. The
    -     * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -     * or set to 0, then will fallback to default value.
    +     * The maximum number of autocomplete suggestions returned per term. Default
    +     * value is 20. If left unset or set to 0, then will fallback to default
    +     * value.
    +     * Value range is 1 to 20.
          * 
    * * int32 max_suggestions = 3; @@ -1554,9 +1558,10 @@ public Builder setMaxSuggestions(int value) { * * *
    -     * The maximum number of autocomplete suggestions returned per term. The
    -     * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -     * or set to 0, then will fallback to default value.
    +     * The maximum number of autocomplete suggestions returned per term. Default
    +     * value is 20. If left unset or set to 0, then will fallback to default
    +     * value.
    +     * Value range is 1 to 20.
          * 
    * * int32 max_suggestions = 3; @@ -1578,6 +1583,7 @@ public Builder clearMaxSuggestions() { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -1595,6 +1601,7 @@ public int getMinPrefixLength() { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -1615,6 +1622,7 @@ public Builder setMinPrefixLength(int value) { * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -1702,8 +1710,8 @@ public Builder clearAutoLearning() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1719,8 +1727,8 @@ public boolean hasSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1742,8 +1750,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getSuggestionsIn * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1768,8 +1776,8 @@ public Builder setSuggestionsInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1791,8 +1799,8 @@ public Builder setSuggestionsInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1822,8 +1830,8 @@ public Builder mergeSuggestionsInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1845,8 +1853,8 @@ public Builder clearSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1863,8 +1871,8 @@ public Builder clearSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -1885,8 +1893,8 @@ public Builder clearSuggestionsInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * suggestion phrases.
          * 
    * * @@ -2051,8 +2059,8 @@ public Builder setLastSuggestionsImportOperationBytes(com.google.protobuf.ByteSt * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2068,8 +2076,8 @@ public boolean hasDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2091,8 +2099,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getDenylistInput * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2117,8 +2125,8 @@ public Builder setDenylistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2140,8 +2148,8 @@ public Builder setDenylistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2171,8 +2179,8 @@ public Builder mergeDenylistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2194,8 +2202,8 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2212,8 +2220,8 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2234,8 +2242,8 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the / autocomplete denylist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * denylist phrases.
          * 
    * * @@ -2264,7 +2272,7 @@ public Builder clearDenylistInputConfig() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2289,7 +2297,7 @@ public java.lang.String getLastDenylistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2314,7 +2322,7 @@ public com.google.protobuf.ByteString getLastDenylistImportOperationBytes() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2338,7 +2346,7 @@ public Builder setLastDenylistImportOperation(java.lang.String value) { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2358,7 +2366,7 @@ public Builder clearLastDenylistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest denylist import.
    +     * Output only. Name of the LRO corresponding to the latest denylist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2390,8 +2398,8 @@ public Builder setLastDenylistImportOperationBytes(com.google.protobuf.ByteStrin * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2407,8 +2415,8 @@ public boolean hasAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2430,8 +2438,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getAllowlistInpu * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2456,8 +2464,8 @@ public Builder setAllowlistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2479,8 +2487,8 @@ public Builder setAllowlistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2510,8 +2518,8 @@ public Builder mergeAllowlistInputConfig( * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2533,8 +2541,8 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2551,8 +2559,8 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2573,8 +2581,8 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. The input config for the import of the source data that
    -     * contains the autocomplete allowlist phrases uploaded by the customer.
    +     * Output only. The source data for the latest import of the autocomplete
    +     * allowlist phrases.
          * 
    * * @@ -2603,7 +2611,7 @@ public Builder clearAllowlistInputConfig() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2629,7 +2637,7 @@ public java.lang.String getLastAllowlistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2655,7 +2663,7 @@ public com.google.protobuf.ByteString getLastAllowlistImportOperationBytes() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2680,7 +2688,7 @@ public Builder setLastAllowlistImportOperation(java.lang.String value) { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    @@ -2701,7 +2709,7 @@ public Builder clearLastAllowlistImportOperation() { * * *
    -     * Output only. LRO corresponding to the latest allowlist import.
    +     * Output only. Name of the LRO corresponding to the latest allowlist import.
          * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
          * retrieve the latest state of the Long Running Operation.
          * 
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java index 81ee10b2..fb20e562 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfigOrBuilder.java @@ -95,9 +95,10 @@ public interface CompletionConfigOrBuilder * * *
    -   * The maximum number of autocomplete suggestions returned per term. The
    -   * maximum allowed max suggestions is 20. Default value is 20. If left unset
    -   * or set to 0, then will fallback to default value.
    +   * The maximum number of autocomplete suggestions returned per term. Default
    +   * value is 20. If left unset or set to 0, then will fallback to default
    +   * value.
    +   * Value range is 1 to 20.
        * 
    * * int32 max_suggestions = 3; @@ -113,6 +114,7 @@ public interface CompletionConfigOrBuilder * The minimum number of characters needed to be typed in order to get * suggestions. Default value is 2. If left unset or set to 0, then will * fallback to default value. + * Value range is 1 to 20. * * * int32 min_prefix_length = 4; @@ -142,8 +144,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -157,8 +159,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -172,8 +174,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * suggestion phrases.
        * 
    * * @@ -222,8 +224,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -237,8 +239,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -252,8 +254,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the / autocomplete denylist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * denylist phrases.
        * 
    * * @@ -267,7 +269,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -282,7 +284,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest denylist import.
    +   * Output only. Name of the LRO corresponding to the latest denylist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -298,8 +300,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -313,8 +315,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -328,8 +330,8 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. The input config for the import of the source data that
    -   * contains the autocomplete allowlist phrases uploaded by the customer.
    +   * Output only. The source data for the latest import of the autocomplete
    +   * allowlist phrases.
        * 
    * * @@ -343,7 +345,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    @@ -358,7 +360,7 @@ public interface CompletionConfigOrBuilder * * *
    -   * Output only. LRO corresponding to the latest allowlist import.
    +   * Output only. Name of the LRO corresponding to the latest allowlist import.
        * Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
        * retrieve the latest state of the Long Running Operation.
        * 
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java index bfa751c0..bfb23e4f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java @@ -363,7 +363,7 @@ public com.google.cloud.retail.v2beta.RuleOrBuilder getRuleOrBuilder() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -387,7 +387,7 @@ public java.lang.String getName() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1615,7 +1615,7 @@ public com.google.cloud.retail.v2beta.RuleOrBuilder getRuleOrBuilder() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1638,7 +1638,7 @@ public java.lang.String getName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1661,7 +1661,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1683,7 +1683,7 @@ public Builder setName(java.lang.String value) { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1701,7 +1701,7 @@ public Builder clearName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/controls/*
    +     * `projects/*/locations/global/catalogs/*/controls/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java index 5587c986..981622f2 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java @@ -104,7 +104,7 @@ public interface ControlOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -117,7 +117,7 @@ public interface ControlOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/controls/*
    +   * `projects/*/locations/global/catalogs/*/controls/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java index a31189c0..7b3d8750 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java @@ -144,7 +144,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -170,7 +170,7 @@ public java.lang.String getParent() { * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -669,7 +669,7 @@ public Builder mergeFrom( * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -694,7 +694,7 @@ public java.lang.String getParent() { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -719,7 +719,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -743,7 +743,7 @@ public Builder setParent(java.lang.String value) { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -763,7 +763,7 @@ public Builder clearParent() { * *
          * Required. Full resource name of parent catalog. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequestOrBuilder.java index 6376d750..a8eac386 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateControlRequestOrBuilder * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface CreateControlRequestOrBuilder * *
        * Required. Full resource name of parent catalog. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java index c1cdc2e0..af49d0eb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [CreateProduct][] method.
    + * Request message for
    + * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.CreateProductRequest} @@ -503,7 +505,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [CreateProduct][] method.
    +   * Request message for
    +   * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.CreateProductRequest} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java index 4052f6e1..7029391c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java @@ -144,7 +144,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -170,7 +170,7 @@ public java.lang.String getParent() { * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -670,7 +670,7 @@ public Builder mergeFrom( * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -695,7 +695,7 @@ public java.lang.String getParent() { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -720,7 +720,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -744,7 +744,7 @@ public Builder setParent(java.lang.String value) { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -764,7 +764,7 @@ public Builder clearParent() { * *
          * Required. Full resource name of parent. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequestOrBuilder.java index 6c6c0d3a..a56b52b3 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface CreateServingConfigRequestOrBuilder * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface CreateServingConfigRequestOrBuilder * *
        * Required. Full resource name of parent. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java index c13d555e..fe2e2c41 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java @@ -313,11 +313,13 @@ public double getNumbers(int index) { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -325,11 +327,14 @@ public double getNumbers(int index) {
        * set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return Whether the searchable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasSearchable() { return ((bitField0_ & 0x00000001) != 0); } @@ -337,11 +342,13 @@ public boolean hasSearchable() { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -349,11 +356,14 @@ public boolean hasSearchable() {
        * set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return The searchable. */ @java.lang.Override + @java.lang.Deprecated public boolean getSearchable() { return searchable_; } @@ -364,11 +374,14 @@ public boolean getSearchable() { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -380,11 +393,14 @@ public boolean getSearchable() {
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return Whether the indexable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasIndexable() { return ((bitField0_ & 0x00000002) != 0); } @@ -392,11 +408,14 @@ public boolean hasIndexable() { * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -408,11 +427,14 @@ public boolean hasIndexable() {
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return The indexable. */ @java.lang.Override + @java.lang.Deprecated public boolean getIndexable() { return indexable_; } @@ -1223,11 +1245,13 @@ public Builder clearNumbers() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1235,11 +1259,14 @@ public Builder clearNumbers() {
          * set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return Whether the searchable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasSearchable() { return ((bitField0_ & 0x00000004) != 0); } @@ -1247,11 +1274,13 @@ public boolean hasSearchable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1259,11 +1288,14 @@ public boolean hasSearchable() {
          * set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return The searchable. */ @java.lang.Override + @java.lang.Deprecated public boolean getSearchable() { return searchable_; } @@ -1271,11 +1303,13 @@ public boolean getSearchable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1283,11 +1317,14 @@ public boolean getSearchable() {
          * set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @param value The searchable to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setSearchable(boolean value) { bitField0_ |= 0x00000004; searchable_ = value; @@ -1298,11 +1335,13 @@ public Builder setSearchable(boolean value) { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * searchable by text queries in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are searchable by text queries in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1310,10 +1349,13 @@ public Builder setSearchable(boolean value) {
          * set. Otherwise, a INVALID_ARGUMENT error is returned.
          * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearSearchable() { bitField0_ = (bitField0_ & ~0x00000004); searchable_ = false; @@ -1326,11 +1368,14 @@ public Builder clearSearchable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1342,11 +1387,14 @@ public Builder clearSearchable() {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return Whether the indexable field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasIndexable() { return ((bitField0_ & 0x00000008) != 0); } @@ -1354,11 +1402,14 @@ public boolean hasIndexable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1370,11 +1421,14 @@ public boolean hasIndexable() {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return The indexable. */ @java.lang.Override + @java.lang.Deprecated public boolean getIndexable() { return indexable_; } @@ -1382,11 +1436,14 @@ public boolean getIndexable() { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1398,11 +1455,14 @@ public boolean getIndexable() {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @param value The indexable to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setIndexable(boolean value) { bitField0_ |= 0x00000008; indexable_ = value; @@ -1413,11 +1473,14 @@ public Builder setIndexable(boolean value) { * * *
    -     * This field will only be used when
    +     * This field is normally ignored unless
          * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -     * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -     * indexed, so that it can be filtered, faceted or boosted in
    +     * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +     * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +     * product-level attribute configuration, see [Configuration
    +     * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +     * If true, custom attribute values are indexed, so that they can be filtered,
    +     * faceted or boosted in
          * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
          * This field is ignored in a
          * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -1429,10 +1492,13 @@ public Builder setIndexable(boolean value) {
          * for more details.
          * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearIndexable() { bitField0_ = (bitField0_ & ~0x00000008); indexable_ = false; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java index 6f72449a..d92b849f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java @@ -152,11 +152,13 @@ public interface CustomAttributeOrBuilder * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -164,20 +166,25 @@ public interface CustomAttributeOrBuilder
        * set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return Whether the searchable field is set. */ + @java.lang.Deprecated boolean hasSearchable(); /** * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * searchable by text queries in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are searchable by text queries in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -185,21 +192,27 @@ public interface CustomAttributeOrBuilder
        * set. Otherwise, a INVALID_ARGUMENT error is returned.
        * 
    * - * optional bool searchable = 3; + * optional bool searchable = 3 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=423 * @return The searchable. */ + @java.lang.Deprecated boolean getSearchable(); /** * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -211,20 +224,26 @@ public interface CustomAttributeOrBuilder
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return Whether the indexable field is set. */ + @java.lang.Deprecated boolean hasIndexable(); /** * * *
    -   * This field will only be used when
    +   * This field is normally ignored unless
        * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
    -   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is
    -   * 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
    -   * indexed, so that it can be filtered, faceted or boosted in
    +   * of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the
    +   * deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about
    +   * product-level attribute configuration, see [Configuration
    +   * modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
    +   * If true, custom attribute values are indexed, so that they can be filtered,
    +   * faceted or boosted in
        * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
        * This field is ignored in a
        * [UserEvent][google.cloud.retail.v2beta.UserEvent].
    @@ -236,9 +255,12 @@ public interface CustomAttributeOrBuilder
        * for more details.
        * 
    * - * optional bool indexable = 4; + * optional bool indexable = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See + * google/cloud/retail/v2beta/common.proto;l=444 * @return The indexable. */ + @java.lang.Deprecated boolean getIndexable(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java index 6af4563d..e819db64 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java @@ -120,7 +120,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -146,7 +146,7 @@ public java.lang.String getName() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -492,7 +492,7 @@ public Builder mergeFrom( * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -517,7 +517,7 @@ public java.lang.String getName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -542,7 +542,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -566,7 +566,7 @@ public Builder setName(java.lang.String value) { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -586,7 +586,7 @@ public Builder clearName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequestOrBuilder.java index 6389615b..36488417 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface DeleteControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface DeleteControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java index 9e711190..3634a42b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [DeleteProduct][] method.
    + * Request message for
    + * [ProductService.DeleteProduct][google.cloud.retail.v2beta.ProductService.DeleteProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.DeleteProductRequest} @@ -363,7 +365,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [DeleteProduct][] method.
    +   * Request message for
    +   * [ProductService.DeleteProduct][google.cloud.retail.v2beta.ProductService.DeleteProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.DeleteProductRequest} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java index ff9543f0..e8303269 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java @@ -43,6 +43,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_ExportUserEventsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_ExportUserEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_OutputResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_OutputResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -61,20 +69,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\013destination\"r\n\016ExportMetadata\022/\n\013creat" + "e_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + "\022/\n\013update_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\"\212\001\n\026ExportProductsResponse\022)\n\r" + + "Timestamp\"\313\001\n\026ExportProductsResponse\022)\n\r" + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022" + "E\n\rerrors_config\030\002 \001(\0132..google.cloud.re" - + "tail.v2beta.ExportErrorsConfig\"\214\001\n\030Expor" - + "tUserEventsResponse\022)\n\rerror_samples\030\001 \003" - + "(\0132\022.google.rpc.Status\022E\n\rerrors_config\030" - + "\002 \001(\0132..google.cloud.retail.v2beta.Expor" - + "tErrorsConfigB\332\001\n\036com.google.cloud.retai" - + "l.v2betaB\021ExportConfigProtoP\001Z@google.go" - + "lang.org/genproto/googleapis/cloud/retai" - + "l/v2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud." - + "Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2be" - + "ta\352\002\035Google::Cloud::Retail::V2betab\006prot" - + "o3" + + "tail.v2beta.ExportErrorsConfig\022?\n\routput" + + "_result\030\003 \001(\0132(.google.cloud.retail.v2be" + + "ta.OutputResult\"\315\001\n\030ExportUserEventsResp" + + "onse\022)\n\rerror_samples\030\001 \003(\0132\022.google.rpc" + + ".Status\022E\n\rerrors_config\030\002 \001(\0132..google." + + "cloud.retail.v2beta.ExportErrorsConfig\022?" + + "\n\routput_result\030\003 \001(\0132(.google.cloud.ret" + + "ail.v2beta.OutputResult\"Y\n\014OutputResult\022" + + "I\n\017bigquery_result\030\001 \003(\01320.google.cloud." + + "retail.v2beta.BigQueryOutputResult\"<\n\024Bi" + + "gQueryOutputResult\022\022\n\ndataset_id\030\001 \001(\t\022\020" + + "\n\010table_id\030\002 \001(\tB\332\001\n\036com.google.cloud.re" + + "tail.v2betaB\021ExportConfigProtoP\001Z@google" + + ".golang.org/genproto/googleapis/cloud/re" + + "tail/v2beta;retail\242\002\006RETAIL\252\002\032Google.Clo" + + "ud.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V" + + "2beta\352\002\035Google::Cloud::Retail::V2betab\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -107,7 +122,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_ExportProductsResponse_descriptor, new java.lang.String[] { - "ErrorSamples", "ErrorsConfig", + "ErrorSamples", "ErrorsConfig", "OutputResult", }); internal_static_google_cloud_retail_v2beta_ExportUserEventsResponse_descriptor = getDescriptor().getMessageTypes().get(3); @@ -115,7 +130,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_ExportUserEventsResponse_descriptor, new java.lang.String[] { - "ErrorSamples", "ErrorsConfig", + "ErrorSamples", "ErrorsConfig", "OutputResult", + }); + internal_static_google_cloud_retail_v2beta_OutputResult_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_retail_v2beta_OutputResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_OutputResult_descriptor, + new java.lang.String[] { + "BigqueryResult", + }); + internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor, + new java.lang.String[] { + "DatasetId", "TableId", }); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java index d5093160..879f7544 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java @@ -98,6 +98,22 @@ private ExportProductsResponse( errorsConfig_ = subBuilder.buildPartial(); } + break; + } + case 26: + { + com.google.cloud.retail.v2beta.OutputResult.Builder subBuilder = null; + if (outputResult_ != null) { + subBuilder = outputResult_.toBuilder(); + } + outputResult_ = + input.readMessage( + com.google.cloud.retail.v2beta.OutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputResult_); + outputResult_ = subBuilder.buildPartial(); + } + break; } default: @@ -213,7 +229,7 @@ public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -228,7 +244,7 @@ public boolean hasErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -245,7 +261,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfig getErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -255,6 +271,54 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfi return getErrorsConfig(); } + public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; + private com.google.cloud.retail.v2beta.OutputResult outputResult_; + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + @java.lang.Override + public boolean hasOutputResult() { + return outputResult_ != null; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return The outputResult. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResult getOutputResult() { + return outputResult_ == null + ? com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance() + : outputResult_; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResultOrBuilder getOutputResultOrBuilder() { + return getOutputResult(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -275,6 +339,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } + if (outputResult_ != null) { + output.writeMessage(3, getOutputResult()); + } unknownFields.writeTo(output); } @@ -290,6 +357,9 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } + if (outputResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -311,6 +381,10 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } + if (hasOutputResult() != other.hasOutputResult()) return false; + if (hasOutputResult()) { + if (!getOutputResult().equals(other.getOutputResult())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -330,6 +404,10 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } + if (hasOutputResult()) { + hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getOutputResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -492,6 +570,12 @@ public Builder clear() { errorsConfig_ = null; errorsConfigBuilder_ = null; } + if (outputResultBuilder_ == null) { + outputResult_ = null; + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } return this; } @@ -534,6 +618,11 @@ public com.google.cloud.retail.v2beta.ExportProductsResponse buildPartial() { } else { result.errorsConfig_ = errorsConfigBuilder_.build(); } + if (outputResultBuilder_ == null) { + result.outputResult_ = outputResult_; + } else { + result.outputResult_ = outputResultBuilder_.build(); + } onBuilt(); return result; } @@ -614,6 +703,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ExportProductsResponse o if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } + if (other.hasOutputResult()) { + mergeOutputResult(other.getOutputResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -994,7 +1086,7 @@ public java.util.List getErrorSamplesBuilderList( * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1008,7 +1100,7 @@ public boolean hasErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1028,7 +1120,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfig getErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1050,7 +1142,7 @@ public Builder setErrorsConfig(com.google.cloud.retail.v2beta.ExportErrorsConfig * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1070,7 +1162,7 @@ public Builder setErrorsConfig( * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1096,7 +1188,7 @@ public Builder mergeErrorsConfig(com.google.cloud.retail.v2beta.ExportErrorsConf * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1116,7 +1208,7 @@ public Builder clearErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1130,7 +1222,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfig.Builder getErrorsConfig * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1148,7 +1240,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfi * * *
    -     * Echoes the destination for the complete errors in the request if set.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1170,6 +1262,192 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfi return errorsConfigBuilder_; } + private com.google.cloud.retail.v2beta.OutputResult outputResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.OutputResult, + com.google.cloud.retail.v2beta.OutputResult.Builder, + com.google.cloud.retail.v2beta.OutputResultOrBuilder> + outputResultBuilder_; + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + public boolean hasOutputResult() { + return outputResultBuilder_ != null || outputResult_ != null; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return The outputResult. + */ + public com.google.cloud.retail.v2beta.OutputResult getOutputResult() { + if (outputResultBuilder_ == null) { + return outputResult_ == null + ? com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance() + : outputResult_; + } else { + return outputResultBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder setOutputResult(com.google.cloud.retail.v2beta.OutputResult value) { + if (outputResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputResult_ = value; + onChanged(); + } else { + outputResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder setOutputResult( + com.google.cloud.retail.v2beta.OutputResult.Builder builderForValue) { + if (outputResultBuilder_ == null) { + outputResult_ = builderForValue.build(); + onChanged(); + } else { + outputResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder mergeOutputResult(com.google.cloud.retail.v2beta.OutputResult value) { + if (outputResultBuilder_ == null) { + if (outputResult_ != null) { + outputResult_ = + com.google.cloud.retail.v2beta.OutputResult.newBuilder(outputResult_) + .mergeFrom(value) + .buildPartial(); + } else { + outputResult_ = value; + } + onChanged(); + } else { + outputResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder clearOutputResult() { + if (outputResultBuilder_ == null) { + outputResult_ = null; + onChanged(); + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2beta.OutputResult.Builder getOutputResultBuilder() { + + onChanged(); + return getOutputResultFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2beta.OutputResultOrBuilder getOutputResultOrBuilder() { + if (outputResultBuilder_ != null) { + return outputResultBuilder_.getMessageOrBuilder(); + } else { + return outputResult_ == null + ? com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance() + : outputResult_; + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.OutputResult, + com.google.cloud.retail.v2beta.OutputResult.Builder, + com.google.cloud.retail.v2beta.OutputResultOrBuilder> + getOutputResultFieldBuilder() { + if (outputResultBuilder_ == null) { + outputResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.OutputResult, + com.google.cloud.retail.v2beta.OutputResult.Builder, + com.google.cloud.retail.v2beta.OutputResultOrBuilder>( + getOutputResult(), getParentForChildren(), isClean()); + outputResult_ = null; + } + return outputResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponseOrBuilder.java index d4309eec..68422e6f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponseOrBuilder.java @@ -78,7 +78,7 @@ public interface ExportProductsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -90,7 +90,7 @@ public interface ExportProductsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -102,10 +102,45 @@ public interface ExportProductsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors in the request if set.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; */ com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfigOrBuilder(); + + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + boolean hasOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return The outputResult. + */ + com.google.cloud.retail.v2beta.OutputResult getOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + com.google.cloud.retail.v2beta.OutputResultOrBuilder getOutputResultOrBuilder(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java index 520af30a..2f3bfcd9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java @@ -98,6 +98,22 @@ private ExportUserEventsResponse( errorsConfig_ = subBuilder.buildPartial(); } + break; + } + case 26: + { + com.google.cloud.retail.v2beta.OutputResult.Builder subBuilder = null; + if (outputResult_ != null) { + subBuilder = outputResult_.toBuilder(); + } + outputResult_ = + input.readMessage( + com.google.cloud.retail.v2beta.OutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputResult_); + outputResult_ = subBuilder.buildPartial(); + } + break; } default: @@ -213,8 +229,7 @@ public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -229,8 +244,7 @@ public boolean hasErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -247,8 +261,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfig getErrorsConfig() { * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -258,6 +271,54 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfi return getErrorsConfig(); } + public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; + private com.google.cloud.retail.v2beta.OutputResult outputResult_; + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + @java.lang.Override + public boolean hasOutputResult() { + return outputResult_ != null; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return The outputResult. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResult getOutputResult() { + return outputResult_ == null + ? com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance() + : outputResult_; + } + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResultOrBuilder getOutputResultOrBuilder() { + return getOutputResult(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -278,6 +339,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } + if (outputResult_ != null) { + output.writeMessage(3, getOutputResult()); + } unknownFields.writeTo(output); } @@ -293,6 +357,9 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } + if (outputResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -314,6 +381,10 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } + if (hasOutputResult() != other.hasOutputResult()) return false; + if (hasOutputResult()) { + if (!getOutputResult().equals(other.getOutputResult())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -333,6 +404,10 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } + if (hasOutputResult()) { + hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getOutputResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -495,6 +570,12 @@ public Builder clear() { errorsConfig_ = null; errorsConfigBuilder_ = null; } + if (outputResultBuilder_ == null) { + outputResult_ = null; + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } return this; } @@ -537,6 +618,11 @@ public com.google.cloud.retail.v2beta.ExportUserEventsResponse buildPartial() { } else { result.errorsConfig_ = errorsConfigBuilder_.build(); } + if (outputResultBuilder_ == null) { + result.outputResult_ = outputResult_; + } else { + result.outputResult_ = outputResultBuilder_.build(); + } onBuilt(); return result; } @@ -617,6 +703,9 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ExportUserEventsResponse if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } + if (other.hasOutputResult()) { + mergeOutputResult(other.getOutputResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -997,8 +1086,7 @@ public java.util.List getErrorSamplesBuilderList( * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1012,8 +1100,7 @@ public boolean hasErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1033,8 +1120,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfig getErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1056,8 +1142,7 @@ public Builder setErrorsConfig(com.google.cloud.retail.v2beta.ExportErrorsConfig * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1077,8 +1162,7 @@ public Builder setErrorsConfig( * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1104,8 +1188,7 @@ public Builder mergeErrorsConfig(com.google.cloud.retail.v2beta.ExportErrorsConf * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1125,8 +1208,7 @@ public Builder clearErrorsConfig() { * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1140,8 +1222,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfig.Builder getErrorsConfig * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1159,8 +1240,7 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfi * * *
    -     * Echoes the destination for the complete errors if this field was set in
    -     * the request.
    +     * This field is never set.
          * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -1182,6 +1262,192 @@ public com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfi return errorsConfigBuilder_; } + private com.google.cloud.retail.v2beta.OutputResult outputResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.OutputResult, + com.google.cloud.retail.v2beta.OutputResult.Builder, + com.google.cloud.retail.v2beta.OutputResultOrBuilder> + outputResultBuilder_; + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + public boolean hasOutputResult() { + return outputResultBuilder_ != null || outputResult_ != null; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return The outputResult. + */ + public com.google.cloud.retail.v2beta.OutputResult getOutputResult() { + if (outputResultBuilder_ == null) { + return outputResult_ == null + ? com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance() + : outputResult_; + } else { + return outputResultBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder setOutputResult(com.google.cloud.retail.v2beta.OutputResult value) { + if (outputResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputResult_ = value; + onChanged(); + } else { + outputResultBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder setOutputResult( + com.google.cloud.retail.v2beta.OutputResult.Builder builderForValue) { + if (outputResultBuilder_ == null) { + outputResult_ = builderForValue.build(); + onChanged(); + } else { + outputResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder mergeOutputResult(com.google.cloud.retail.v2beta.OutputResult value) { + if (outputResultBuilder_ == null) { + if (outputResult_ != null) { + outputResult_ = + com.google.cloud.retail.v2beta.OutputResult.newBuilder(outputResult_) + .mergeFrom(value) + .buildPartial(); + } else { + outputResult_ = value; + } + onChanged(); + } else { + outputResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public Builder clearOutputResult() { + if (outputResultBuilder_ == null) { + outputResult_ = null; + onChanged(); + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2beta.OutputResult.Builder getOutputResultBuilder() { + + onChanged(); + return getOutputResultFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + public com.google.cloud.retail.v2beta.OutputResultOrBuilder getOutputResultOrBuilder() { + if (outputResultBuilder_ != null) { + return outputResultBuilder_.getMessageOrBuilder(); + } else { + return outputResult_ == null + ? com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance() + : outputResult_; + } + } + /** + * + * + *
    +     * Output result indicating where the data were exported to.
    +     * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.OutputResult, + com.google.cloud.retail.v2beta.OutputResult.Builder, + com.google.cloud.retail.v2beta.OutputResultOrBuilder> + getOutputResultFieldBuilder() { + if (outputResultBuilder_ == null) { + outputResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.OutputResult, + com.google.cloud.retail.v2beta.OutputResult.Builder, + com.google.cloud.retail.v2beta.OutputResultOrBuilder>( + getOutputResult(), getParentForChildren(), isClean()); + outputResult_ = null; + } + return outputResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponseOrBuilder.java index d1320973..db340884 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponseOrBuilder.java @@ -78,8 +78,7 @@ public interface ExportUserEventsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -91,8 +90,7 @@ public interface ExportUserEventsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; @@ -104,11 +102,45 @@ public interface ExportUserEventsResponseOrBuilder * * *
    -   * Echoes the destination for the complete errors if this field was set in
    -   * the request.
    +   * This field is never set.
        * 
    * * .google.cloud.retail.v2beta.ExportErrorsConfig errors_config = 2; */ com.google.cloud.retail.v2beta.ExportErrorsConfigOrBuilder getErrorsConfigOrBuilder(); + + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return Whether the outputResult field is set. + */ + boolean hasOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + * + * @return The outputResult. + */ + com.google.cloud.retail.v2beta.OutputResult getOutputResult(); + /** + * + * + *
    +   * Output result indicating where the data were exported to.
    +   * 
    + * + * .google.cloud.retail.v2beta.OutputResult output_result = 3; + */ + com.google.cloud.retail.v2beta.OutputResultOrBuilder getOutputResultOrBuilder(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java index 5f00dc22..72ccaf6e 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java @@ -122,7 +122,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -148,7 +148,7 @@ public java.lang.String getName() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -497,7 +497,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -522,7 +522,7 @@ public java.lang.String getName() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -547,7 +547,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -571,7 +571,7 @@ public Builder setName(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -591,7 +591,7 @@ public Builder clearName() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequestOrBuilder.java index ad5d1794..e76a5168 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetAttributesConfigRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface GetAttributesConfigRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java index 2f29398b..7737aee3 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java @@ -120,7 +120,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -146,7 +146,7 @@ public java.lang.String getName() { * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -491,7 +491,7 @@ public Builder mergeFrom( * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -516,7 +516,7 @@ public java.lang.String getName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -541,7 +541,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -565,7 +565,7 @@ public Builder setName(java.lang.String value) { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * @@ -585,7 +585,7 @@ public Builder clearName() { * *
          * Required. The resource name of the Control to delete. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java index 380e3141..7b04cb9e 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface GetControlRequestOrBuilder * *
        * Required. The resource name of the Control to delete. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java index 66a4cc78..004e78cd 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [GetProduct][] method.
    + * Request message for
    + * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.GetProductRequest} @@ -343,7 +345,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [GetProduct][] method.
    +   * Request message for
    +   * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.GetProductRequest} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java index 72125695..b64a2977 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java @@ -305,7 +305,7 @@ public long getFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return The requestId. */ @java.lang.Override @@ -331,7 +331,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return The bytes for requestId. */ @java.lang.Override @@ -1314,7 +1314,7 @@ public Builder clearFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return The requestId. */ @java.lang.Deprecated @@ -1339,7 +1339,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1364,7 +1364,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1388,7 +1388,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1408,7 +1408,7 @@ public Builder clearRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @param value The bytes for requestId to set. * @return This builder for chaining. */ diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java index e8f67844..81590ce9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java @@ -132,7 +132,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return The requestId. */ @java.lang.Deprecated @@ -147,7 +147,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=341 + * google/cloud/retail/v2beta/import_config.proto;l=348 * @return The bytes for requestId. */ @java.lang.Deprecated diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java index a031b7e0..e519bc08 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java @@ -686,11 +686,17 @@ public int getReconciliationModeValue() { * * *
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -716,11 +722,17 @@ public java.lang.String getNotificationPubsubTopic() {
        *
        *
        * 
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -2153,11 +2165,17 @@ public Builder clearReconciliationMode() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2182,11 +2200,17 @@ public java.lang.String getNotificationPubsubTopic() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2211,11 +2235,17 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2239,11 +2269,17 @@ public Builder setNotificationPubsubTopic(java.lang.String value) {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    @@ -2263,11 +2299,17 @@ public Builder clearNotificationPubsubTopic() {
          *
          *
          * 
    -     * Pub/Sub topic for receiving notification. If this field is set,
    +     * Full Pub/Sub topic name for receiving notification. If this field is set,
          * when the import is finished, a notification will be sent to
          * specified Pub/Sub topic. The message data will be JSON string of a
          * [Operation][google.longrunning.Operation].
    -     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +     * to be within the same project as
    +     * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +     * Make sure that both
    +     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +     * have the `pubsub.topics.publish` IAM permission on the topic.
          * Only supported when
          * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
          * is set to `FULL`.
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java
    index 80021275..4cc3c26f 100644
    --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java
    +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java
    @@ -240,11 +240,17 @@ public interface ImportProductsRequestOrBuilder
        *
        *
        * 
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    @@ -259,11 +265,17 @@ public interface ImportProductsRequestOrBuilder
        *
        *
        * 
    -   * Pub/Sub topic for receiving notification. If this field is set,
    +   * Full Pub/Sub topic name for receiving notification. If this field is set,
        * when the import is finished, a notification will be sent to
        * specified Pub/Sub topic. The message data will be JSON string of a
        * [Operation][google.longrunning.Operation].
    -   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    +   * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    +   * to be within the same project as
    +   * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
    +   * Make sure that both
    +   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
    +   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
    +   * have the `pubsub.topics.publish` IAM permission on the topic.
        * Only supported when
        * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
        * is set to `FULL`.
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java
    index 81996ee7..ad292b67 100644
    --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java
    +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java
    @@ -141,7 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        *
        * 
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -167,7 +167,7 @@ public java.lang.String getParent() { * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -687,7 +687,7 @@ public Builder mergeFrom( * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -712,7 +712,7 @@ public java.lang.String getParent() { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -737,7 +737,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -761,7 +761,7 @@ public Builder setParent(java.lang.String value) { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * @@ -781,7 +781,7 @@ public Builder clearParent() { * *
          * Required. The catalog resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequestOrBuilder.java index 50d0f04c..a4ccade8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListControlsRequestOrBuilder * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * @@ -43,7 +43,7 @@ public interface ListControlsRequestOrBuilder * *
        * Required. The catalog resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java new file mode 100644 index 00000000..2276b70e --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java @@ -0,0 +1,966 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/export_config.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
    + * Output result.
    + * 
    + * + * Protobuf type {@code google.cloud.retail.v2beta.OutputResult} + */ +public final class OutputResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.OutputResult) + OutputResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputResult.newBuilder() to construct. + private OutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputResult() { + bigqueryResult_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bigqueryResult_.add( + input.readMessage( + com.google.cloud.retail.v2beta.BigQueryOutputResult.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = java.util.Collections.unmodifiableList(bigqueryResult_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.OutputResult.class, + com.google.cloud.retail.v2beta.OutputResult.Builder.class); + } + + public static final int BIGQUERY_RESULT_FIELD_NUMBER = 1; + private java.util.List bigqueryResult_; + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public java.util.List + getBigqueryResultList() { + return bigqueryResult_; + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public java.util.List + getBigqueryResultOrBuilderList() { + return bigqueryResult_; + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public int getBigqueryResultCount() { + return bigqueryResult_.size(); + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.BigQueryOutputResult getBigqueryResult(int index) { + return bigqueryResult_.get(index); + } + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder getBigqueryResultOrBuilder( + int index) { + return bigqueryResult_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < bigqueryResult_.size(); i++) { + output.writeMessage(1, bigqueryResult_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bigqueryResult_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bigqueryResult_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.OutputResult)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.OutputResult other = + (com.google.cloud.retail.v2beta.OutputResult) obj; + + if (!getBigqueryResultList().equals(other.getBigqueryResultList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBigqueryResultCount() > 0) { + hash = (37 * hash) + BIGQUERY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryResultList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.OutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Output result.
    +   * 
    + * + * Protobuf type {@code google.cloud.retail.v2beta.OutputResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.OutputResult) + com.google.cloud.retail.v2beta.OutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.OutputResult.class, + com.google.cloud.retail.v2beta.OutputResult.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.OutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBigqueryResultFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (bigqueryResultBuilder_ == null) { + bigqueryResult_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bigqueryResultBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ExportConfigProto + .internal_static_google_cloud_retail_v2beta_OutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResult getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResult build() { + com.google.cloud.retail.v2beta.OutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResult buildPartial() { + com.google.cloud.retail.v2beta.OutputResult result = + new com.google.cloud.retail.v2beta.OutputResult(this); + int from_bitField0_ = bitField0_; + if (bigqueryResultBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = java.util.Collections.unmodifiableList(bigqueryResult_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bigqueryResult_ = bigqueryResult_; + } else { + result.bigqueryResult_ = bigqueryResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.OutputResult) { + return mergeFrom((com.google.cloud.retail.v2beta.OutputResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.OutputResult other) { + if (other == com.google.cloud.retail.v2beta.OutputResult.getDefaultInstance()) return this; + if (bigqueryResultBuilder_ == null) { + if (!other.bigqueryResult_.isEmpty()) { + if (bigqueryResult_.isEmpty()) { + bigqueryResult_ = other.bigqueryResult_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBigqueryResultIsMutable(); + bigqueryResult_.addAll(other.bigqueryResult_); + } + onChanged(); + } + } else { + if (!other.bigqueryResult_.isEmpty()) { + if (bigqueryResultBuilder_.isEmpty()) { + bigqueryResultBuilder_.dispose(); + bigqueryResultBuilder_ = null; + bigqueryResult_ = other.bigqueryResult_; + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryResultBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBigqueryResultFieldBuilder() + : null; + } else { + bigqueryResultBuilder_.addAllMessages(other.bigqueryResult_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2beta.OutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.retail.v2beta.OutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List bigqueryResult_ = + java.util.Collections.emptyList(); + + private void ensureBigqueryResultIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bigqueryResult_ = + new java.util.ArrayList( + bigqueryResult_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.BigQueryOutputResult, + com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder, + com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder> + bigqueryResultBuilder_; + + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public java.util.List + getBigqueryResultList() { + if (bigqueryResultBuilder_ == null) { + return java.util.Collections.unmodifiableList(bigqueryResult_); + } else { + return bigqueryResultBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public int getBigqueryResultCount() { + if (bigqueryResultBuilder_ == null) { + return bigqueryResult_.size(); + } else { + return bigqueryResultBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2beta.BigQueryOutputResult getBigqueryResult(int index) { + if (bigqueryResultBuilder_ == null) { + return bigqueryResult_.get(index); + } else { + return bigqueryResultBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder setBigqueryResult( + int index, com.google.cloud.retail.v2beta.BigQueryOutputResult value) { + if (bigqueryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryResultIsMutable(); + bigqueryResult_.set(index, value); + onChanged(); + } else { + bigqueryResultBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder setBigqueryResult( + int index, com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder builderForValue) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.set(index, builderForValue.build()); + onChanged(); + } else { + bigqueryResultBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult(com.google.cloud.retail.v2beta.BigQueryOutputResult value) { + if (bigqueryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(value); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult( + int index, com.google.cloud.retail.v2beta.BigQueryOutputResult value) { + if (bigqueryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(index, value); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult( + com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder builderForValue) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(builderForValue.build()); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addBigqueryResult( + int index, com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder builderForValue) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(index, builderForValue.build()); + onChanged(); + } else { + bigqueryResultBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder addAllBigqueryResult( + java.lang.Iterable values) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bigqueryResult_); + onChanged(); + } else { + bigqueryResultBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder clearBigqueryResult() { + if (bigqueryResultBuilder_ == null) { + bigqueryResult_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bigqueryResultBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public Builder removeBigqueryResult(int index) { + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.remove(index); + onChanged(); + } else { + bigqueryResultBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder getBigqueryResultBuilder( + int index) { + return getBigqueryResultFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder getBigqueryResultOrBuilder( + int index) { + if (bigqueryResultBuilder_ == null) { + return bigqueryResult_.get(index); + } else { + return bigqueryResultBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public java.util.List + getBigqueryResultOrBuilderList() { + if (bigqueryResultBuilder_ != null) { + return bigqueryResultBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bigqueryResult_); + } + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder addBigqueryResultBuilder() { + return getBigqueryResultFieldBuilder() + .addBuilder(com.google.cloud.retail.v2beta.BigQueryOutputResult.getDefaultInstance()); + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder addBigqueryResultBuilder( + int index) { + return getBigqueryResultFieldBuilder() + .addBuilder( + index, com.google.cloud.retail.v2beta.BigQueryOutputResult.getDefaultInstance()); + } + /** + * + * + *
    +     * Export result in BigQuery.
    +     * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + public java.util.List + getBigqueryResultBuilderList() { + return getBigqueryResultFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.BigQueryOutputResult, + com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder, + com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder> + getBigqueryResultFieldBuilder() { + if (bigqueryResultBuilder_ == null) { + bigqueryResultBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.BigQueryOutputResult, + com.google.cloud.retail.v2beta.BigQueryOutputResult.Builder, + com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder>( + bigqueryResult_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bigqueryResult_ = null; + } + return bigqueryResultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.OutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.OutputResult) + private static final com.google.cloud.retail.v2beta.OutputResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.OutputResult(); + } + + public static com.google.cloud.retail.v2beta.OutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.OutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResultOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResultOrBuilder.java new file mode 100644 index 00000000..5977b79a --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResultOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/export_config.proto + +package com.google.cloud.retail.v2beta; + +public interface OutputResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.OutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + java.util.List getBigqueryResultList(); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + com.google.cloud.retail.v2beta.BigQueryOutputResult getBigqueryResult(int index); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + int getBigqueryResultCount(); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + java.util.List + getBigqueryResultOrBuilderList(); + /** + * + * + *
    +   * Export result in BigQuery.
    +   * 
    + * + * repeated .google.cloud.retail.v2beta.BigQueryOutputResult bigquery_result = 1; + */ + com.google.cloud.retail.v2beta.BigQueryOutputResultOrBuilder getBigqueryResultOrBuilder( + int index); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java index 57c8073e..e1813dce 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java @@ -202,13 +202,18 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -232,13 +237,18 @@ public java.lang.String getPlacement() { * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -268,6 +278,15 @@ public com.google.protobuf.ByteString getPlacementBytes() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. *
    * * @@ -288,6 +307,15 @@ public boolean hasUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. *
    * * @@ -310,6 +338,15 @@ public com.google.cloud.retail.v2beta.UserEvent getUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. *
    * * @@ -348,7 +385,7 @@ public int getPageSize() { * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * * string page_token = 4; @@ -371,7 +408,7 @@ public java.lang.String getPageToken() { * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * * string page_token = 4; @@ -420,6 +457,12 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) *
    * * string filter = 5; @@ -465,6 +508,12 @@ public java.lang.String getFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) *
    * * string filter = 5; @@ -560,6 +609,8 @@ public int getParamsCount() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -604,6 +655,8 @@ public java.util.Map getParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -639,6 +692,8 @@ public java.util.Map getParamsMap() * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -679,6 +734,8 @@ public com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. *
    * * map<string, .google.protobuf.Value> params = 7; @@ -728,7 +785,7 @@ public int getLabelsCount() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -764,7 +821,7 @@ public java.util.Map getLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -791,7 +848,7 @@ public java.util.Map getLabelsMap() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -822,7 +879,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -1330,13 +1387,18 @@ public Builder mergeFrom( * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1359,13 +1421,18 @@ public java.lang.String getPlacement() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1388,13 +1455,18 @@ public com.google.protobuf.ByteString getPlacementBytes() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1416,13 +1488,18 @@ public Builder setPlacement(java.lang.String value) { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1440,13 +1517,18 @@ public Builder clearPlacement() { * *
          * Required. Full resource name of the format:
    -     * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -     * The ID of the Recommendations AI placement. Before you can request
    -     * predictions from your model, you must create at least one placement for it.
    -     * For more information, see [Managing
    -     * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -     * The full list of available placements can be seen at
    -     * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +     * or
    +     * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +     * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +     * resource.
    +     * The ID of the Recommendations AI serving config or placement.
    +     * Before you can request predictions from your model, you must create at
    +     * least one serving config or placement for it. For more information, see
    +     * [Managing serving configurations]
    +     * (https://cloud.google.com/retail/docs/manage-configs).
    +     * The full list of available serving configs can be seen at
    +     * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
          * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1479,6 +1561,15 @@ public Builder setPlacementBytes(com.google.protobuf.ByteString value) { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1498,6 +1589,15 @@ public boolean hasUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1523,6 +1623,15 @@ public com.google.cloud.retail.v2beta.UserEvent getUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1550,6 +1659,15 @@ public Builder setUserEvent(com.google.cloud.retail.v2beta.UserEvent value) { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1574,6 +1692,15 @@ public Builder setUserEvent(com.google.cloud.retail.v2beta.UserEvent.Builder bui * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1605,6 +1732,15 @@ public Builder mergeUserEvent(com.google.cloud.retail.v2beta.UserEvent value) { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1630,6 +1766,15 @@ public Builder clearUserEvent() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1649,6 +1794,15 @@ public com.google.cloud.retail.v2beta.UserEvent.Builder getUserEventBuilder() { * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1672,6 +1826,15 @@ public com.google.cloud.retail.v2beta.UserEventOrBuilder getUserEventOrBuilder() * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -1761,7 +1924,7 @@ public Builder clearPageSize() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * * string page_token = 4; @@ -1783,7 +1946,7 @@ public java.lang.String getPageToken() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * * string page_token = 4; @@ -1805,7 +1968,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * * string page_token = 4; @@ -1826,7 +1989,7 @@ public Builder setPageToken(java.lang.String value) { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * * string page_token = 4; @@ -1843,7 +2006,7 @@ public Builder clearPageToken() { * * *
    -     * The previous PredictResponse.next_page_token.
    +     * This field is not used for now; leave it unset.
          * 
    * * string page_token = 4; @@ -1890,6 +2053,12 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -1934,6 +2103,12 @@ public java.lang.String getFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -1978,6 +2153,12 @@ public com.google.protobuf.ByteString getFilterBytes() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2021,6 +2202,12 @@ public Builder setFilter(java.lang.String value) { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2060,6 +2247,12 @@ public Builder clearFilter() { * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -2192,6 +2385,8 @@ public int getParamsCount() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2236,6 +2431,8 @@ public java.util.Map getParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2271,6 +2468,8 @@ public java.util.Map getParamsMap() * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2311,6 +2510,8 @@ public com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2358,6 +2559,8 @@ public Builder clearParams() { * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2401,6 +2604,8 @@ public java.util.Map getMutablePara * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2443,6 +2648,8 @@ public Builder putParams(java.lang.String key, com.google.protobuf.Value value) * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -2485,7 +2692,7 @@ public int getLabelsCount() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2521,7 +2728,7 @@ public java.util.Map getLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2548,7 +2755,7 @@ public java.util.Map getLabelsMap() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2580,7 +2787,7 @@ public java.lang.String getLabelsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2619,7 +2826,7 @@ public Builder clearLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2654,7 +2861,7 @@ public java.util.Map getMutableLabels() { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -2688,7 +2895,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java index c7837d6c..458b3ad4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java @@ -28,13 +28,18 @@ public interface PredictRequestOrBuilder * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -47,13 +52,18 @@ public interface PredictRequestOrBuilder * *
        * Required. Full resource name of the format:
    -   * {name=projects/*/locations/global/catalogs/default_catalog/placements/*}
    -   * The ID of the Recommendations AI placement. Before you can request
    -   * predictions from your model, you must create at least one placement for it.
    -   * For more information, see [Managing
    -   * placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
    -   * The full list of available placements can be seen at
    -   * https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
    +   * or
    +   * `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
    +   * We recommend using the `servingConfigs` resource. `placements` is a legacy
    +   * resource.
    +   * The ID of the Recommendations AI serving config or placement.
    +   * Before you can request predictions from your model, you must create at
    +   * least one serving config or placement for it. For more information, see
    +   * [Managing serving configurations]
    +   * (https://cloud.google.com/retail/docs/manage-configs).
    +   * The full list of available serving configs can be seen at
    +   * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
        * 
    * * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -70,6 +80,15 @@ public interface PredictRequestOrBuilder * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -87,6 +106,15 @@ public interface PredictRequestOrBuilder * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -104,6 +132,15 @@ public interface PredictRequestOrBuilder * they took to trigger the predict request. Note that this user event detail * won't be ingested to userEvent logs. Thus, a separate userEvent write * request is required for event logging. + * Don't set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + * fixed ID for different users. If you are trying to receive non-personalized + * recommendations (not recommended; this can negatively impact model + * performance), instead set + * [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + * a random unique ID and leave + * [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. * * * @@ -132,7 +169,7 @@ public interface PredictRequestOrBuilder * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * * string page_token = 4; @@ -144,7 +181,7 @@ public interface PredictRequestOrBuilder * * *
    -   * The previous PredictResponse.next_page_token.
    +   * This field is not used for now; leave it unset.
        * 
    * * string page_token = 4; @@ -180,6 +217,12 @@ public interface PredictRequestOrBuilder * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -214,6 +257,12 @@ public interface PredictRequestOrBuilder * receive empty results instead. * Note that the API will never return items with storageStatus of "EXPIRED" * or "DELETED" regardless of filter choices. + * If `filterSyntaxV2` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + * * (availability: ANY("IN_STOCK")) AND + * (colors: ANY("Red") OR categories: ANY("Phones")) * * * string filter = 5; @@ -265,6 +314,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -297,6 +348,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -332,6 +385,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -364,6 +419,8 @@ public interface PredictRequestOrBuilder * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -401,6 +458,8 @@ com.google.protobuf.Value getParamsOrDefault( * 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives * request-level control and adjusts prediction results based on product * category. + * * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + * field is interpreteted according to the new, attribute-based syntax. * * * map<string, .google.protobuf.Value> params = 7; @@ -415,7 +474,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -439,7 +498,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -466,7 +525,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -490,7 +549,7 @@ com.google.protobuf.Value getParamsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and @@ -519,7 +578,7 @@ java.lang.String getLabelsOrDefault( * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters, and cannot be empty. Values can be empty, and have a maximum + * characters and cannot be empty. Values can be empty and have a maximum * length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, * underscores, and dashes. All characters must use UTF-8 encoding, and diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java index 7e1e561a..7bdf522b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java @@ -187,9 +187,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -202,9 +202,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -220,9 +220,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -235,9 +235,9 @@ public interface PredictionResultOrBuilder *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -255,9 +255,9 @@ com.google.protobuf.Value getMetadataOrDefault( *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -471,9 +471,9 @@ public int getMetadataCount() { *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -498,9 +498,9 @@ public java.util.Map getMetadata() *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -516,9 +516,9 @@ public java.util.Map getMetadataMap *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -540,9 +540,9 @@ public com.google.protobuf.Value getMetadataOrDefault( *
          * Additional product metadata / annotations.
          * Possible values:
    -     * * `product`: JSON representation of the product. Will be set if
    +     * * `product`: JSON representation of the product. Is set if
          *   `returnProduct` is set to true in `PredictRequest.params`.
    -     * * `score`: Prediction score in double value. Will be set if
    +     * * `score`: Prediction score in double value. Is set if
          *   `returnScore` is set to true in `PredictRequest.params`.
          * 
    * @@ -1074,9 +1074,9 @@ public int getMetadataCount() { *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1101,9 +1101,9 @@ public java.util.Map getMetadata() *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1119,9 +1119,9 @@ public java.util.Map getMetadataMap *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1143,9 +1143,9 @@ public com.google.protobuf.Value getMetadataOrDefault( *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1174,9 +1174,9 @@ public Builder clearMetadata() { *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1200,9 +1200,9 @@ public java.util.Map getMutableMeta *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * @@ -1225,9 +1225,9 @@ public Builder putMetadata(java.lang.String key, com.google.protobuf.Value value *
            * Additional product metadata / annotations.
            * Possible values:
    -       * * `product`: JSON representation of the product. Will be set if
    +       * * `product`: JSON representation of the product. Is set if
            *   `returnProduct` is set to true in `PredictRequest.params`.
    -       * * `score`: Prediction score in double value. Will be set if
    +       * * `score`: Prediction score in double value. Is set if
            *   `returnScore` is set to true in `PredictRequest.params`.
            * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java index fdc49290..a4466626 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java @@ -64,42 +64,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "service.proto\022\032google.cloud.retail.v2bet" + "a\032\034google/api/annotations.proto\032\027google/" + "api/client.proto\032\037google/api/field_behav" - + "ior.proto\032+google/cloud/retail/v2beta/us" - + "er_event.proto\032\034google/protobuf/struct.p" - + "roto\"\274\003\n\016PredictRequest\022\026\n\tplacement\030\001 \001" - + "(\tB\003\340A\002\022>\n\nuser_event\030\002 \001(\0132%.google.clo" - + "ud.retail.v2beta.UserEventB\003\340A\002\022\021\n\tpage_" - + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\016\n\006filter" - + "\030\005 \001(\t\022\025\n\rvalidate_only\030\006 \001(\010\022F\n\006params\030" - + "\007 \003(\01326.google.cloud.retail.v2beta.Predi" - + "ctRequest.ParamsEntry\022F\n\006labels\030\010 \003(\01326." - + "google.cloud.retail.v2beta.PredictReques" - + "t.LabelsEntry\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(" - + "\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Value" - + ":\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\357\002\n\017PredictResponse\022M\n\007resul" - + "ts\030\001 \003(\0132<.google.cloud.retail.v2beta.Pr" - + "edictResponse.PredictionResult\022\031\n\021attrib" - + "ution_token\030\002 \001(\t\022\023\n\013missing_ids\030\003 \003(\t\022\025" - + "\n\rvalidate_only\030\004 \001(\010\032\305\001\n\020PredictionResu" - + "lt\022\n\n\002id\030\001 \001(\t\022\\\n\010metadata\030\002 \003(\0132J.googl" - + "e.cloud.retail.v2beta.PredictResponse.Pr" - + "edictionResult.MetadataEntry\032G\n\rMetadata" - + "Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goog" - + "le.protobuf.Value:\0028\0012\232\002\n\021PredictionServ" - + "ice\022\271\001\n\007Predict\022*.google.cloud.retail.v2" - + "beta.PredictRequest\032+.google.cloud.retai" - + "l.v2beta.PredictResponse\"U\202\323\344\223\002O\"J/v2bet" - + "a/{placement=projects/*/locations/*/cata" - + "logs/*/placements/*}:predict:\001*\032I\312A\025reta" - + "il.googleapis.com\322A.https://www.googleap" - + "is.com/auth/cloud-platformB\337\001\n\036com.googl" - + "e.cloud.retail.v2betaB\026PredictionService" - + "ProtoP\001Z@google.golang.org/genproto/goog" - + "leapis/cloud/retail/v2beta;retail\242\002\006RETA" - + "IL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google" - + "\\Cloud\\Retail\\V2beta\352\002\035Google::Cloud::Re" - + "tail::V2betab\006proto3" + + "ior.proto\032\031google/api/resource.proto\032+go" + + "ogle/cloud/retail/v2beta/user_event.prot" + + "o\032\034google/protobuf/struct.proto\"\274\003\n\016Pred" + + "ictRequest\022\026\n\tplacement\030\001 \001(\tB\003\340A\002\022>\n\nus" + + "er_event\030\002 \001(\0132%.google.cloud.retail.v2b" + + "eta.UserEventB\003\340A\002\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022\025\n\rval" + + "idate_only\030\006 \001(\010\022F\n\006params\030\007 \003(\01326.googl" + + "e.cloud.retail.v2beta.PredictRequest.Par" + + "amsEntry\022F\n\006labels\030\010 \003(\01326.google.cloud." + + "retail.v2beta.PredictRequest.LabelsEntry" + + "\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " + + "\001(\0132\026.google.protobuf.Value:\0028\001\032-\n\013Label" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\357" + + "\002\n\017PredictResponse\022M\n\007results\030\001 \003(\0132<.go" + + "ogle.cloud.retail.v2beta.PredictResponse" + + ".PredictionResult\022\031\n\021attribution_token\030\002" + + " \001(\t\022\023\n\013missing_ids\030\003 \003(\t\022\025\n\rvalidate_on" + + "ly\030\004 \001(\010\032\305\001\n\020PredictionResult\022\n\n\002id\030\001 \001(" + + "\t\022\\\n\010metadata\030\002 \003(\0132J.google.cloud.retai" + + "l.v2beta.PredictResponse.PredictionResul" + + "t.MetadataEntry\032G\n\rMetadataEntry\022\013\n\003key\030" + + "\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.V" + + "alue:\0028\0012\361\002\n\021PredictionService\022\220\002\n\007Predi" + + "ct\022*.google.cloud.retail.v2beta.PredictR" + + "equest\032+.google.cloud.retail.v2beta.Pred" + + "ictResponse\"\253\001\202\323\344\223\002\244\001\"J/v2beta/{placemen" + + "t=projects/*/locations/*/catalogs/*/plac" + + "ements/*}:predict:\001*ZS\"N/v2beta/{placeme" + + "nt=projects/*/locations/*/catalogs/*/ser" + + "vingConfigs/*}:predict:\001*\032I\312A\025retail.goo" + + "gleapis.com\322A.https://www.googleapis.com" + + "/auth/cloud-platformB\337\001\n\036com.google.clou" + + "d.retail.v2betaB\026PredictionServiceProtoP" + + "\001Z@google.golang.org/genproto/googleapis" + + "/cloud/retail/v2beta;retail\242\002\006RETAIL\252\002\032G" + + "oogle.Cloud.Retail.V2Beta\312\002\032Google\\Cloud" + + "\\Retail\\V2beta\352\002\035Google::Cloud::Retail::" + + "V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -108,6 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.retail.v2beta.UserEventProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); @@ -185,6 +189,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.retail.v2beta.UserEventProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java index 22774f13..2bc23176 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java @@ -1499,7 +1499,11 @@ public float getPrice() { * *
        * Price of the product without any discount. If zero, by default set to be
    -   * the [price][google.cloud.retail.v2beta.PriceInfo.price].
    +   * the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set,
    +   * [original_price][google.cloud.retail.v2beta.PriceInfo.original_price]
    +   * should be greater than or equal to
    +   * [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an
    +   * INVALID_ARGUMENT error is thrown.
        * 
    * * float original_price = 3; @@ -2448,7 +2452,11 @@ public Builder clearPrice() { * *
          * Price of the product without any discount. If zero, by default set to be
    -     * the [price][google.cloud.retail.v2beta.PriceInfo.price].
    +     * the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set,
    +     * [original_price][google.cloud.retail.v2beta.PriceInfo.original_price]
    +     * should be greater than or equal to
    +     * [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an
    +     * INVALID_ARGUMENT error is thrown.
          * 
    * * float original_price = 3; @@ -2464,7 +2472,11 @@ public float getOriginalPrice() { * *
          * Price of the product without any discount. If zero, by default set to be
    -     * the [price][google.cloud.retail.v2beta.PriceInfo.price].
    +     * the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set,
    +     * [original_price][google.cloud.retail.v2beta.PriceInfo.original_price]
    +     * should be greater than or equal to
    +     * [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an
    +     * INVALID_ARGUMENT error is thrown.
          * 
    * * float original_price = 3; @@ -2483,7 +2495,11 @@ public Builder setOriginalPrice(float value) { * *
          * Price of the product without any discount. If zero, by default set to be
    -     * the [price][google.cloud.retail.v2beta.PriceInfo.price].
    +     * the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set,
    +     * [original_price][google.cloud.retail.v2beta.PriceInfo.original_price]
    +     * should be greater than or equal to
    +     * [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an
    +     * INVALID_ARGUMENT error is thrown.
          * 
    * * float original_price = 3; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfoOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfoOrBuilder.java index 2078d5cb..63ca3bd0 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfoOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfoOrBuilder.java @@ -87,7 +87,11 @@ public interface PriceInfoOrBuilder * *
        * Price of the product without any discount. If zero, by default set to be
    -   * the [price][google.cloud.retail.v2beta.PriceInfo.price].
    +   * the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set,
    +   * [original_price][google.cloud.retail.v2beta.PriceInfo.original_price]
    +   * should be greater than or equal to
    +   * [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an
    +   * INVALID_ARGUMENT error is thrown.
        * 
    * * float original_price = 3; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java index 2bc7e5c9..10fc790b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java @@ -3540,10 +3540,10 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -3600,10 +3600,10 @@ public boolean hasRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -3662,10 +3662,10 @@ public com.google.protobuf.FieldMask getRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12374,10 +12374,10 @@ public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12433,10 +12433,10 @@ public boolean hasRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12498,10 +12498,10 @@ public com.google.protobuf.FieldMask getRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12565,10 +12565,10 @@ public Builder setRetrievableFields(com.google.protobuf.FieldMask value) { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12629,10 +12629,10 @@ public Builder setRetrievableFields(com.google.protobuf.FieldMask.Builder builde * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12700,10 +12700,10 @@ public Builder mergeRetrievableFields(com.google.protobuf.FieldMask value) { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12765,10 +12765,10 @@ public Builder clearRetrievableFields() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12824,10 +12824,10 @@ public com.google.protobuf.FieldMask.Builder getRetrievableFieldsBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -12887,10 +12887,10 @@ public com.google.protobuf.FieldMaskOrBuilder getRetrievableFieldsOrBuilder() { * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java index 2a9e026c..1d89687a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java @@ -136,10 +136,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -147,8 +147,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -180,10 +180,10 @@ public java.lang.String getIngestionProductType() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -191,8 +191,8 @@ public java.lang.String getIngestionProductType() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -232,8 +232,8 @@ public com.google.protobuf.ByteString getIngestionProductTypeBytes() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -270,8 +270,8 @@ public java.lang.String getMerchantCenterProductIdField() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -643,10 +643,10 @@ public Builder mergeFrom( * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -654,8 +654,8 @@ public Builder mergeFrom( * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -686,10 +686,10 @@ public java.lang.String getIngestionProductType() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -697,8 +697,8 @@ public java.lang.String getIngestionProductType() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -729,10 +729,10 @@ public com.google.protobuf.ByteString getIngestionProductTypeBytes() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -740,8 +740,8 @@ public com.google.protobuf.ByteString getIngestionProductTypeBytes() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -771,10 +771,10 @@ public Builder setIngestionProductType(java.lang.String value) { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -782,8 +782,8 @@ public Builder setIngestionProductType(java.lang.String value) { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -809,10 +809,10 @@ public Builder clearIngestionProductType() { * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -820,8 +820,8 @@ public Builder clearIngestionProductType() { * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -859,8 +859,8 @@ public Builder setIngestionProductTypeBytes(com.google.protobuf.ByteString value * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -896,8 +896,8 @@ public java.lang.String getMerchantCenterProductIdField() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -933,8 +933,8 @@ public com.google.protobuf.ByteString getMerchantCenterProductIdFieldBytes() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -969,8 +969,8 @@ public Builder setMerchantCenterProductIdField(java.lang.String value) { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -1001,8 +1001,8 @@ public Builder clearMerchantCenterProductIdField() { * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfigOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfigOrBuilder.java index a0f05710..b75a8540 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfigOrBuilder.java @@ -35,10 +35,10 @@ public interface ProductLevelConfigOrBuilder * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -46,8 +46,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -68,10 +68,10 @@ public interface ProductLevelConfigOrBuilder * default to * [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] * if unset. - * * `variant`: You can only ingest - * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - * [Product][google.cloud.retail.v2beta.Product]s. - * This means + * * `variant` (incompatible with Retail Search): You can only + * ingest + * [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + * [Product][google.cloud.retail.v2beta.Product]s. This means * [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] * cannot be empty. * If this field is set to an invalid value other than these, an @@ -79,8 +79,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `variant` and * [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] * is `itemGroupId`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -107,8 +107,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * @@ -134,8 +134,8 @@ public interface ProductLevelConfigOrBuilder * If this field is `itemGroupId` and * [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] * is `variant`, an INVALID_ARGUMENT error is returned. - * See [Using product - * levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + * See [Product + * levels](https://cloud.google.com/retail/docs/catalog#product-levels) * for more details. * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java index 05e0efd2..e05d550a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java @@ -2055,10 +2055,10 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -2112,10 +2112,10 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * @@ -2169,10 +2169,10 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( * following fields are always returned in by default: * * [name][google.cloud.retail.v2beta.Product.name] * * [color_info][google.cloud.retail.v2beta.Product.color_info] - * Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is * returned. * Note: Returning more fields in - * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + * [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase * response payload size and serving latency. * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java index 75859d85..e5b92e64 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeConfigProto.java @@ -51,16 +51,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n-google/cloud/retail/v2beta/purge_confi" + "g.proto\022\032google.cloud.retail.v2beta\032\037goo" + "gle/api/field_behavior.proto\032\031google/api" - + "/resource.proto\"\017\n\rPurgeMetadata\"Q\n\026Purg" - + "eUserEventsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022" - + "\023\n\006filter\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"6\n\027P" - + "urgeUserEventsResponse\022\033\n\023purged_events_" - + "count\030\001 \001(\003B\331\001\n\036com.google.cloud.retail." - + "v2betaB\020PurgeConfigProtoP\001Z@google.golan" - + "g.org/genproto/googleapis/cloud/retail/v" - + "2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud.Ret" - + "ail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352" - + "\002\035Google::Cloud::Retail::V2betab\006proto3" + + "/resource.proto\"\017\n\rPurgeMetadata\"s\n\026Purg" + + "eUserEventsRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372" + + "A\037\n\035retail.googleapis.com/Catalog\022\023\n\006fil" + + "ter\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\"6\n\027PurgeUs" + + "erEventsResponse\022\033\n\023purged_events_count\030" + + "\001 \001(\003B\331\001\n\036com.google.cloud.retail.v2beta" + + "B\020PurgeConfigProtoP\001Z@google.golang.org/" + + "genproto/googleapis/cloud/retail/v2beta;" + + "retail\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2" + + "Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Goog" + + "le::Cloud::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -94,6 +95,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java index 555a4cd8..4a926791 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java @@ -137,7 +137,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -162,7 +164,9 @@ public java.lang.String getParent() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -646,7 +650,9 @@ public Builder mergeFrom( * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -670,7 +676,9 @@ public java.lang.String getParent() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -694,7 +702,9 @@ public com.google.protobuf.ByteString getParentBytes() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -717,7 +727,9 @@ public Builder setParent(java.lang.String value) { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -736,7 +748,9 @@ public Builder clearParent() { * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequestOrBuilder.java index 83e70048..6bebf0a2 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface PurgeUserEventsRequestOrBuilder * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -46,7 +48,9 @@ public interface PurgeUserEventsRequestOrBuilder * `projects/${projectId}/locations/global/catalogs/${catalogId}` * * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RecommendationsFilteringOption.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RecommendationsFilteringOption.java new file mode 100644 index 00000000..e9dc4374 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RecommendationsFilteringOption.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/common.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
    + * If filtering for recommendations is enabled.
    + * 
    + * + * Protobuf enum {@code google.cloud.retail.v2beta.RecommendationsFilteringOption} + */ +public enum RecommendationsFilteringOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +   * Value used when unset.
    +   * In this case, server behavior defaults to
    +   * [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2beta.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED].
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0; + */ + RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED(0), + /** + * + * + *
    +   * Recommendation filtering is disabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_DISABLED = 1; + */ + RECOMMENDATIONS_FILTERING_DISABLED(1), + /** + * + * + *
    +   * Recommendation filtering is enabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_ENABLED = 3; + */ + RECOMMENDATIONS_FILTERING_ENABLED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +   * Value used when unset.
    +   * In this case, server behavior defaults to
    +   * [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2beta.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED].
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0; + */ + public static final int RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +   * Recommendation filtering is disabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_DISABLED = 1; + */ + public static final int RECOMMENDATIONS_FILTERING_DISABLED_VALUE = 1; + /** + * + * + *
    +   * Recommendation filtering is enabled.
    +   * 
    + * + * RECOMMENDATIONS_FILTERING_ENABLED = 3; + */ + public static final int RECOMMENDATIONS_FILTERING_ENABLED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RecommendationsFilteringOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RecommendationsFilteringOption forNumber(int value) { + switch (value) { + case 0: + return RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED; + case 1: + return RECOMMENDATIONS_FILTERING_DISABLED; + case 3: + return RECOMMENDATIONS_FILTERING_ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RecommendationsFilteringOption findValueByNumber(int number) { + return RecommendationsFilteringOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CommonProto.getDescriptor().getEnumTypes().get(2); + } + + private static final RecommendationsFilteringOption[] VALUES = values(); + + public static RecommendationsFilteringOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RecommendationsFilteringOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.RecommendationsFilteringOption) +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java index e6d1fc07..c4b063ff 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java @@ -130,7 +130,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -156,7 +156,7 @@ public java.lang.String getAttributesConfig() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -574,7 +574,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -599,7 +599,7 @@ public java.lang.String getAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -624,7 +624,7 @@ public com.google.protobuf.ByteString getAttributesConfigBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -648,7 +648,7 @@ public Builder setAttributesConfig(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -668,7 +668,7 @@ public Builder clearAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequestOrBuilder.java index 50bf0b83..ce9e27dd 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface RemoveCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface RemoveCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java index 0d97cc11..1f869912 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the RemoveFulfillmentPlaces operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [RemoveFulfillmentPlaces][] method.
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata} @@ -264,7 +265,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the RemoveFulfillmentPlaces operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [RemoveFulfillmentPlaces][] method.
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java index 99163fa0..0c5b45ff 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [RemoveFulfillmentPlaces][] method.
    + * Request message for
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest} @@ -240,7 +242,8 @@ public com.google.protobuf.ByteString getProductBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -277,7 +280,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -677,7 +681,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [RemoveFulfillmentPlaces][] method.
    +   * Request message for
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest} @@ -1042,7 +1048,8 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1078,7 +1085,8 @@ public java.lang.String getType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1114,7 +1122,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1149,7 +1158,8 @@ public Builder setType(java.lang.String value) { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -1180,7 +1190,8 @@ public Builder clearType() { * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequestOrBuilder.java index 99d8c948..c4e0387a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequestOrBuilder.java @@ -80,7 +80,8 @@ public interface RemoveFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -106,7 +107,8 @@ public interface RemoveFulfillmentPlacesRequestOrBuilder * * "custom-type-5" * If this field is set to an invalid value other than these, an * INVALID_ARGUMENT error is returned. - * This field directly corresponds to [Product.fulfillment_info.type][]. + * This field directly corresponds to + * [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. * * * string type = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java index 78319a88..6391eb91 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
    - * is no meaningful response populated from the [RemoveFulfillmentPlaces][]
    + * is no meaningful response populated from the
    + * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
      * method.
      * 
    * @@ -263,7 +264,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
    -   * is no meaningful response populated from the [RemoveFulfillmentPlaces][]
    +   * is no meaningful response populated from the
    +   * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java index 9863a71d..312a9a48 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the RemoveLocalInventories operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [RemoveLocalInventories][] method.
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata} @@ -264,7 +265,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the RemoveLocalInventories operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [RemoveLocalInventories][] method.
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java index 95d5864f..1fea12bf 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [RemoveLocalInventories][] method.
    + * Request message for
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveLocalInventoriesRequest} @@ -554,7 +556,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [RemoveLocalInventories][] method.
    +   * Request message for
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.RemoveLocalInventoriesRequest} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java index 163d70dc..27e33fa0 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java @@ -22,8 +22,11 @@ * * *
    - * Response of the [RemoveLocalInventories][] API.  Currently empty because
    - * there is no meaningful response populated from the [RemoveLocalInventories][]
    + * Response of the
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
    + * API.  Currently empty because there is no meaningful response populated from
    + * the
    + * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
      * method.
      * 
    * @@ -262,8 +265,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Response of the [RemoveLocalInventories][] API.  Currently empty because
    -   * there is no meaningful response populated from the [RemoveLocalInventories][]
    +   * Response of the
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
    +   * API.  Currently empty because there is no meaningful response populated from
    +   * the
    +   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java index 2156e515..7e47d955 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java @@ -154,7 +154,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -180,7 +180,7 @@ public java.lang.String getAttributesConfig() { * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -703,7 +703,7 @@ public Builder mergeFrom( * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -728,7 +728,7 @@ public java.lang.String getAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -753,7 +753,7 @@ public com.google.protobuf.ByteString getAttributesConfigBytes() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -777,7 +777,7 @@ public Builder setAttributesConfig(java.lang.String value) { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * @@ -797,7 +797,7 @@ public Builder clearAttributesConfig() { * *
          * Required. Full AttributesConfig resource name. Format:
    -     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
          * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequestOrBuilder.java index 14e55fb6..047a1d35 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ReplaceCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * @@ -43,7 +43,7 @@ public interface ReplaceCatalogAttributeRequestOrBuilder * *
        * Required. Full AttributesConfig resource name. Format:
    -   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig
    +   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
        * 
    * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java index 71e44ecb..5108a408 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java @@ -1255,10 +1255,13 @@ public interface FilterActionOrBuilder * *
        * * Rule Condition:
    -   *   - No [Condition][query_terms] provided is a global match.
    -   *   - 1 or more [Condition][query_terms] provided is combined with OR
    -   *   operator.
    -   * * Action Input: The request query and filter that will be applied to the
    +   *   - No
    +   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
    +   *   provided is a global match.
    +   *   - 1 or more
    +   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
    +   *   provided are combined with OR operator.
    +   * * Action Input: The request query and filter that are applied to the
        * retrieved products, in addition to any filters already provided with the
        * SearchRequest. The AND operator is used to combine the query's existing
        * filters with the filter rule(s). NOTE: May result in 0 results when
    @@ -1595,10 +1598,13 @@ protected Builder newBuilderForType(
          *
          * 
          * * Rule Condition:
    -     *   - No [Condition][query_terms] provided is a global match.
    -     *   - 1 or more [Condition][query_terms] provided is combined with OR
    -     *   operator.
    -     * * Action Input: The request query and filter that will be applied to the
    +     *   - No
    +     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
    +     *   provided is a global match.
    +     *   - 1 or more
    +     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]
    +     *   provided are combined with OR operator.
    +     * * Action Input: The request query and filter that are applied to the
          * retrieved products, in addition to any filters already provided with the
          * SearchRequest. The AND operator is used to combine the query's existing
          * filters with the filter rule(s). NOTE: May result in 0 results when
    @@ -2021,7 +2027,8 @@ public interface RedirectActionOrBuilder
        * 
        * Redirects a shopper to a specific page.
        * * Rule Condition:
    -   *   - Must specify [Condition][query_terms].
    +   *   - Must specify
    +   *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms].
        * * Action Input: Request Query
        * * Action Result: Redirects shopper to provided uri.
        * 
    @@ -2329,7 +2336,8 @@ protected Builder newBuilderForType( *
          * Redirects a shopper to a specific page.
          * * Rule Condition:
    -     *   - Must specify [Condition][query_terms].
    +     *   - Must specify
    +     *   [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms].
          * * Action Input: Request Query
          * * Action Result: Redirects shopper to provided uri.
          * 
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java index 90c55c2d..7c955a31 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java @@ -276,6 +276,37 @@ private SearchRequest( personalizationSpec_ = subBuilder.buildPartial(); } + break; + } + case 274: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 282: + { + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder subBuilder = + null; + if (((bitField0_ & 0x00000001) != 0)) { + subBuilder = spellCorrectionSpec_.toBuilder(); + } + spellCorrectionSpec_ = + input.readMessage( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(spellCorrectionSpec_); + spellCorrectionSpec_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; break; } default: @@ -313,6 +344,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 34: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -368,7 +410,9 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { *
          * Only faceted search will be performed. The product search will be
          * disabled.
    -     * When in this mode, one or both of [SearchRequest.facet_spec][] and
    +     * When in this mode, one or both of
    +     * [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs]
    +     * and
          * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
          * should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
          * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
    @@ -416,7 +460,9 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum {
          * 
          * Only faceted search will be performed. The product search will be
          * disabled.
    -     * When in this mode, one or both of [SearchRequest.facet_spec][] and
    +     * When in this mode, one or both of
    +     * [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs]
    +     * and
          * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
          * should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
          * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
    @@ -580,14 +626,22 @@ public interface FacetSpecOrBuilder
          * By default,
          * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
          * is not excluded from the filter unless it is listed in this field.
    -     * For example, suppose there are 100 products with color facet "Red" and
    -     * 200 products with color facet "Blue". A query containing the filter
    -     * "colorFamilies:ANY("Red")" and have "colorFamilies" as
    +     * Listing a facet key in this field allows its values to appear as facet
    +     * results, even when they are filtered out of search results. Using this
    +     * field does not affect what search results are returned.
    +     * For example, suppose there are 100 products with the color facet "Red"
    +     * and 200 products with the color facet "Blue". A query containing the
    +     * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as
          * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    -     * will by default return the "Red" with count 100.
    -     * If this field contains "colorFamilies", then the query returns both the
    -     * "Red" with count 100 and "Blue" with count 200, because the
    -     * "colorFamilies" key is now excluded from the filter.
    +     * would by default return only "Red" products in the search results, and
    +     * also return "Red" with count 100 as the only color facet. Although there
    +     * are also blue products available, "Blue" would not be shown as an
    +     * available facet value.
    +     * If "colorFamilies" is listed in "excludedFilterKeys", then the query
    +     * returns the facet values "Red" with count 100 and "Blue" with count
    +     * 200, because the "colorFamilies" key is now excluded from the filter.
    +     * Because this field doesn't affect search results, the search results
    +     * are still correctly filtered to return only "Red" products.
          * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
          * is returned.
          * 
    @@ -605,14 +659,22 @@ public interface FacetSpecOrBuilder * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -630,14 +692,22 @@ public interface FacetSpecOrBuilder * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -656,14 +726,22 @@ public interface FacetSpecOrBuilder * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -1012,8 +1090,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1038,8 +1116,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1064,8 +1142,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1091,8 +1169,8 @@ public interface FacetKeyOrBuilder * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1250,11 +1328,29 @@ public interface FacetKeyOrBuilder * * *
    -       * The order in which [Facet.values][] are returned.
    +       * True to make facet keys case insensitive when getting faceting
    +       * values with prefixes or contains; false otherwise.
    +       * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + boolean getCaseInsensitive(); + + /** + * + * + *
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -1275,11 +1371,15 @@ public interface FacetKeyOrBuilder
            *
            *
            * 
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -1309,9 +1409,11 @@ public interface FacetKeyOrBuilder
            * on
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -1339,9 +1441,11 @@ public interface FacetKeyOrBuilder
            * on
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -1357,6 +1461,20 @@ public interface FacetKeyOrBuilder
            * @return The bytes for query.
            */
           com.google.protobuf.ByteString getQueryBytes();
    +
    +      /**
    +       *
    +       *
    +       * 
    +       * Returns the min and max value for each numerical facet intervals.
    +       * Ignored for textual facets.
    +       * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + boolean getReturnMinMax(); } /** * @@ -1479,6 +1597,16 @@ private FacetKey( contains_.add(s); break; } + case 80: + { + caseInsensitive_ = input.readBool(); + break; + } + case 88: + { + returnMinMax_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -1739,8 +1867,8 @@ public com.google.cloud.retail.v2beta.IntervalOrBuilder getIntervalsOrBuilder(in * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1767,8 +1895,8 @@ public com.google.protobuf.ProtocolStringList getRestrictedValuesList() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1795,8 +1923,8 @@ public int getRestrictedValuesCount() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -1824,8 +1952,8 @@ public java.lang.String getRestrictedValues(int index) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -2001,17 +2129,40 @@ public com.google.protobuf.ByteString getContainsBytes(int index) { return contains_.getByteString(index); } + public static final int CASE_INSENSITIVE_FIELD_NUMBER = 10; + private boolean caseInsensitive_; + /** + * + * + *
    +       * True to make facet keys case insensitive when getting faceting
    +       * values with prefixes or contains; false otherwise.
    +       * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + public static final int ORDER_BY_FIELD_NUMBER = 4; private volatile java.lang.Object orderBy_; /** * * *
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -2043,11 +2194,15 @@ public java.lang.String getOrderBy() {
            *
            *
            * 
    -       * The order in which [Facet.values][] are returned.
    +       * The order in which
    +       * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +       * are returned.
            * Allowed values are:
    -       * * "count desc", which means order by [Facet.FacetValue.count][]
    +       * * "count desc", which means order by
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
            * descending.
    -       * * "value desc", which means order by [Facet.FacetValue.value][]
    +       * * "value desc", which means order by
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
            * descending.
            *   Only applies to textual facets.
            * If not set, textual values are sorted in [natural
    @@ -2090,9 +2245,11 @@ public com.google.protobuf.ByteString getOrderByBytes() {
            * on
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -2131,9 +2288,11 @@ public java.lang.String getQuery() {
            * on
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
            * when query is specified.
    -       * In the response, [FacetValue.value][] will be always "1" and
    -       * [FacetValue.count][] will be the number of results that matches the
    -       * query.
    +       * In the response,
    +       * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +       * will be always "1" and
    +       * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +       * will be the number of results that match the query.
            * For example, you can set a customized facet for "shipToStore",
            * where
            * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -2161,6 +2320,25 @@ public com.google.protobuf.ByteString getQueryBytes() {
             }
           }
     
    +      public static final int RETURN_MIN_MAX_FIELD_NUMBER = 11;
    +      private boolean returnMinMax_;
    +      /**
    +       *
    +       *
    +       * 
    +       * Returns the min and max value for each numerical facet intervals.
    +       * Ignored for textual facets.
    +       * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + @java.lang.Override + public boolean getReturnMinMax() { + return returnMinMax_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2197,6 +2375,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < contains_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, contains_.getRaw(i)); } + if (caseInsensitive_ != false) { + output.writeBool(10, caseInsensitive_); + } + if (returnMinMax_ != false) { + output.writeBool(11, returnMinMax_); + } unknownFields.writeTo(output); } @@ -2242,6 +2426,12 @@ public int getSerializedSize() { size += dataSize; size += 1 * getContainsList().size(); } + if (caseInsensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, caseInsensitive_); + } + if (returnMinMax_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnMinMax_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2263,8 +2453,10 @@ public boolean equals(final java.lang.Object obj) { if (!getRestrictedValuesList().equals(other.getRestrictedValuesList())) return false; if (!getPrefixesList().equals(other.getPrefixesList())) return false; if (!getContainsList().equals(other.getContainsList())) return false; + if (getCaseInsensitive() != other.getCaseInsensitive()) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getQuery().equals(other.getQuery())) return false; + if (getReturnMinMax() != other.getReturnMinMax()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2294,10 +2486,14 @@ public int hashCode() { hash = (37 * hash) + CONTAINS_FIELD_NUMBER; hash = (53 * hash) + getContainsList().hashCode(); } + hash = (37 * hash) + CASE_INSENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseInsensitive()); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + RETURN_MIN_MAX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnMinMax()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2465,10 +2661,14 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); contains_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); + caseInsensitive_ = false; + orderBy_ = ""; query_ = ""; + returnMinMax_ = false; + return this; } @@ -2524,8 +2724,10 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey buildPart bitField0_ = (bitField0_ & ~0x00000008); } result.contains_ = contains_; + result.caseInsensitive_ = caseInsensitive_; result.orderBy_ = orderBy_; result.query_ = query_; + result.returnMinMax_ = returnMinMax_; onBuilt(); return result; } @@ -2642,6 +2844,9 @@ public Builder mergeFrom( } onChanged(); } + if (other.getCaseInsensitive() != false) { + setCaseInsensitive(other.getCaseInsensitive()); + } if (!other.getOrderBy().isEmpty()) { orderBy_ = other.orderBy_; onChanged(); @@ -2650,6 +2855,9 @@ public Builder mergeFrom( query_ = other.query_; onChanged(); } + if (other.getReturnMinMax() != false) { + setReturnMinMax(other.getReturnMinMax()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3380,8 +3588,8 @@ private void ensureRestrictedValuesIsMutable() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3408,8 +3616,8 @@ public com.google.protobuf.ProtocolStringList getRestrictedValuesList() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3436,8 +3644,8 @@ public int getRestrictedValuesCount() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3465,8 +3673,8 @@ public java.lang.String getRestrictedValues(int index) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3494,8 +3702,8 @@ public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3530,8 +3738,8 @@ public Builder setRestrictedValues(int index, java.lang.String value) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3565,8 +3773,8 @@ public Builder addRestrictedValues(java.lang.String value) { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3597,8 +3805,8 @@ public Builder addAllRestrictedValues(java.lang.Iterable value * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -3628,8 +3836,8 @@ public Builder clearRestrictedValues() { * Only get facet for the given restricted values. For example, when using * "pickupInStore" as key and set restricted values to * ["store123", "store456"], only facets for "store123" and "store456" are - * returned. Only supported on textual fields and fulfillments. - * Maximum is 20. + * returned. Only supported on predefined textual fields, custom textual + * attributes and fulfillments. Maximum is 20. * Must be set for the fulfillment facet keys: * * pickupInStore * * shipToStore @@ -4066,16 +4274,75 @@ public Builder addContainsBytes(com.google.protobuf.ByteString value) { return this; } + private boolean caseInsensitive_; + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @param value The caseInsensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseInsensitive(boolean value) { + + caseInsensitive_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * True to make facet keys case insensitive when getting faceting
    +         * values with prefixes or contains; false otherwise.
    +         * 
    + * + * bool case_insensitive = 10; + * + * @return This builder for chaining. + */ + public Builder clearCaseInsensitive() { + + caseInsensitive_ = false; + onChanged(); + return this; + } + private java.lang.Object orderBy_ = ""; /** * * *
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4106,11 +4373,15 @@ public java.lang.String getOrderBy() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4141,11 +4412,15 @@ public com.google.protobuf.ByteString getOrderByBytes() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4175,11 +4450,15 @@ public Builder setOrderBy(java.lang.String value) {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4205,11 +4484,15 @@ public Builder clearOrderBy() {
              *
              *
              * 
    -         * The order in which [Facet.values][] are returned.
    +         * The order in which
    +         * [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values]
    +         * are returned.
              * Allowed values are:
    -         * * "count desc", which means order by [Facet.FacetValue.count][]
    +         * * "count desc", which means order by
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
              * descending.
    -         * * "value desc", which means order by [Facet.FacetValue.value][]
    +         * * "value desc", which means order by
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
              * descending.
              *   Only applies to textual facets.
              * If not set, textual values are sorted in [natural
    @@ -4250,9 +4533,11 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
              * on
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4290,9 +4575,11 @@ public java.lang.String getQuery() {
              * on
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4330,9 +4617,11 @@ public com.google.protobuf.ByteString getQueryBytes() {
              * on
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4369,9 +4658,11 @@ public Builder setQuery(java.lang.String value) {
              * on
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4404,9 +4695,11 @@ public Builder clearQuery() {
              * on
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
              * when query is specified.
    -         * In the response, [FacetValue.value][] will be always "1" and
    -         * [FacetValue.count][] will be the number of results that matches the
    -         * query.
    +         * In the response,
    +         * [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value]
    +         * will be always "1" and
    +         * [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count]
    +         * will be the number of results that match the query.
              * For example, you can set a customized facet for "shipToStore",
              * where
              * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key]
    @@ -4433,6 +4726,61 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
               return this;
             }
     
    +        private boolean returnMinMax_;
    +        /**
    +         *
    +         *
    +         * 
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @return The returnMinMax. + */ + @java.lang.Override + public boolean getReturnMinMax() { + return returnMinMax_; + } + /** + * + * + *
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @param value The returnMinMax to set. + * @return This builder for chaining. + */ + public Builder setReturnMinMax(boolean value) { + + returnMinMax_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * Returns the min and max value for each numerical facet intervals.
    +         * Ignored for textual facets.
    +         * 
    + * + * bool return_min_max = 11; + * + * @return This builder for chaining. + */ + public Builder clearReturnMinMax() { + + returnMinMax_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4574,14 +4922,22 @@ public int getLimit() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -4601,14 +4957,22 @@ public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -4628,14 +4992,22 @@ public int getExcludedFilterKeysCount() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -4656,14 +5028,22 @@ public java.lang.String getExcludedFilterKeys(int index) { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5405,14 +5785,22 @@ private void ensureExcludedFilterKeysIsMutable() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5432,14 +5820,22 @@ public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5459,14 +5855,22 @@ public int getExcludedFilterKeysCount() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5487,14 +5891,22 @@ public java.lang.String getExcludedFilterKeys(int index) { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5515,14 +5927,22 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. *
    @@ -5550,14 +5970,22 @@ public Builder setExcludedFilterKeys(int index, java.lang.String value) { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -5584,14 +6012,22 @@ public Builder addExcludedFilterKeys(java.lang.String value) { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -5615,14 +6051,22 @@ public Builder addAllExcludedFilterKeys(java.lang.Iterable val * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -5645,14 +6089,22 @@ public Builder clearExcludedFilterKeys() { * By default, * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] * is not excluded from the filter unless it is listed in this field. - * For example, suppose there are 100 products with color facet "Red" and - * 200 products with color facet "Blue". A query containing the filter - * "colorFamilies:ANY("Red")" and have "colorFamilies" as + * Listing a facet key in this field allows its values to appear as facet + * results, even when they are filtered out of search results. Using this + * field does not affect what search results are returned. + * For example, suppose there are 100 products with the color facet "Red" + * and 200 products with the color facet "Blue". A query containing the + * filter "colorFamilies:ANY("Red")" and having "colorFamilies" as * [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - * will by default return the "Red" with count 100. - * If this field contains "colorFamilies", then the query returns both the - * "Red" with count 100 and "Blue" with count 200, because the - * "colorFamilies" key is now excluded from the filter. + * would by default return only "Red" products in the search results, and + * also return "Red" with count 100 as the only color facet. Although there + * are also blue products available, "Blue" would not be shown as an + * available facet value. + * If "colorFamilies" is listed in "excludedFilterKeys", then the query + * returns the facet values "Red" with count 100 and "Blue" with count + * 200, because the "colorFamilies" key is now excluded from the filter. + * Because this field doesn't affect search results, the search results + * are still correctly filtered to return only "Red" products. * A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error * is returned. * @@ -6680,7 +7132,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6696,7 +7148,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6712,7 +7164,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6727,7 +7179,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -6745,7 +7197,7 @@ public interface BoostSpecOrBuilder * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -7849,7 +8301,7 @@ public com.google.protobuf.Parser getParserForType() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -7868,7 +8320,7 @@ public com.google.protobuf.Parser getParserForType() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -7889,7 +8341,7 @@ public com.google.protobuf.Parser getParserForType() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -7907,7 +8359,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -7926,7 +8378,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8401,7 +8853,7 @@ private void ensureConditionBoostSpecsIsMutable() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8424,7 +8876,7 @@ private void ensureConditionBoostSpecsIsMutable() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8445,7 +8897,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8467,7 +8919,7 @@ public int getConditionBoostSpecsCount() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8496,7 +8948,7 @@ public Builder setConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8523,7 +8975,7 @@ public Builder setConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8551,7 +9003,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8580,7 +9032,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8606,7 +9058,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8633,7 +9085,7 @@ public Builder addConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8661,7 +9113,7 @@ public Builder addAllConditionBoostSpecs( * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8685,7 +9137,7 @@ public Builder clearConditionBoostSpecs() { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8709,7 +9161,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8727,7 +9179,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8749,7 +9201,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8774,7 +9226,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8795,7 +9247,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -8817,7 +9269,7 @@ public Builder removeConditionBoostSpecs(int index) { * Condition boost specifications. If a product matches multiple conditions * in the specifictions, boost scores from these specifications are all * applied and combined in a non-linear way. Maximum number of - * specifications is 10. + * specifications is 20. * * * @@ -10079,7 +10531,7 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Default value. Defaults to
    +       * Default value. In this case, server behavior defaults to
            * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            * 
    * @@ -10113,7 +10565,7 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
    -       * Default value. Defaults to
    +       * Default value. In this case, server behavior defaults to
            * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            * 
    * @@ -10754,103 +11206,943 @@ public com.google.protobuf.Parser getParserForType() { } } - public static final int PLACEMENT_FIELD_NUMBER = 1; - private volatile java.lang.Object placement_; - /** - * - * - *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    -   * This field is used to identify the serving configuration name and the set
    -   * of models that will be used to make the search.
    -   * 
    - * - * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The placement. - */ - @java.lang.Override - public java.lang.String getPlacement() { - java.lang.Object ref = placement_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - placement_ = s; - return s; - } + public interface SpellCorrectionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The mode. + */ + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode getMode(); } /** * * *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    -   * This field is used to identify the serving configuration name and the set
    -   * of models that will be used to make the search.
    +   * The specification for query spell correction.
        * 
    * - * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for placement. + * Protobuf type {@code google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec} */ - @java.lang.Override - public com.google.protobuf.ByteString getPlacementBytes() { - java.lang.Object ref = placement_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - placement_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class SpellCorrectionSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) + SpellCorrectionSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpellCorrectionSpec.newBuilder() to construct. + private SpellCorrectionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int BRANCH_FIELD_NUMBER = 2; - private volatile java.lang.Object branch_; - /** - * - * - *
    -   * The branch resource name, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    -   * Use "default_branch" as the branch ID or leave this field empty, to search
    -   * products under the default branch.
    -   * 
    - * - * string branch = 2 [(.google.api.resource_reference) = { ... } - * - * @return The branch. - */ - @java.lang.Override - public java.lang.String getBranch() { - java.lang.Object ref = branch_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - branch_ = s; - return s; + private SpellCorrectionSpec() { + mode_ = 0; } - } - /** - * - * - *
    -   * The branch resource name, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    -   * Use "default_branch" as the branch ID or leave this field empty, to search
    -   * products under the default branch.
    -   * 
    - * - * string branch = 2 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for branch. - */ + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpellCorrectionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SpellCorrectionSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + mode_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.SearchServiceProto + .internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.SearchServiceProto + .internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.class, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder.class); + } + + /** + * + * + *
    +     * Enum describing under which mode spell correction should occur.
    +     * 
    + * + * Protobuf enum {@code google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +       * Unspecified spell correction mode. In this case, server behavior
    +       * defaults to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
    +       * Google Retail Search will try to find a spell suggestion if there
    +       * is any and put in the
    +       * [SearchResponse.corrected_query][google.cloud.retail.v2beta.SearchResponse.corrected_query].
    +       * The spell suggestion will not be used as the search query.
    +       * 
    + * + * SUGGESTION_ONLY = 1; + */ + SUGGESTION_ONLY(1), + /** + * + * + *
    +       * Automatic spell correction built by Google Retail Search. Search will
    +       * be based on the corrected query if found.
    +       * 
    + * + * AUTO = 2; + */ + AUTO(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +       * Unspecified spell correction mode. In this case, server behavior
    +       * defaults to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +       * Google Retail Search will try to find a spell suggestion if there
    +       * is any and put in the
    +       * [SearchResponse.corrected_query][google.cloud.retail.v2beta.SearchResponse.corrected_query].
    +       * The spell suggestion will not be used as the search query.
    +       * 
    + * + * SUGGESTION_ONLY = 1; + */ + public static final int SUGGESTION_ONLY_VALUE = 1; + /** + * + * + *
    +       * Automatic spell correction built by Google Retail Search. Search will
    +       * be based on the corrected query if found.
    +       * 
    + * + * AUTO = 2; + */ + public static final int AUTO_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return SUGGESTION_ONLY; + case 2: + return AUTO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_; + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
    +     * The mode under which spell correction should take effect to
    +     * replace the original search query. Default to
    +     * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +     * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode result = + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.valueOf(mode_); + return result == null + ? com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mode_ + != com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec other = + (com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) obj; + + if (mode_ != other.mode_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +     * The specification for query spell correction.
    +     * 
    + * + * Protobuf type {@code google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.SearchServiceProto + .internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.SearchServiceProto + .internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.class, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.SearchServiceProto + .internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec build() { + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec buildPartial() { + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec result = + new com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec(this); + result.mode_ = mode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) { + return mergeFrom( + (com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec other) { + if (other + == com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int mode_ = 0; + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode result = + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.valueOf(mode_); + return result == null + ? com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.UNRECOGNIZED + : result; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +       * The mode under which spell correction should take effect to
    +       * replace the original search query. Default to
    +       * [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
    +       * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) + private static final com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec(); + } + + public static com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpellCorrectionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SpellCorrectionSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PLACEMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object placement_; + /** + * + * + *
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
    +   * This field is used to identify the serving configuration name and the set
    +   * of models that will be used to make the search.
    +   * 
    + * + * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The placement. + */ + @java.lang.Override + public java.lang.String getPlacement() { + java.lang.Object ref = placement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + placement_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
    +   * This field is used to identify the serving configuration name and the set
    +   * of models that will be used to make the search.
    +   * 
    + * + * string placement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for placement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlacementBytes() { + java.lang.Object ref = placement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + placement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCH_FIELD_NUMBER = 2; + private volatile java.lang.Object branch_; + /** + * + * + *
    +   * The branch resource name, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    +   * Use "default_branch" as the branch ID or leave this field empty, to search
    +   * products under the default branch.
    +   * 
    + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + @java.lang.Override + public java.lang.String getBranch() { + java.lang.Object ref = branch_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + branch_ = s; + return s; + } + } + /** + * + * + *
    +   * The branch resource name, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/branches/0`.
    +   * Use "default_branch" as the branch ID or leave this field empty, to search
    +   * products under the default branch.
    +   * 
    + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ @java.lang.Override public com.google.protobuf.ByteString getBranchBytes() { java.lang.Object ref = branch_; @@ -10871,6 +12163,10 @@ public com.google.protobuf.ByteString getBranchBytes() { * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -10894,6 +12190,10 @@ public java.lang.String getQuery() { * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -11414,7 +12714,7 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpecOrBuilder getFacetS *
    * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=513 + * google/cloud/retail/v2beta/search_service.proto;l=576 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Override @@ -11437,7 +12737,7 @@ public boolean hasDynamicFacetSpec() { *
    * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=513 + * google/cloud/retail/v2beta/search_service.proto;l=576 * @return The dynamicFacetSpec. */ @java.lang.Override @@ -11478,10 +12778,11 @@ public com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec getDynamicF * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -11500,10 +12801,11 @@ public boolean hasBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -11524,10 +12826,11 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpec getBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -11625,7 +12928,8 @@ public com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec getQueryE * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -11703,7 +13007,8 @@ public com.google.protobuf.ProtocolStringList getVariantRollupKeysList() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -11781,7 +13086,8 @@ public int getVariantRollupKeysCount() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -11860,7 +13166,8 @@ public java.lang.String getVariantRollupKeys(int index) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -12058,47 +13365,261 @@ public com.google.cloud.retail.v2beta.SearchRequest.SearchMode getSearchMode() { * The specification for personalization. * * - * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * + * @return Whether the personalizationSpec field is set. + */ + @java.lang.Override + public boolean hasPersonalizationSpec() { + return personalizationSpec_ != null; + } + /** + * + * + *
    +   * The specification for personalization.
    +   * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * + * @return The personalizationSpec. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec getPersonalizationSpec() { + return personalizationSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.getDefaultInstance() + : personalizationSpec_; + } + /** + * + * + *
    +   * The specification for personalization.
    +   * 
    + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder() { + return getPersonalizationSpec(); + } + + public static final int LABELS_FIELD_NUMBER = 34; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.retail.v2beta.SearchServiceProto + .internal_static_google_cloud_retail_v2beta_SearchRequest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SPELL_CORRECTION_SPEC_FIELD_NUMBER = 35; + private com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spellCorrectionSpec_; + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; * * - * @return Whether the personalizationSpec field is set. + * @return Whether the spellCorrectionSpec field is set. */ @java.lang.Override - public boolean hasPersonalizationSpec() { - return personalizationSpec_ != null; + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
    -   * The specification for personalization.
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
        * 
    * - * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; * * - * @return The personalizationSpec. + * @return The spellCorrectionSpec. */ @java.lang.Override - public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec getPersonalizationSpec() { - return personalizationSpec_ == null - ? com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.getDefaultInstance() - : personalizationSpec_; + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec getSpellCorrectionSpec() { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; } /** * * *
    -   * The specification for personalization.
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
        * 
    * - * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; * */ @java.lang.Override - public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder - getPersonalizationSpecOrBuilder() { - return getPersonalizationSpec(); + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; } private byte memoizedIsInitialized = -1; @@ -12174,6 +13695,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (personalizationSpec_ != null) { output.writeMessage(32, getPersonalizationSpec()); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 34); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(35, getSpellCorrectionSpec()); + } unknownFields.writeTo(output); } @@ -12253,6 +13779,20 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getPersonalizationSpec()); } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, labels__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(35, getSpellCorrectionSpec()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -12303,6 +13843,11 @@ public boolean equals(final java.lang.Object obj) { if (hasPersonalizationSpec()) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasSpellCorrectionSpec() != other.hasSpellCorrectionSpec()) return false; + if (hasSpellCorrectionSpec()) { + if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -12368,6 +13913,14 @@ public int hashCode() { hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSpec().hashCode(); } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasSpellCorrectionSpec()) { + hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -12488,6 +14041,26 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 34: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 34: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -12511,6 +14084,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getFacetSpecsFieldBuilder(); + getSpellCorrectionSpecFieldBuilder(); } } @@ -12579,6 +14153,13 @@ public Builder clear() { personalizationSpec_ = null; personalizationSpecBuilder_ = null; } + internalGetMutableLabels().clear(); + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = null; + } else { + spellCorrectionSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -12607,6 +14188,7 @@ public com.google.cloud.retail.v2beta.SearchRequest buildPartial() { com.google.cloud.retail.v2beta.SearchRequest result = new com.google.cloud.retail.v2beta.SearchRequest(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.placement_ = placement_; result.branch_ = branch_; result.query_ = query_; @@ -12662,6 +14244,17 @@ public com.google.cloud.retail.v2beta.SearchRequest buildPartial() { } else { result.personalizationSpec_ = personalizationSpecBuilder_.build(); } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (((from_bitField0_ & 0x00000010) != 0)) { + if (spellCorrectionSpecBuilder_ == null) { + result.spellCorrectionSpec_ = spellCorrectionSpec_; + } else { + result.spellCorrectionSpec_ = spellCorrectionSpecBuilder_.build(); + } + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -12814,6 +14407,10 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchRequest other) { if (other.hasPersonalizationSpec()) { mergePersonalizationSpec(other.getPersonalizationSpec()); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasSpellCorrectionSpec()) { + mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -12850,8 +14447,10 @@ public Builder mergeFrom( * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -12875,8 +14474,10 @@ public java.lang.String getPlacement() { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -12900,8 +14501,10 @@ public com.google.protobuf.ByteString getPlacementBytes() { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -12924,8 +14527,10 @@ public Builder setPlacement(java.lang.String value) { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -12944,8 +14549,10 @@ public Builder clearPlacement() { * * *
    -     * Required. The resource name of the search engine placement, such as
    -     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +     * Required. The resource name of the Retail Search serving config, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +     * or the name of the legacy placement resource, such as
    +     * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
          * This field is used to identify the serving configuration name and the set
          * of models that will be used to make the search.
          * 
    @@ -13093,6 +14700,10 @@ public Builder setBranchBytes(com.google.protobuf.ByteString value) { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13115,6 +14726,10 @@ public java.lang.String getQuery() { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13137,6 +14752,10 @@ public com.google.protobuf.ByteString getQueryBytes() { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13158,6 +14777,10 @@ public Builder setQuery(java.lang.String value) { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -13175,6 +14798,10 @@ public Builder clearQuery() { * *
          * Raw search query.
    +     * If this field is empty, the request is considered a category browsing
    +     * request and returned results are based on
    +     * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +     * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
          * 
    * * string query = 3; @@ -14618,7 +16245,7 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.Builder addFacetSp *
    * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=513 + * google/cloud/retail/v2beta/search_service.proto;l=576 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -14640,7 +16267,7 @@ public boolean hasDynamicFacetSpec() { *
    * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=513 + * google/cloud/retail/v2beta/search_service.proto;l=576 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -14859,10 +16486,11 @@ public Builder clearDynamicFacetSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -14880,10 +16508,11 @@ public boolean hasBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -14907,10 +16536,11 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpec getBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -14936,10 +16566,11 @@ public Builder setBoostSpec(com.google.cloud.retail.v2beta.SearchRequest.BoostSp * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -14963,10 +16594,11 @@ public Builder setBoostSpec( * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -14996,10 +16628,11 @@ public Builder mergeBoostSpec(com.google.cloud.retail.v2beta.SearchRequest.Boost * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -15023,10 +16656,11 @@ public Builder clearBoostSpec() { * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -15044,10 +16678,11 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.Builder getBoostSp * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -15069,10 +16704,11 @@ public com.google.cloud.retail.v2beta.SearchRequest.BoostSpecOrBuilder getBoostS * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -15349,7 +16985,8 @@ private void ensureVariantRollupKeysIsMutable() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15427,7 +17064,8 @@ public com.google.protobuf.ProtocolStringList getVariantRollupKeysList() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15505,7 +17143,8 @@ public int getVariantRollupKeysCount() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15584,7 +17223,8 @@ public java.lang.String getVariantRollupKeys(int index) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15663,7 +17303,8 @@ public com.google.protobuf.ByteString getVariantRollupKeysBytes(int index) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15749,7 +17390,8 @@ public Builder setVariantRollupKeys(int index, java.lang.String value) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15834,7 +17476,8 @@ public Builder addVariantRollupKeys(java.lang.String value) { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15916,7 +17559,8 @@ public Builder addAllVariantRollupKeys(java.lang.Iterable valu * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -15997,7 +17641,8 @@ public Builder clearVariantRollupKeys() { * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -16613,6 +18258,484 @@ public Builder clearPersonalizationSpec() { return personalizationSpecBuilder_; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
    +     * The labels applied to a resource must meet the following requirements:
    +     * * Each resource can have multiple labels, up to a maximum of 64.
    +     * * Each label must be a key-value pair.
    +     * * Keys have a minimum length of 1 character and a maximum length of 63
    +     *   characters and cannot be empty. Values can be empty and have a maximum
    +     *   length of 63 characters.
    +     * * Keys and values can contain only lowercase letters, numeric characters,
    +     *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +     *   international characters are allowed.
    +     * * The key portion of a label must be unique. However, you can use the same
    +     *   key with multiple resources.
    +     * * Keys must start with a lowercase letter or international character.
    +     * See [Google Cloud
    +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +     * for more details.
    +     * 
    + * + * map<string, string> labels = 34; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spellCorrectionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder> + spellCorrectionSpecBuilder_; + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return The spellCorrectionSpec. + */ + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + if (spellCorrectionSpecBuilder_ == null) { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; + } else { + return spellCorrectionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder setSpellCorrectionSpec( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spellCorrectionSpec_ = value; + onChanged(); + } else { + spellCorrectionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder setSpellCorrectionSpec( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder builderForValue) { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = builderForValue.build(); + onChanged(); + } else { + spellCorrectionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder mergeSpellCorrectionSpec( + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && spellCorrectionSpec_ != null + && spellCorrectionSpec_ + != com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) { + spellCorrectionSpec_ = + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.newBuilder( + spellCorrectionSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + spellCorrectionSpec_ = value; + } + onChanged(); + } else { + spellCorrectionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public Builder clearSpellCorrectionSpec() { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = null; + onChanged(); + } else { + spellCorrectionSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder + getSpellCorrectionSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSpellCorrectionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + public com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + if (spellCorrectionSpecBuilder_ != null) { + return spellCorrectionSpecBuilder_.getMessageOrBuilder(); + } else { + return spellCorrectionSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.getDefaultInstance() + : spellCorrectionSpec_; + } + } + /** + * + * + *
    +     * The spell correction specification that specifies the mode under
    +     * which spell correction will take effect.
    +     * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder> + getSpellCorrectionSpecFieldBuilder() { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder>( + getSpellCorrectionSpec(), getParentForChildren(), isClean()); + spellCorrectionSpec_ = null; + } + return spellCorrectionSpecBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java index 287ecb19..3b53a971 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java @@ -27,8 +27,10 @@ public interface SearchRequestOrBuilder * * *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
        * 
    @@ -42,8 +44,10 @@ public interface SearchRequestOrBuilder * * *
    -   * Required. The resource name of the search engine placement, such as
    -   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
    +   * Required. The resource name of the Retail Search serving config, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
    +   * or the name of the legacy placement resource, such as
    +   * `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
        * This field is used to identify the serving configuration name and the set
        * of models that will be used to make the search.
        * 
    @@ -90,6 +94,10 @@ public interface SearchRequestOrBuilder * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -102,6 +110,10 @@ public interface SearchRequestOrBuilder * *
        * Raw search query.
    +   * If this field is empty, the request is considered a category browsing
    +   * request and returned results are based on
    +   * [filter][google.cloud.retail.v2beta.SearchRequest.filter] and
    +   * [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories].
        * 
    * * string query = 3; @@ -447,7 +459,7 @@ public interface SearchRequestOrBuilder * * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=513 + * google/cloud/retail/v2beta/search_service.proto;l=576 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -467,7 +479,7 @@ public interface SearchRequestOrBuilder * * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=513 + * google/cloud/retail/v2beta/search_service.proto;l=576 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -498,10 +510,11 @@ public interface SearchRequestOrBuilder * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -517,10 +530,11 @@ public interface SearchRequestOrBuilder * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -536,10 +550,11 @@ public interface SearchRequestOrBuilder * [user guide](https://cloud.google.com/retail/docs/boosting). * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * * * .google.cloud.retail.v2beta.SearchRequest.BoostSpec boost_spec = 13; @@ -619,7 +634,8 @@ public interface SearchRequestOrBuilder * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -695,7 +711,8 @@ public interface SearchRequestOrBuilder * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -771,7 +788,8 @@ public interface SearchRequestOrBuilder * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -848,7 +866,8 @@ public interface SearchRequestOrBuilder * * inventory(place_id,price) * * inventory(place_id,original_price) * * inventory(place_id,attributes.key), where key is any key in the - * [Product.inventories.attributes][] map. + * [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + * map. * * attributes.key, where key is any key in the * [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. * * pickupInStore.id, where id is any @@ -1050,4 +1069,178 @@ public interface SearchRequestOrBuilder */ com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder getPersonalizationSpecOrBuilder(); + + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + int getLabelsCount(); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
    +   * The labels applied to a resource must meet the following requirements:
    +   * * Each resource can have multiple labels, up to a maximum of 64.
    +   * * Each label must be a key-value pair.
    +   * * Keys have a minimum length of 1 character and a maximum length of 63
    +   *   characters and cannot be empty. Values can be empty and have a maximum
    +   *   length of 63 characters.
    +   * * Keys and values can contain only lowercase letters, numeric characters,
    +   *   underscores, and dashes. All characters must use UTF-8 encoding, and
    +   *   international characters are allowed.
    +   * * The key portion of a label must be unique. However, you can use the same
    +   *   key with multiple resources.
    +   * * Keys must start with a lowercase letter or international character.
    +   * See [Google Cloud
    +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
    +   * for more details.
    +   * 
    + * + * map<string, string> labels = 34; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + boolean hasSpellCorrectionSpec(); + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + * + * @return The spellCorrectionSpec. + */ + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec getSpellCorrectionSpec(); + /** + * + * + *
    +   * The spell correction specification that specifies the mode under
    +   * which spell correction will take effect.
    +   * 
    + * + * + * optional .google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 35; + * + */ + com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java index e522c7de..c3b555c5 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java @@ -3191,6 +3191,40 @@ public interface FacetValueOrBuilder */ long getCount(); + /** + * + * + *
    +       * The minimum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + double getMinValue(); + + /** + * + * + *
    +       * The maximum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + double getMaxValue(); + public com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.FacetValueCase getFacetValueCase(); } @@ -3273,6 +3307,16 @@ private FacetValue( count_ = input.readInt64(); break; } + case 41: + { + minValue_ = input.readDouble(); + break; + } + case 49: + { + maxValue_ = input.readDouble(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -3496,6 +3540,50 @@ public long getCount() { return count_; } + public static final int MIN_VALUE_FIELD_NUMBER = 5; + private double minValue_; + /** + * + * + *
    +       * The minimum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 6; + private double maxValue_; + /** + * + * + *
    +       * The maximum value in the
    +       * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +       * Only supported on numerical facets and returned if
    +       * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +       * is true.
    +       * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3519,6 +3607,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (count_ != 0L) { output.writeInt64(3, count_); } + if (java.lang.Double.doubleToRawLongBits(minValue_) != 0) { + output.writeDouble(5, minValue_); + } + if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { + output.writeDouble(6, maxValue_); + } unknownFields.writeTo(output); } @@ -3539,6 +3633,12 @@ public int getSerializedSize() { if (count_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); } + if (java.lang.Double.doubleToRawLongBits(minValue_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, minValue_); + } + if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, maxValue_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3556,6 +3656,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue) obj; if (getCount() != other.getCount()) return false; + if (java.lang.Double.doubleToLongBits(getMinValue()) + != java.lang.Double.doubleToLongBits(other.getMinValue())) return false; + if (java.lang.Double.doubleToLongBits(getMaxValue()) + != java.lang.Double.doubleToLongBits(other.getMaxValue())) return false; if (!getFacetValueCase().equals(other.getFacetValueCase())) return false; switch (facetValueCase_) { case 1: @@ -3580,6 +3684,16 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinValue())); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxValue())); switch (facetValueCase_) { case 1: hash = (37 * hash) + VALUE_FIELD_NUMBER; @@ -3745,6 +3859,10 @@ public Builder clear() { super.clear(); count_ = 0L; + minValue_ = 0D; + + maxValue_ = 0D; + facetValueCase_ = 0; facetValue_ = null; return this; @@ -3787,6 +3905,8 @@ public com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue buildParti } } result.count_ = count_; + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; result.facetValueCase_ = facetValueCase_; onBuilt(); return result; @@ -3846,6 +3966,12 @@ public Builder mergeFrom( if (other.getCount() != 0L) { setCount(other.getCount()); } + if (other.getMinValue() != 0D) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != 0D) { + setMaxValue(other.getMaxValue()); + } switch (other.getFacetValueCase()) { case VALUE: { @@ -4305,6 +4431,134 @@ public Builder clearCount() { return this; } + private double minValue_; + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @return The minValue. + */ + @java.lang.Override + public double getMinValue() { + return minValue_; + } + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(double value) { + + minValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * The minimum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double min_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = 0D; + onChanged(); + return this; + } + + private double maxValue_; + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @return The maxValue. + */ + @java.lang.Override + public double getMaxValue() { + return maxValue_; + } + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(double value) { + + maxValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +         * The maximum value in the
    +         * [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval].
    +         * Only supported on numerical facets and returned if
    +         * [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max]
    +         * is true.
    +         * 
    + * + * double max_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = 0D; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -6354,7 +6608,9 @@ public int getTotalSize() { * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -6377,7 +6633,9 @@ public java.lang.String getCorrectedQuery() { * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -6564,10 +6822,10 @@ public com.google.cloud.retail.v2beta.SearchResponse.QueryExpansionInfo getQuery * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; @@ -6591,10 +6849,10 @@ public java.lang.String getRedirectUri() { * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; @@ -8173,7 +8431,9 @@ public Builder clearTotalSize() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8195,7 +8455,9 @@ public java.lang.String getCorrectedQuery() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8217,7 +8479,9 @@ public com.google.protobuf.ByteString getCorrectedQueryBytes() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8238,7 +8502,9 @@ public Builder setCorrectedQuery(java.lang.String value) { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8255,7 +8521,9 @@ public Builder clearCorrectedQuery() { * * *
    -     * If spell correction applies, the corrected query. Otherwise, empty.
    +     * Contains the spell corrected query, if found. If the spell correction type
    +     * is AUTOMATIC, then the search results are based on corrected_query.
    +     * Otherwise the original query is used for search.
          * 
    * * string corrected_query = 4; @@ -8718,10 +8986,10 @@ public Builder clearQueryExpansionInfo() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8744,10 +9012,10 @@ public java.lang.String getRedirectUri() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8770,10 +9038,10 @@ public com.google.protobuf.ByteString getRedirectUriBytes() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8795,10 +9063,10 @@ public Builder setRedirectUri(java.lang.String value) { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; @@ -8816,10 +9084,10 @@ public Builder clearRedirectUri() { * *
          * The URI of a customer-defined redirect page. If redirect action is
    -     * triggered, no search will be performed, and only
    +     * triggered, no search is performed, and only
          * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
          * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -     * will be set in the response.
    +     * are set in the response.
          * 
    * * string redirect_uri = 10; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponseOrBuilder.java index d18f2712..4bd96ae9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponseOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponseOrBuilder.java @@ -149,7 +149,9 @@ com.google.cloud.retail.v2beta.SearchResponse.SearchResultOrBuilder getResultsOr * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -161,7 +163,9 @@ com.google.cloud.retail.v2beta.SearchResponse.SearchResultOrBuilder getResultsOr * * *
    -   * If spell correction applies, the corrected query. Otherwise, empty.
    +   * Contains the spell corrected query, if found. If the spell correction type
    +   * is AUTOMATIC, then the search results are based on corrected_query.
    +   * Otherwise the original query is used for search.
        * 
    * * string corrected_query = 4; @@ -274,10 +278,10 @@ com.google.cloud.retail.v2beta.SearchResponse.SearchResultOrBuilder getResultsOr * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; @@ -290,10 +294,10 @@ com.google.cloud.retail.v2beta.SearchResponse.SearchResultOrBuilder getResultsOr * *
        * The URI of a customer-defined redirect page. If redirect action is
    -   * triggered, no search will be performed, and only
    +   * triggered, no search is performed, and only
        * [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and
        * [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token]
    -   * will be set in the response.
    +   * are set in the response.
        * 
    * * string redirect_uri = 10; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java index 3c6d4e8b..5b9547a4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java @@ -59,6 +59,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_SearchRequest_PersonalizationSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_SearchRequest_PersonalizationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_SearchRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_SearchRequest_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2beta_SearchResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -104,7 +112,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/cloud/retail/v2beta/common.proto\032(googl" + "e/cloud/retail/v2beta/product.proto\032 goo" + "gle/protobuf/field_mask.proto\032\034google/pr" - + "otobuf/struct.proto\"\242\020\n\rSearchRequest\022\026\n" + + "otobuf/struct.proto\"\356\023\n\rSearchRequest\022\026\n" + "\tplacement\030\001 \001(\tB\003\340A\002\0221\n\006branch\030\002 \001(\tB!\372" + "A\036\n\034retail.googleapis.com/Branch\022\r\n\005quer" + "y\030\003 \001(\t\022\027\n\nvisitor_id\030\004 \001(\tB\003\340A\002\0227\n\tuser" @@ -125,84 +133,99 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "mode\030\037 \001(\01624.google.cloud.retail.v2beta." + "SearchRequest.SearchMode\022[\n\024personalizat" + "ion_spec\030 \001(\0132=.google.cloud.retail.v2b" - + "eta.SearchRequest.PersonalizationSpec\032\347\002" - + "\n\tFacetSpec\022T\n\tfacet_key\030\001 \001(\0132<.google." - + "cloud.retail.v2beta.SearchRequest.FacetS" - + "pec.FacetKeyB\003\340A\002\022\r\n\005limit\030\002 \001(\005\022\034\n\024excl" - + "uded_filter_keys\030\003 \003(\t\022\037\n\027enable_dynamic" - + "_position\030\004 \001(\010\032\265\001\n\010FacetKey\022\020\n\003key\030\001 \001(" - + "\tB\003\340A\002\0227\n\tintervals\030\002 \003(\0132$.google.cloud" - + ".retail.v2beta.Interval\022\031\n\021restricted_va" - + "lues\030\003 \003(\t\022\020\n\010prefixes\030\010 \003(\t\022\020\n\010contains" - + "\030\t \003(\t\022\020\n\010order_by\030\004 \001(\t\022\r\n\005query\030\005 \001(\t\032" - + "\232\001\n\020DynamicFacetSpec\022M\n\004mode\030\001 \001(\0162?.goo" - + "gle.cloud.retail.v2beta.SearchRequest.Dy" - + "namicFacetSpec.Mode\"7\n\004Mode\022\024\n\020MODE_UNSP" - + "ECIFIED\020\000\022\014\n\010DISABLED\020\001\022\013\n\007ENABLED\020\002\032\362\001\n" - + "\tBoostSpec\022e\n\025condition_boost_specs\030\001 \003(" - + "\0132F.google.cloud.retail.v2beta.SearchReq" - + "uest.BoostSpec.ConditionBoostSpec\022\'\n\032ski" - + "p_boost_spec_validation\030\002 \001(\010H\000\210\001\001\0326\n\022Co" - + "nditionBoostSpec\022\021\n\tcondition\030\001 \001(\t\022\r\n\005b" - + "oost\030\002 \001(\002B\035\n\033_skip_boost_spec_validatio" - + "n\032\317\001\n\022QueryExpansionSpec\022Y\n\tcondition\030\001 " - + "\001(\0162F.google.cloud.retail.v2beta.SearchR" - + "equest.QueryExpansionSpec.Condition\022\036\n\026p" - + "in_unexpanded_results\030\002 \001(\010\">\n\tCondition" - + "\022\031\n\025CONDITION_UNSPECIFIED\020\000\022\014\n\010DISABLED\020" - + "\001\022\010\n\004AUTO\020\003\032\235\001\n\023PersonalizationSpec\022P\n\004m" - + "ode\030\001 \001(\0162B.google.cloud.retail.v2beta.S" - + "earchRequest.PersonalizationSpec.Mode\"4\n" - + "\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\010\n\004AUTO\020\001\022\014\n" - + "\010DISABLED\020\002\"[\n\nSearchMode\022\033\n\027SEARCH_MODE" - + "_UNSPECIFIED\020\000\022\027\n\023PRODUCT_SEARCH_ONLY\020\001\022" - + "\027\n\023FACETED_SEARCH_ONLY\020\002\"\275\n\n\016SearchRespo" - + "nse\022H\n\007results\030\001 \003(\01327.google.cloud.reta" - + "il.v2beta.SearchResponse.SearchResult\022@\n" - + "\006facets\030\002 \003(\01320.google.cloud.retail.v2be" - + "ta.SearchResponse.Facet\022\022\n\ntotal_size\030\003 " - + "\001(\005\022\027\n\017corrected_query\030\004 \001(\t\022\031\n\021attribut" - + "ion_token\030\005 \001(\t\022\027\n\017next_page_token\030\006 \001(\t" - + "\022[\n\024query_expansion_info\030\007 \001(\0132=.google." - + "cloud.retail.v2beta.SearchResponse.Query" - + "ExpansionInfo\022\024\n\014redirect_uri\030\n \001(\t\022\030\n\020a" - + "pplied_controls\030\014 \003(\t\022m\n\035invalid_conditi" - + "on_boost_specs\030\016 \003(\0132F.google.cloud.reta" - + "il.v2beta.SearchRequest.BoostSpec.Condit" - + "ionBoostSpec\032\204\004\n\014SearchResult\022\n\n\002id\030\001 \001(" - + "\t\0224\n\007product\030\002 \001(\0132#.google.cloud.retail" - + ".v2beta.Product\022\036\n\026matching_variant_coun" - + "t\030\003 \001(\005\022s\n\027matching_variant_fields\030\004 \003(\013" - + "2R.google.cloud.retail.v2beta.SearchResp" - + "onse.SearchResult.MatchingVariantFieldsE" - + "ntry\022o\n\025variant_rollup_values\030\005 \003(\0132P.go" - + "ogle.cloud.retail.v2beta.SearchResponse." - + "SearchResult.VariantRollupValuesEntry\032X\n" - + "\032MatchingVariantFieldsEntry\022\013\n\003key\030\001 \001(\t" - + "\022)\n\005value\030\002 \001(\0132\032.google.protobuf.FieldM" - + "ask:\0028\001\032R\n\030VariantRollupValuesEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobu" - + "f.Value:\0028\001\032\357\001\n\005Facet\022\013\n\003key\030\001 \001(\t\022K\n\006va" - + "lues\030\002 \003(\0132;.google.cloud.retail.v2beta." - + "SearchResponse.Facet.FacetValue\022\025\n\rdynam" - + "ic_facet\030\003 \001(\010\032u\n\nFacetValue\022\017\n\005value\030\001 " - + "\001(\tH\000\0228\n\010interval\030\002 \001(\0132$.google.cloud.r" - + "etail.v2beta.IntervalH\000\022\r\n\005count\030\003 \001(\003B\r" - + "\n\013facet_value\032I\n\022QueryExpansionInfo\022\026\n\016e" - + "xpanded_query\030\001 \001(\010\022\033\n\023pinned_result_cou" - + "nt\030\002 \001(\0032\222\002\n\rSearchService\022\265\001\n\006Search\022)." - + "google.cloud.retail.v2beta.SearchRequest" - + "\032*.google.cloud.retail.v2beta.SearchResp" - + "onse\"T\202\323\344\223\002N\"I/v2beta/{placement=project" - + "s/*/locations/*/catalogs/*/placements/*}" - + ":search:\001*\032I\312A\025retail.googleapis.com\322A.h" - + "ttps://www.googleapis.com/auth/cloud-pla" - + "tformB\333\001\n\036com.google.cloud.retail.v2beta" - + "B\022SearchServiceProtoP\001Z@google.golang.or" - + "g/genproto/googleapis/cloud/retail/v2bet" - + "a;retail\242\002\006RETAIL\252\002\032Google.Cloud.Retail." - + "V2Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Go" - + "ogle::Cloud::Retail::V2betab\006proto3" + + "eta.SearchRequest.PersonalizationSpec\022E\n" + + "\006labels\030\" \003(\01325.google.cloud.retail.v2be" + + "ta.SearchRequest.LabelsEntry\022a\n\025spell_co" + + "rrection_spec\030# \001(\0132=.google.cloud.retai" + + "l.v2beta.SearchRequest.SpellCorrectionSp" + + "ecH\000\210\001\001\032\231\003\n\tFacetSpec\022T\n\tfacet_key\030\001 \001(\013" + + "2<.google.cloud.retail.v2beta.SearchRequ" + + "est.FacetSpec.FacetKeyB\003\340A\002\022\r\n\005limit\030\002 \001" + + "(\005\022\034\n\024excluded_filter_keys\030\003 \003(\t\022\037\n\027enab" + + "le_dynamic_position\030\004 \001(\010\032\347\001\n\010FacetKey\022\020" + + "\n\003key\030\001 \001(\tB\003\340A\002\0227\n\tintervals\030\002 \003(\0132$.go" + + "ogle.cloud.retail.v2beta.Interval\022\031\n\021res" + + "tricted_values\030\003 \003(\t\022\020\n\010prefixes\030\010 \003(\t\022\020" + + "\n\010contains\030\t \003(\t\022\030\n\020case_insensitive\030\n \001" + + "(\010\022\020\n\010order_by\030\004 \001(\t\022\r\n\005query\030\005 \001(\t\022\026\n\016r" + + "eturn_min_max\030\013 \001(\010\032\232\001\n\020DynamicFacetSpec" + + "\022M\n\004mode\030\001 \001(\0162?.google.cloud.retail.v2b" + + "eta.SearchRequest.DynamicFacetSpec.Mode\"" + + "7\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\014\n\010DISABLE" + + "D\020\001\022\013\n\007ENABLED\020\002\032\362\001\n\tBoostSpec\022e\n\025condit" + + "ion_boost_specs\030\001 \003(\0132F.google.cloud.ret" + + "ail.v2beta.SearchRequest.BoostSpec.Condi" + + "tionBoostSpec\022\'\n\032skip_boost_spec_validat" + + "ion\030\002 \001(\010H\000\210\001\001\0326\n\022ConditionBoostSpec\022\021\n\t" + + "condition\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002B\035\n\033_skip_" + + "boost_spec_validation\032\317\001\n\022QueryExpansion" + + "Spec\022Y\n\tcondition\030\001 \001(\0162F.google.cloud.r" + + "etail.v2beta.SearchRequest.QueryExpansio" + + "nSpec.Condition\022\036\n\026pin_unexpanded_result" + + "s\030\002 \001(\010\">\n\tCondition\022\031\n\025CONDITION_UNSPEC" + + "IFIED\020\000\022\014\n\010DISABLED\020\001\022\010\n\004AUTO\020\003\032\235\001\n\023Pers" + + "onalizationSpec\022P\n\004mode\030\001 \001(\0162B.google.c" + + "loud.retail.v2beta.SearchRequest.Persona" + + "lizationSpec.Mode\"4\n\004Mode\022\024\n\020MODE_UNSPEC" + + "IFIED\020\000\022\010\n\004AUTO\020\001\022\014\n\010DISABLED\020\002\032\244\001\n\023Spel" + + "lCorrectionSpec\022P\n\004mode\030\001 \001(\0162B.google.c" + + "loud.retail.v2beta.SearchRequest.SpellCo" + + "rrectionSpec.Mode\";\n\004Mode\022\024\n\020MODE_UNSPEC" + + "IFIED\020\000\022\023\n\017SUGGESTION_ONLY\020\001\022\010\n\004AUTO\020\002\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"[\n\nSearchMode\022\033\n\027SEARCH_MODE_UNSPE" + + "CIFIED\020\000\022\027\n\023PRODUCT_SEARCH_ONLY\020\001\022\027\n\023FAC" + + "ETED_SEARCH_ONLY\020\002B\030\n\026_spell_correction_" + + "spec\"\344\n\n\016SearchResponse\022H\n\007results\030\001 \003(\013" + + "27.google.cloud.retail.v2beta.SearchResp" + + "onse.SearchResult\022@\n\006facets\030\002 \003(\01320.goog" + + "le.cloud.retail.v2beta.SearchResponse.Fa" + + "cet\022\022\n\ntotal_size\030\003 \001(\005\022\027\n\017corrected_que" + + "ry\030\004 \001(\t\022\031\n\021attribution_token\030\005 \001(\t\022\027\n\017n" + + "ext_page_token\030\006 \001(\t\022[\n\024query_expansion_" + + "info\030\007 \001(\0132=.google.cloud.retail.v2beta." + + "SearchResponse.QueryExpansionInfo\022\024\n\014red" + + "irect_uri\030\n \001(\t\022\030\n\020applied_controls\030\014 \003(" + + "\t\022m\n\035invalid_condition_boost_specs\030\016 \003(\013" + + "2F.google.cloud.retail.v2beta.SearchRequ" + + "est.BoostSpec.ConditionBoostSpec\032\204\004\n\014Sea" + + "rchResult\022\n\n\002id\030\001 \001(\t\0224\n\007product\030\002 \001(\0132#" + + ".google.cloud.retail.v2beta.Product\022\036\n\026m" + + "atching_variant_count\030\003 \001(\005\022s\n\027matching_" + + "variant_fields\030\004 \003(\0132R.google.cloud.reta" + + "il.v2beta.SearchResponse.SearchResult.Ma" + + "tchingVariantFieldsEntry\022o\n\025variant_roll" + + "up_values\030\005 \003(\0132P.google.cloud.retail.v2" + + "beta.SearchResponse.SearchResult.Variant" + + "RollupValuesEntry\032X\n\032MatchingVariantFiel" + + "dsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.go" + + "ogle.protobuf.FieldMask:\0028\001\032R\n\030VariantRo" + + "llupValuesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " + + "\001(\0132\026.google.protobuf.Value:\0028\001\032\226\002\n\005Face" + + "t\022\013\n\003key\030\001 \001(\t\022K\n\006values\030\002 \003(\0132;.google." + + "cloud.retail.v2beta.SearchResponse.Facet" + + ".FacetValue\022\025\n\rdynamic_facet\030\003 \001(\010\032\233\001\n\nF" + + "acetValue\022\017\n\005value\030\001 \001(\tH\000\0228\n\010interval\030\002" + + " \001(\0132$.google.cloud.retail.v2beta.Interv" + + "alH\000\022\r\n\005count\030\003 \001(\003\022\021\n\tmin_value\030\005 \001(\001\022\021" + + "\n\tmax_value\030\006 \001(\001B\r\n\013facet_value\032I\n\022Quer" + + "yExpansionInfo\022\026\n\016expanded_query\030\001 \001(\010\022\033" + + "\n\023pinned_result_count\030\002 \001(\0032\350\002\n\rSearchSe" + + "rvice\022\213\002\n\006Search\022).google.cloud.retail.v" + + "2beta.SearchRequest\032*.google.cloud.retai" + + "l.v2beta.SearchResponse\"\251\001\202\323\344\223\002\242\001\"I/v2be" + + "ta/{placement=projects/*/locations/*/cat" + + "alogs/*/placements/*}:search:\001*ZR\"M/v2be" + + "ta/{placement=projects/*/locations/*/cat" + + "alogs/*/servingConfigs/*}:search:\001*\032I\312A\025" + + "retail.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformB\333\001\n\036com.g" + + "oogle.cloud.retail.v2betaB\022SearchService" + + "ProtoP\001Z@google.golang.org/genproto/goog" + + "leapis/cloud/retail/v2beta;retail\242\002\006RETA" + + "IL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google" + + "\\Cloud\\Retail\\V2beta\352\002\035Google::Cloud::Re" + + "tail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -242,6 +265,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageCategories", "SearchMode", "PersonalizationSpec", + "Labels", + "SpellCorrectionSpec", + "SpellCorrectionSpec", }); internal_static_google_cloud_retail_v2beta_SearchRequest_FacetSpec_descriptor = internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor.getNestedTypes().get(0); @@ -259,7 +285,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_SearchRequest_FacetSpec_FacetKey_descriptor, new java.lang.String[] { - "Key", "Intervals", "RestrictedValues", "Prefixes", "Contains", "OrderBy", "Query", + "Key", + "Intervals", + "RestrictedValues", + "Prefixes", + "Contains", + "CaseInsensitive", + "OrderBy", + "Query", + "ReturnMinMax", }); internal_static_google_cloud_retail_v2beta_SearchRequest_DynamicFacetSpec_descriptor = internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor.getNestedTypes().get(1); @@ -303,6 +337,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Mode", }); + internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor = + internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor, + new java.lang.String[] { + "Mode", + }); + internal_static_google_cloud_retail_v2beta_SearchRequest_LabelsEntry_descriptor = + internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor.getNestedTypes().get(6); + internal_static_google_cloud_retail_v2beta_SearchRequest_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_SearchRequest_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_retail_v2beta_SearchResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_retail_v2beta_SearchResponse_fieldAccessorTable = @@ -372,7 +422,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_SearchResponse_Facet_FacetValue_descriptor, new java.lang.String[] { - "Value", "Interval", "Count", "FacetValue", + "Value", "Interval", "Count", "MinValue", "MaxValue", "FacetValue", }); internal_static_google_cloud_retail_v2beta_SearchResponse_QueryExpansionInfo_descriptor = internal_static_google_cloud_retail_v2beta_SearchResponse_descriptor diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java index cbe344e8..240a6fb8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java @@ -32,8 +32,8 @@ public enum SearchSolutionUseCase implements com.google.protobuf.ProtocolMessage * * *
    -   * The value when it's unspecified. Defaults to
    -   * [SEARCH][].
    +   * The value when it's unspecified. In this case, server behavior defaults to
    +   * [SEARCH_SOLUTION_USE_CASE_SEARCH][].
        * 
    * * SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; @@ -68,8 +68,8 @@ public enum SearchSolutionUseCase implements com.google.protobuf.ProtocolMessage * * *
    -   * The value when it's unspecified. Defaults to
    -   * [SEARCH][].
    +   * The value when it's unspecified. In this case, server behavior defaults to
    +   * [SEARCH_SOLUTION_USE_CASE_SEARCH][].
        * 
    * * SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; @@ -159,7 +159,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.retail.v2beta.CommonProto.getDescriptor().getEnumTypes().get(2); + return com.google.cloud.retail.v2beta.CommonProto.getDescriptor().getEnumTypes().get(3); } private static final SearchSolutionUseCase[] VALUES = values(); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java index d9039583..a60a2edf 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java @@ -337,7 +337,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -361,7 +361,7 @@ public java.lang.String getName() { * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -757,10 +757,11 @@ public com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec getDynamicF * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -784,10 +785,11 @@ public com.google.protobuf.ProtocolStringList getBoostControlIdsList() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -811,10 +813,11 @@ public int getBoostControlIdsCount() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -839,10 +842,11 @@ public java.lang.String getBoostControlIds(int index) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -2528,7 +2532,7 @@ public Builder mergeFrom( * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2551,7 +2555,7 @@ public java.lang.String getName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2574,7 +2578,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2596,7 +2600,7 @@ public Builder setName(java.lang.String value) { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2614,7 +2618,7 @@ public Builder clearName() { * *
          * Immutable. Fully qualified name
    -     * projects/*/locations/global/catalogs/*/servingConfig/*
    +     * `projects/*/locations/global/catalogs/*/servingConfig/*`
          * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3603,10 +3607,11 @@ private void ensureBoostControlIdsIsMutable() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3630,10 +3635,11 @@ public com.google.protobuf.ProtocolStringList getBoostControlIdsList() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3657,10 +3663,11 @@ public int getBoostControlIdsCount() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3685,10 +3692,11 @@ public java.lang.String getBoostControlIds(int index) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3713,10 +3721,11 @@ public com.google.protobuf.ByteString getBoostControlIdsBytes(int index) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3748,10 +3757,11 @@ public Builder setBoostControlIds(int index, java.lang.String value) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3782,10 +3792,11 @@ public Builder addBoostControlIds(java.lang.String value) { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3813,10 +3824,11 @@ public Builder addAllBoostControlIds(java.lang.Iterable values * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -3843,10 +3855,11 @@ public Builder clearBoostControlIds() { * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java index 2a8a1d25..11b10102 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java @@ -28,7 +28,7 @@ public interface ServingConfigOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -41,7 +41,7 @@ public interface ServingConfigOrBuilder * *
        * Immutable. Fully qualified name
    -   * projects/*/locations/global/catalogs/*/servingConfig/*
    +   * `projects/*/locations/global/catalogs/*/servingConfig/*`
        * 
    * * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -329,10 +329,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -354,10 +355,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -379,10 +381,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is @@ -405,10 +408,11 @@ public interface ServingConfigOrBuilder * specifications is 100. * Notice that if both * [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - * and [SearchRequest.boost_spec] are set, the boost conditions from both - * places are evaluated. If a search request matches multiple boost - * conditions, the final boost score is equal to the sum of the boost scores - * from all matched boost conditions. + * and + * [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + * are set, the boost conditions from both places are evaluated. If a search + * request matches multiple boost conditions, the final boost score is equal + * to the sum of the boost scores from all matched boost conditions. * Can only be set if * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] * is diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java index da2dbbbd..09dcdc8d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java @@ -24,7 +24,8 @@ *
      * Metadata related to the progress of the SetInventory operation.
      * Currently empty because there is no meaningful metadata populated from the
    - * [SetInventory][] method.
    + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.SetInventoryMetadata} @@ -262,7 +263,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
        * Metadata related to the progress of the SetInventory operation.
        * Currently empty because there is no meaningful metadata populated from the
    -   * [SetInventory][] method.
    +   * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.SetInventoryMetadata} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java index 2e04e530..63a4f0c7 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [SetInventory][] method.
    + * Request message for
    + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.SetInventoryRequest} @@ -169,8 +171,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -188,22 +191,25 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -228,8 +234,9 @@ public boolean hasInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -247,22 +254,25 @@ public boolean hasInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -289,8 +299,9 @@ public com.google.cloud.retail.v2beta.Product getInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -308,22 +319,25 @@ public com.google.cloud.retail.v2beta.Product getInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -673,7 +687,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [SetInventory][] method.
    +   * Request message for
    +   * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.SetInventoryRequest} @@ -887,8 +903,9 @@ public Builder mergeFrom( * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -906,22 +923,25 @@ public Builder mergeFrom( * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -945,8 +965,9 @@ public boolean hasInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -964,22 +985,25 @@ public boolean hasInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1009,8 +1033,9 @@ public com.google.cloud.retail.v2beta.Product getInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1028,22 +1053,25 @@ public com.google.cloud.retail.v2beta.Product getInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1075,8 +1103,9 @@ public Builder setInventory(com.google.cloud.retail.v2beta.Product value) { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1094,22 +1123,25 @@ public Builder setInventory(com.google.cloud.retail.v2beta.Product value) { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1138,8 +1170,9 @@ public Builder setInventory(com.google.cloud.retail.v2beta.Product.Builder build * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1157,22 +1190,25 @@ public Builder setInventory(com.google.cloud.retail.v2beta.Product.Builder build * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1208,8 +1244,9 @@ public Builder mergeInventory(com.google.cloud.retail.v2beta.Product value) { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1227,22 +1264,25 @@ public Builder mergeInventory(com.google.cloud.retail.v2beta.Product value) { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1272,8 +1312,9 @@ public Builder clearInventory() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1291,22 +1332,25 @@ public Builder clearInventory() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1330,8 +1374,9 @@ public com.google.cloud.retail.v2beta.Product.Builder getInventoryBuilder() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1349,22 +1394,25 @@ public com.google.cloud.retail.v2beta.Product.Builder getInventoryBuilder() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -1392,8 +1440,9 @@ public com.google.cloud.retail.v2beta.ProductOrBuilder getInventoryOrBuilder() { * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -1411,22 +1460,25 @@ public com.google.cloud.retail.v2beta.ProductOrBuilder getInventoryOrBuilder() { * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequestOrBuilder.java index 97a77f72..30fa6ed8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequestOrBuilder.java @@ -35,8 +35,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -54,22 +55,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -91,8 +95,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -110,22 +115,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * @@ -147,8 +155,9 @@ public interface SetInventoryRequestOrBuilder * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The updated inventory fields must be specified in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. - * If [SetInventoryRequest.inventory.name][] is empty or invalid, an - * INVALID_ARGUMENT error is returned. + * If + * [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + * is empty or invalid, an INVALID_ARGUMENT error is returned. * If the caller does not have permission to update the * [Product][google.cloud.retail.v2beta.Product] named in * [Product.name][google.cloud.retail.v2beta.Product.name], regardless of @@ -166,22 +175,25 @@ public interface SetInventoryRequestOrBuilder * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types and corresponding place IDs - * to update in [SetInventoryRequest.inventory.fulfillment_info][] + * to update in + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * The caller can clear all place IDs from a subset of fulfillment types in * the following ways: * * Adds "fulfillment_info" in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] * * Specifies only the desired fulfillment types to clear in - * [SetInventoryRequest.inventory.fulfillment_info][] + * [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * * Checks that only the desired fulfillment info types have empty - * [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + * [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] * The last update time is recorded for the following inventory fields: * * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] * * [Product.availability][google.cloud.retail.v2beta.Product.availability] * * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] * * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] * If a full overwrite of inventory information while ignoring timestamps is - * needed, [UpdateProduct][] should be invoked instead. + * needed, + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + * should be invoked instead. * * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java index e1b59190..79fc8cee 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java @@ -23,7 +23,8 @@ * *
      * Response of the SetInventoryRequest.  Currently empty because
    - * there is no meaningful response populated from the [SetInventory][]
    + * there is no meaningful response populated from the
    + * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory]
      * method.
      * 
    * @@ -261,7 +262,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
        * Response of the SetInventoryRequest.  Currently empty because
    -   * there is no meaningful response populated from the [SetInventory][]
    +   * there is no meaningful response populated from the
    +   * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory]
        * method.
        * 
    * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java index 02e3d651..3b0abe1c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java @@ -22,7 +22,9 @@ * * *
    - * Request message for [UpdateProduct][] method.
    + * Request message for
    + * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
    + * method.
      * 
    * * Protobuf type {@code google.cloud.retail.v2beta.UpdateProductRequest} @@ -227,6 +229,10 @@ public com.google.cloud.retail.v2beta.ProductOrBuilder getProductOrBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -247,6 +253,10 @@ public boolean hasUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -267,6 +277,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -487,7 +501,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
    -   * Request message for [UpdateProduct][] method.
    +   * Request message for
    +   * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
    +   * method.
        * 
    * * Protobuf type {@code google.cloud.retail.v2beta.UpdateProductRequest} @@ -951,6 +967,10 @@ public com.google.cloud.retail.v2beta.ProductOrBuilder getProductOrBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -970,6 +990,10 @@ public boolean hasUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -995,6 +1019,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1022,6 +1050,10 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1046,6 +1078,10 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1075,6 +1111,10 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1100,6 +1140,10 @@ public Builder clearUpdateMask() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1119,6 +1163,10 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -1142,6 +1190,10 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequestOrBuilder.java index fce55133..f4961f14 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequestOrBuilder.java @@ -95,6 +95,10 @@ public interface UpdateProductRequestOrBuilder * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -112,6 +116,10 @@ public interface UpdateProductRequestOrBuilder * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; @@ -129,6 +137,10 @@ public interface UpdateProductRequestOrBuilder * fields that are neither immutable nor output only) are updated. * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error * is returned. + * The attribute key can be updated by setting the mask path as + * "attributes.${key_name}". If a key name is present in the mask but not in + * the patching product from the request, this key will be deleted after the + * update. * * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java index a812613c..ac7828cd 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java @@ -415,10 +415,13 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. * @@ -447,10 +450,13 @@ public java.lang.String getVisitorId() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. * @@ -754,11 +760,10 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * *
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -779,11 +784,10 @@ public java.util.List getProductDe
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -805,11 +809,10 @@ public java.util.List getProductDe
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -830,11 +833,10 @@ public int getProductDetailsCount() {
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -855,11 +857,10 @@ public com.google.cloud.retail.v2beta.ProductDetail getProductDetails(int index)
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -2695,10 +2696,13 @@ public Builder setEventTypeBytes(com.google.protobuf.ByteString value) {
          * For example, this could be implemented with an HTTP cookie, which should be
          * able to uniquely identify a visitor on a single device. This unique
          * identifier should not change if the visitor log in/out of the website.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded model
    +     * quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * The field should not contain PII or user-data. We recommend to use Google
    -     * Analystics [Client
    +     * Analytics [Client
          * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
          * for this field.
          * 
    @@ -2726,10 +2730,13 @@ public java.lang.String getVisitorId() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -2757,10 +2764,13 @@ public com.google.protobuf.ByteString getVisitorIdBytes() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -2787,10 +2797,13 @@ public Builder setVisitorId(java.lang.String value) { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -2813,10 +2826,13 @@ public Builder clearVisitorId() { * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -3593,11 +3609,10 @@ private void ensureProductDetailsIsMutable() { * *
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3621,11 +3636,10 @@ public java.util.List getProductDe
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3649,11 +3663,10 @@ public int getProductDetailsCount() {
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3677,11 +3690,10 @@ public com.google.cloud.retail.v2beta.ProductDetail getProductDetails(int index)
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3712,11 +3724,10 @@ public Builder setProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3744,11 +3755,10 @@ public Builder setProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3778,11 +3788,10 @@ public Builder addProductDetails(com.google.cloud.retail.v2beta.ProductDetail va
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3813,11 +3822,10 @@ public Builder addProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3845,11 +3853,10 @@ public Builder addProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3877,11 +3884,10 @@ public Builder addProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3909,11 +3915,10 @@ public Builder addAllProductDetails(
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3940,11 +3945,10 @@ public Builder clearProductDetails() {
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3971,11 +3975,10 @@ public Builder removeProductDetails(int index) {
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -3996,11 +3999,10 @@ public com.google.cloud.retail.v2beta.ProductDetail.Builder getProductDetailsBui
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4025,11 +4027,10 @@ public com.google.cloud.retail.v2beta.ProductDetailOrBuilder getProductDetailsOr
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4054,11 +4055,10 @@ public com.google.cloud.retail.v2beta.ProductDetailOrBuilder getProductDetailsOr
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4079,11 +4079,10 @@ public com.google.cloud.retail.v2beta.ProductDetail.Builder addProductDetailsBui
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    @@ -4105,11 +4104,10 @@ public com.google.cloud.retail.v2beta.ProductDetail.Builder addProductDetailsBui
          *
          * 
          * The main product details related to the event.
    -     * This field is required for the following event types:
    +     * This field is optional except for the following event types:
          * * `add-to-cart`
          * * `detail-page-view`
          * * `purchase-complete`
    -     * * `search`
          * In a `search` event, this field represents the products returned to the end
          * user on the current page (the end user may have not finished browsing the
          * whole page yet). When a new page is returned to the end user, after
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java
    index 7232c87f..7f39e4b6 100644
    --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java
    +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java
    @@ -76,10 +76,13 @@ public interface UserEventOrBuilder
        * For example, this could be implemented with an HTTP cookie, which should be
        * able to uniquely identify a visitor on a single device. This unique
        * identifier should not change if the visitor log in/out of the website.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded model
    +   * quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * The field should not contain PII or user-data. We recommend to use Google
    -   * Analystics [Client
    +   * Analytics [Client
        * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
        * for this field.
        * 
    @@ -97,10 +100,13 @@ public interface UserEventOrBuilder * For example, this could be implemented with an HTTP cookie, which should be * able to uniquely identify a visitor on a single device. This unique * identifier should not change if the visitor log in/out of the website. + * Don't set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an INVALID_ARGUMENT error is returned. * The field should not contain PII or user-data. We recommend to use Google - * Analystics [Client + * Analytics [Client * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) * for this field. *
    @@ -322,11 +328,10 @@ public interface UserEventOrBuilder * *
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -344,11 +349,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -366,11 +370,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -388,11 +391,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    @@ -411,11 +413,10 @@ public interface UserEventOrBuilder
        *
        * 
        * The main product details related to the event.
    -   * This field is required for the following event types:
    +   * This field is optional except for the following event types:
        * * `add-to-cart`
        * * `detail-page-view`
        * * `purchase-complete`
    -   * * `search`
        * In a `search` event, this field represents the products returned to the end
        * user on the current page (the end user may have not finished browsing the
        * whole page yet). When a new page is returned to the end user, after
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java
    index 5d3bb3b5..3e624a5e 100644
    --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java
    +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java
    @@ -141,8 +141,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        *
        * 
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    @@ -168,8 +171,11 @@ public java.lang.String getUserId() { * *
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    @@ -724,8 +730,11 @@ public Builder mergeFrom( * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -750,8 +759,11 @@ public java.lang.String getUserId() { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -776,8 +788,11 @@ public com.google.protobuf.ByteString getUserIdBytes() { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -801,8 +816,11 @@ public Builder setUserId(java.lang.String value) { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    @@ -822,8 +840,11 @@ public Builder clearUserId() { * *
          * Highly recommended for logged-in users. Unique identifier for logged-in
    -     * user, such as a user name.
    +     * user, such as a user name. Don't set for anonymous users.
          * Always use a hashed value for this ID.
    +     * Don't set the field to the same fixed ID for different users. This mixes
    +     * the event history of those users together, which results in degraded
    +     * model quality.
          * The field must be a UTF-8 encoded string with a length limit of 128
          * characters. Otherwise, an INVALID_ARGUMENT error is returned.
          * 
    diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfoOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfoOrBuilder.java index 8e49d706..f1a79357 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfoOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfoOrBuilder.java @@ -28,8 +28,11 @@ public interface UserInfoOrBuilder * *
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    @@ -44,8 +47,11 @@ public interface UserInfoOrBuilder * *
        * Highly recommended for logged-in users. Unique identifier for logged-in
    -   * user, such as a user name.
    +   * user, such as a user name. Don't set for anonymous users.
        * Always use a hashed value for this ID.
    +   * Don't set the field to the same fixed ID for different users. This mixes
    +   * the event history of those users together, which results in degraded
    +   * model quality.
        * The field must be a UTF-8 encoded string with a length limit of 128
        * characters. Otherwise, an INVALID_ARGUMENT error is returned.
        * 
    diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto index e0b844ef..0c2cab63 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto @@ -42,10 +42,10 @@ message ProductLevelConfig { // default to // [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] // if unset. - // * `variant`: You can only ingest - // [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] - // [Product][google.cloud.retail.v2beta.Product]s. - // This means + // * `variant` (incompatible with Retail Search): You can only + // ingest + // [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] + // [Product][google.cloud.retail.v2beta.Product]s. This means // [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] // cannot be empty. // @@ -56,8 +56,8 @@ message ProductLevelConfig { // [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field] // is `itemGroupId`, an INVALID_ARGUMENT error is returned. // - // See [Using product - // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + // See [Product + // levels](https://cloud.google.com/retail/docs/catalog#product-levels) // for more details. string ingestion_product_type = 1; @@ -78,8 +78,8 @@ message ProductLevelConfig { // [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type] // is `variant`, an INVALID_ARGUMENT error is returned. // - // See [Using product - // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels) + // See [Product + // levels](https://cloud.google.com/retail/docs/catalog#product-levels) // for more details. string merchant_center_product_id_field = 2; } @@ -144,6 +144,10 @@ message CatalogAttribute { // Required. Attribute name. // For example: `color`, `brands`, `attributes.custom_attribute`, such as // `attributes.xyz`. + // To be indexable, the attribute name can contain only alpha-numeric + // characters and underscores. For example, an attribute named + // `attributes.abc_xyz` can be indexed, but an attribute named + // `attributes.abc-xyz` cannot be indexed. string key = 1 [(google.api.field_behavior) = REQUIRED]; // Output only. Indicates whether this attribute has been used by any @@ -153,15 +157,20 @@ message CatalogAttribute { // Otherwise, this field is `False`. // // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be - // pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], - // or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + // pre-loaded by using + // [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], + // [CatalogService.ImportCatalogAttributes][], or + // [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] + // APIs. This field is `False` for pre-loaded // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. // - // Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that - // are not in use by products can be deleted. + // Only pre-loaded // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are - // in use by products cannot be deleted; however, their configuration - // properties will reset to default values upon removal request. + // neither in use by products nor predefined can be deleted. + // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are + // either in use by products or are predefined cannot be deleted; however, + // their configuration properties will reset to default values upon removal + // request. // // After catalog changes, it takes about 10 minutes for this field to update. bool in_use = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -194,6 +203,14 @@ message CatalogAttribute { // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as // there are no text values associated to numerical attributes. SearchableOption searchable_option = 7; + + // When + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, + // attribute values are filterable for recommendations. + // This option works for categorical features only, + // does not work for numerical features, inventory filtering. + RecommendationsFilteringOption recommendations_filtering_option = 8; } // Catalog level attribute config. @@ -254,14 +271,18 @@ message CompletionConfig { // Default value: 'exact-prefix'. string matching_order = 2; - // The maximum number of autocomplete suggestions returned per term. The - // maximum allowed max suggestions is 20. Default value is 20. If left unset - // or set to 0, then will fallback to default value. + // The maximum number of autocomplete suggestions returned per term. Default + // value is 20. If left unset or set to 0, then will fallback to default + // value. + // + // Value range is 1 to 20. int32 max_suggestions = 3; // The minimum number of characters needed to be typed in order to get // suggestions. Default value is 2. If left unset or set to 0, then will // fallback to default value. + // + // Value range is 1 to 20. int32 min_prefix_length = 4; // If set to true, the auto learning function is enabled. Auto learning uses @@ -271,8 +292,8 @@ message CompletionConfig { // [CompleteQueryRequest][google.cloud.retail.v2beta.CompleteQueryRequest]. bool auto_learning = 11; - // Output only. The input config for the import of the source data that - // contains the autocomplete phrases uploaded by the customer. + // Output only. The source data for the latest import of the autocomplete + // suggestion phrases. CompletionDataInputConfig suggestions_input_config = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -284,24 +305,24 @@ message CompletionConfig { string last_suggestions_import_operation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The input config for the import of the source data that - // contains the / autocomplete denylist phrases uploaded by the customer. + // Output only. The source data for the latest import of the autocomplete + // denylist phrases. CompletionDataInputConfig denylist_input_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. LRO corresponding to the latest denylist import. + // Output only. Name of the LRO corresponding to the latest denylist import. // // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to // retrieve the latest state of the Long Running Operation. string last_denylist_import_operation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The input config for the import of the source data that - // contains the autocomplete allowlist phrases uploaded by the customer. + // Output only. The source data for the latest import of the autocomplete + // allowlist phrases. CompletionDataInputConfig allowlist_input_config = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. LRO corresponding to the latest allowlist import. + // Output only. Name of the LRO corresponding to the latest allowlist import. // // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to // retrieve the latest state of the Long Running Operation. diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto index 7e27c916..fb6f8bca 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto @@ -384,7 +384,7 @@ message UpdateCompletionConfigRequest { // method. message GetAttributesConfigRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -417,7 +417,7 @@ message UpdateAttributesConfigRequest { // method. message AddCatalogAttributeRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string attributes_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -436,7 +436,7 @@ message AddCatalogAttributeRequest { // method. message RemoveCatalogAttributeRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string attributes_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -454,7 +454,7 @@ message RemoveCatalogAttributeRequest { // method. message ReplaceCatalogAttributeRequest { // Required. Full AttributesConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` string attributes_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto index ada7dd15..3a500afc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto @@ -30,7 +30,7 @@ option ruby_package = "Google::Cloud::Retail::V2beta"; // At which level we offer configuration for attributes. enum AttributeConfigLevel { - // Value used when unset. Defaults to + // Value used when unset. In this case, server behavior defaults to // [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2beta.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG]. ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED = 0; @@ -55,10 +55,24 @@ enum SolutionType { SOLUTION_TYPE_SEARCH = 2; } +// If filtering for recommendations is enabled. +enum RecommendationsFilteringOption { + // Value used when unset. + // In this case, server behavior defaults to + // [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2beta.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED]. + RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED = 0; + + // Recommendation filtering is disabled. + RECOMMENDATIONS_FILTERING_DISABLED = 1; + + // Recommendation filtering is enabled. + RECOMMENDATIONS_FILTERING_ENABLED = 3; +} + // The use case of Cloud Retail Search. enum SearchSolutionUseCase { - // The value when it's unspecified. Defaults to - // [SEARCH][]. + // The value when it's unspecified. In this case, server behavior defaults to + // [SEARCH_SOLUTION_USE_CASE_SEARCH][]. SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; // Search use case. Expects the traffic has a non-empty @@ -157,10 +171,13 @@ message Rule { } // * Rule Condition: - // - No [Condition][query_terms] provided is a global match. - // - 1 or more [Condition][query_terms] provided is combined with OR - // operator. - // * Action Input: The request query and filter that will be applied to the + // - No + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // provided is a global match. + // - 1 or more + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms] + // provided are combined with OR operator. + // * Action Input: The request query and filter that are applied to the // retrieved products, in addition to any filters already provided with the // SearchRequest. The AND operator is used to combine the query's existing // filters with the filter rule(s). NOTE: May result in 0 results when @@ -187,8 +204,10 @@ message Rule { } // Redirects a shopper to a specific page. + // // * Rule Condition: - // - Must specify [Condition][query_terms]. + // - Must specify + // [Condition.query_terms][google.cloud.retail.v2beta.Condition.query_terms]. // * Action Input: Request Query // * Action Result: Redirects shopper to provided uri. message RedirectAction { @@ -388,11 +407,13 @@ message CustomAttribute { // set. Otherwise, an INVALID_ARGUMENT error is returned. repeated double numbers = 2; - // This field will only be used when + // This field is normally ignored unless // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] - // of the [Catalog][google.cloud.retail.v2beta.Catalog] is - // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are - // searchable by text queries in + // of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the + // deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about + // product-level attribute configuration, see [Configuration + // modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). + // If true, custom attribute values are searchable by text queries in // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. // // This field is ignored in a @@ -400,13 +421,16 @@ message CustomAttribute { // // Only set if type [text][google.cloud.retail.v2beta.CustomAttribute.text] is // set. Otherwise, a INVALID_ARGUMENT error is returned. - optional bool searchable = 3; + optional bool searchable = 3 [deprecated = true]; - // This field will only be used when + // This field is normally ignored unless // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] - // of the [Catalog][google.cloud.retail.v2beta.Catalog] is - // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are - // indexed, so that it can be filtered, faceted or boosted in + // of the [Catalog][google.cloud.retail.v2beta.Catalog] is set to the + // deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about + // product-level attribute configuration, see [Configuration + // modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). + // If true, custom attribute values are indexed, so that they can be filtered, + // faceted or boosted in // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. // // This field is ignored in a @@ -418,7 +442,7 @@ message CustomAttribute { // and // [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] // for more details. - optional bool indexable = 4; + optional bool indexable = 4 [deprecated = true]; } // Fulfillment information, such as the store IDs for in-store pickup or region @@ -490,9 +514,8 @@ message Interval { // The lower bound of the interval. If neither of the min fields are set, then // the lower bound is negative infinity. // - // This field must be not larger than - // [max][google.cloud.retail.v2beta.Interval.max]. Otherwise, an - // INVALID_ARGUMENT error is returned. + // This field must not be larger than max. + // Otherwise, an INVALID_ARGUMENT error is returned. oneof min { // Inclusive lower bound. double minimum = 1; @@ -504,9 +527,8 @@ message Interval { // The upper bound of the interval. If neither of the max fields are set, then // the upper bound is positive infinity. // - // This field must be not smaller than - // [min][google.cloud.retail.v2beta.Interval.min]. Otherwise, an - // INVALID_ARGUMENT error is returned. + // This field must be not smaller than min. + // Otherwise, an INVALID_ARGUMENT error is returned. oneof max { // Inclusive upper bound. double maximum = 3; @@ -562,7 +584,11 @@ message PriceInfo { float price = 2; // Price of the product without any discount. If zero, by default set to be - // the [price][google.cloud.retail.v2beta.PriceInfo.price]. + // the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set, + // [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] + // should be greater than or equal to + // [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an + // INVALID_ARGUMENT error is thrown. float original_price = 3; // The costs associated with the sale of a particular product. Used for gross @@ -649,10 +675,14 @@ message Rating { // Information of an end user. message UserInfo { // Highly recommended for logged-in users. Unique identifier for logged-in - // user, such as a user name. + // user, such as a user name. Don't set for anonymous users. // // Always use a hashed value for this ID. // + // Don't set the field to the same fixed ID for different users. This mixes + // the event history of those users together, which results in degraded + // model quality. + // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an INVALID_ARGUMENT error is returned. string user_id = 1; diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto index 6a1f2907..0d6480a1 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto @@ -99,6 +99,9 @@ message CompleteQueryRequest { // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 7; + // Note that this field applies for `user-data` dataset only. For requests + // with `cloud-retail` dataset, setting this field has no effect. + // // The language filters applied to the output suggestions. If set, it should // contain the language of the query. If not set, suggestions are returned // without considering language restrictions. This is the BCP-47 language @@ -133,9 +136,9 @@ message CompleteQueryRequest { // // * user-data // - // * cloud-retail - // This option requires additional allowlisting. Before using cloud-retail, - // contact Cloud Retail support team first. + // * cloud-retail: + // This option requires enabling auto-learning function first. See + // [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset). string dataset = 6; // Completion max suggestions. If left unset or set to 0, then will fallback @@ -155,10 +158,14 @@ message CompleteQueryResponse { string suggestion = 1; // Custom attributes for the suggestion term. + // // * For "user-data", the attributes are additional custom attributes // ingested through BigQuery. + // // * For "cloud-retail", the attributes are product attributes generated - // by Cloud Retail. + // by Cloud Retail. It requires + // [UserEvent.product_details][google.cloud.retail.v2beta.UserEvent.product_details] + // is imported properly. map attributes = 2; } @@ -186,11 +193,15 @@ message CompleteQueryResponse { // [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id] // field is set and [UserEvent][google.cloud.retail.v2beta.UserEvent] is // imported. The recent searches satisfy the follow rules: + // // * They are ordered from latest to oldest. + // // * They are matched with // [CompleteQueryRequest.query][google.cloud.retail.v2beta.CompleteQueryRequest.query] // case insensitively. - // * They are transformed to lower cases. + // + // * They are transformed to lower case. + // // * They are UTF-8 safe. // // Recent searches are deduplicated. More recent searches will be reserved diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto index e5562227..2cd59be4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto @@ -54,7 +54,7 @@ message Control { } // Immutable. Fully qualified name - // projects/*/locations/global/catalogs/*/controls/* + // `projects/*/locations/global/catalogs/*/controls/*` string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Required. The human readable control display name. Used in Retail UI. diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto index 922c46f2..3ec62e6c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto @@ -96,7 +96,7 @@ service ControlService { // Request for CreateControl method. message CreateControlRequest { // Required. Full resource name of parent catalog. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } @@ -131,7 +131,7 @@ message UpdateControlRequest { // Request for DeleteControl method. message DeleteControlRequest { // Required. The resource name of the Control to delete. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Control" } @@ -141,7 +141,7 @@ message DeleteControlRequest { // Request for GetControl method. message GetControlRequest { // Required. The resource name of the Control to delete. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Control" } @@ -151,7 +151,7 @@ message GetControlRequest { // Request for ListControls method. message ListControlsRequest { // Required. The catalog resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto index 249f5011..77d921f4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto @@ -60,8 +60,11 @@ message ExportProductsResponse { // A sample of errors encountered while processing the request. repeated google.rpc.Status error_samples = 1; - // Echoes the destination for the complete errors in the request if set. + // This field is never set. ExportErrorsConfig errors_config = 2; + + // Output result indicating where the data were exported to. + OutputResult output_result = 3; } // Response of the ExportUserEventsRequest. If the long running @@ -71,7 +74,24 @@ message ExportUserEventsResponse { // A sample of errors encountered while processing the request. repeated google.rpc.Status error_samples = 1; - // Echoes the destination for the complete errors if this field was set in - // the request. + // This field is never set. ExportErrorsConfig errors_config = 2; + + // Output result indicating where the data were exported to. + OutputResult output_result = 3; +} + +// Output result. +message OutputResult { + // Export result in BigQuery. + repeated BigQueryOutputResult bigquery_result = 1; +} + +// A BigQuery output result. +message BigQueryOutputResult { + // The ID of a BigQuery Dataset. + string dataset_id = 1; + + // The ID of a BigQuery Table. + string table_id = 2; } diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto index c1390ab0..4e53ca63 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto @@ -217,11 +217,18 @@ message ImportProductsRequest { // [ReconciliationMode.INCREMENTAL][google.cloud.retail.v2beta.ImportProductsRequest.ReconciliationMode.INCREMENTAL]. ReconciliationMode reconciliation_mode = 5; - // Pub/Sub topic for receiving notification. If this field is set, + // Full Pub/Sub topic name for receiving notification. If this field is set, // when the import is finished, a notification will be sent to // specified Pub/Sub topic. The message data will be JSON string of a // [Operation][google.longrunning.Operation]. - // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. + // + // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has + // to be within the same project as + // [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent]. + // Make sure that both + // `cloud-retail-customer-data-access@system.gserviceaccount.com` and + // `service-@gcp-sa-retail.iam.gserviceaccount.com` + // have the `pubsub.topics.publish` IAM permission on the topic. // // Only supported when // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode] diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto index c5ec1871..e9128c14 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto @@ -19,6 +19,7 @@ package google.cloud.retail.v2beta; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/retail/v2beta/user_event.proto"; import "google/protobuf/struct.proto"; @@ -42,6 +43,10 @@ service PredictionService { option (google.api.http) = { post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:predict" body: "*" + additional_bindings { + post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:predict" + body: "*" + } }; } } @@ -49,20 +54,35 @@ service PredictionService { // Request message for Predict method. message PredictRequest { // Required. Full resource name of the format: - // {name=projects/*/locations/global/catalogs/default_catalog/placements/*} - // The ID of the Recommendations AI placement. Before you can request - // predictions from your model, you must create at least one placement for it. - // For more information, see [Managing - // placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). + // `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` + // or + // `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. + // We recommend using the `servingConfigs` resource. `placements` is a legacy + // resource. + // The ID of the Recommendations AI serving config or placement. + // Before you can request predictions from your model, you must create at + // least one serving config or placement for it. For more information, see + // [Managing serving configurations] + // (https://cloud.google.com/retail/docs/manage-configs). // - // The full list of available placements can be seen at - // https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + // The full list of available serving configs can be seen at + // https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs string placement = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Context about the user, what they are looking at and what action // they took to trigger the predict request. Note that this user event detail // won't be ingested to userEvent logs. Thus, a separate userEvent write // request is required for event logging. + // + // Don't set + // [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] or + // [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] to the same + // fixed ID for different users. If you are trying to receive non-personalized + // recommendations (not recommended; this can negatively impact model + // performance), instead set + // [UserEvent.visitor_id][google.cloud.retail.v2beta.UserEvent.visitor_id] to + // a random unique ID and leave + // [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset. UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; // Maximum number of results to return per page. Set this property @@ -71,7 +91,7 @@ message PredictRequest { // above 100 will be coerced to 100. int32 page_size = 3; - // The previous PredictResponse.next_page_token. + // This field is not used for now; leave it unset. string page_token = 4; // Filter for restricting prediction results with a length limit of 5,000 @@ -103,6 +123,14 @@ message PredictRequest { // receive empty results instead. // Note that the API will never return items with storageStatus of "EXPIRED" // or "DELETED" regardless of filter choices. + // + // If `filterSyntaxV2` is set to true under the `params` field, then + // attribute-based expressions are expected instead of the above described + // tag-based syntax. Examples: + // + // * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) + // * (availability: ANY("IN_STOCK")) AND + // (colors: ANY("Red") OR categories: ANY("Phones")) string filter = 5; // Use validate only mode for this prediction query. If set to true, a @@ -136,6 +164,8 @@ message PredictRequest { // 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives // request-level control and adjusts prediction results based on product // category. + // * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` + // field is interpreteted according to the new, attribute-based syntax. map params = 7; // The labels applied to a resource must meet the following requirements: @@ -143,7 +173,7 @@ message PredictRequest { // * Each resource can have multiple labels, up to a maximum of 64. // * Each label must be a key-value pair. // * Keys have a minimum length of 1 character and a maximum length of 63 - // characters, and cannot be empty. Values can be empty, and have a maximum + // characters and cannot be empty. Values can be empty and have a maximum // length of 63 characters. // * Keys and values can contain only lowercase letters, numeric characters, // underscores, and dashes. All characters must use UTF-8 encoding, and @@ -169,9 +199,9 @@ message PredictResponse { // // Possible values: // - // * `product`: JSON representation of the product. Will be set if + // * `product`: JSON representation of the product. Is set if // `returnProduct` is set to true in `PredictRequest.params`. - // * `score`: Prediction score in double value. Will be set if + // * `score`: Prediction score in double value. Is set if // `returnScore` is set to true in `PredictRequest.params`. map metadata = 2; } diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto index 4e6dfec8..9490e09f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto @@ -544,11 +544,11 @@ message Product { // * [name][google.cloud.retail.v2beta.Product.name] // * [color_info][google.cloud.retail.v2beta.Product.color_info] // - // Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is + // The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is // returned. // // Note: Returning more fields in - // [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase + // [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase // response payload size and serving latency. google.protobuf.FieldMask retrievable_fields = 30; diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto index 0ad73436..a9bfd965 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto @@ -88,7 +88,7 @@ service ProductService { // Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. // - // Request processing may be synchronous. No partial updating is supported. + // Request processing may be synchronous. // Non-existing items are created. // // Note that it is possible for a subset of the @@ -115,19 +115,21 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, updates are not immediately manifested in the // [Product][google.cloud.retail.v2beta.Product] queried by - // [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // // When inventory is updated with - // [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] // and - // [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], + // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], // the specified inventory field value(s) will overwrite any existing value(s) // while ignoring the last update time for this field. Furthermore, the last // update time for the specified inventory fields will be overwritten to the // time of the - // [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or - // [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + // or + // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] // request. // // If no inventory fields are set in @@ -139,10 +141,10 @@ service ProductService { // then any existing inventory information will be preserved. // // Pre-existing inventory information can only be updated with - // [SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], - // [AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], + // [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], + // [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], // and - // [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -167,8 +169,9 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, the added place IDs are not immediately manifested in the // [Product][google.cloud.retail.v2beta.Product] queried by - // [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -194,8 +197,9 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, the removed place IDs are not immediately manifested in the // [Product][google.cloud.retail.v2beta.Product] queried by - // [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. // Please enable Retail Search on Cloud Console before using this feature. @@ -222,13 +226,14 @@ service ProductService { // and processed downstream. As a consequence, when a response is returned, // updates are not immediately manifested in the // [Product][google.cloud.retail.v2beta.Product] queried by - // [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // // Local inventory information can only be modified using this method. - // [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] // and - // [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. @@ -254,13 +259,14 @@ service ProductService { // enqueued and processed downstream. As a consequence, when a response is // returned, removals are not immediately manifested in the // [Product][google.cloud.retail.v2beta.Product] queried by - // [GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or - // [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] + // or + // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. // // Local inventory information can only be removed using this method. - // [CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] + // [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] // and - // [UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. @@ -279,7 +285,9 @@ service ProductService { } } -// Request message for [CreateProduct][] method. +// Request message for +// [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] +// method. message CreateProductRequest { // Required. The parent catalog resource name, such as // `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. @@ -309,7 +317,9 @@ message CreateProductRequest { string product_id = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [GetProduct][] method. +// Request message for +// [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] +// method. message GetProductRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2beta.Product], such as @@ -327,7 +337,9 @@ message GetProductRequest { ]; } -// Request message for [UpdateProduct][] method. +// Request message for +// [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] +// method. message UpdateProductRequest { // Required. The product to update/create. // @@ -348,6 +360,11 @@ message UpdateProductRequest { // // If an unsupported or unknown field is provided, an INVALID_ARGUMENT error // is returned. + // + // The attribute key can be updated by setting the mask path as + // "attributes.${key_name}". If a key name is present in the mask but not in + // the patching product from the request, this key will be deleted after the + // update. google.protobuf.FieldMask update_mask = 2; // If set to true, and the [Product][google.cloud.retail.v2beta.Product] is @@ -356,7 +373,9 @@ message UpdateProductRequest { bool allow_missing = 3; } -// Request message for [DeleteProduct][] method. +// Request message for +// [ProductService.DeleteProduct][google.cloud.retail.v2beta.ProductService.DeleteProduct] +// method. message DeleteProductRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2beta.Product], such as @@ -488,10 +507,13 @@ message ListProductsResponse { string next_page_token = 2; } -// Request message for [SetInventory][] method. +// Request message for +// [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory] +// method. message SetInventoryRequest { // Required. The inventory information to update. The allowable fields to // update are: + // // * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] // * [Product.availability][google.cloud.retail.v2beta.Product.availability] // * [Product.available_quantity][google.cloud.retail.v2beta.Product.available_quantity] @@ -499,8 +521,9 @@ message SetInventoryRequest { // The updated inventory fields must be specified in // [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask]. // - // If [SetInventoryRequest.inventory.name][] is empty or invalid, an - // INVALID_ARGUMENT error is returned. + // If + // [SetInventoryRequest.inventory.name][google.cloud.retail.v2beta.Product.name] + // is empty or invalid, an INVALID_ARGUMENT error is returned. // // If the caller does not have permission to update the // [Product][google.cloud.retail.v2beta.Product] named in @@ -523,7 +546,8 @@ message SetInventoryRequest { // * Adds "fulfillment_info" in // [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] // * Specifies only the desired fulfillment types and corresponding place IDs - // to update in [SetInventoryRequest.inventory.fulfillment_info][] + // to update in + // [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] // // The caller can clear all place IDs from a subset of fulfillment types in // the following ways: @@ -531,9 +555,9 @@ message SetInventoryRequest { // * Adds "fulfillment_info" in // [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask] // * Specifies only the desired fulfillment types to clear in - // [SetInventoryRequest.inventory.fulfillment_info][] + // [SetInventoryRequest.inventory.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] // * Checks that only the desired fulfillment info types have empty - // [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + // [SetInventoryRequest.inventory.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids] // // The last update time is recorded for the following inventory fields: // * [Product.price_info][google.cloud.retail.v2beta.Product.price_info] @@ -542,7 +566,9 @@ message SetInventoryRequest { // * [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info] // // If a full overwrite of inventory information while ignoring timestamps is - // needed, [UpdateProduct][] should be invoked instead. + // needed, + // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] + // should be invoked instead. Product inventory = 1 [(google.api.field_behavior) = REQUIRED]; // Indicates which inventory fields in the provided @@ -570,15 +596,19 @@ message SetInventoryRequest { // Metadata related to the progress of the SetInventory operation. // Currently empty because there is no meaningful metadata populated from the -// [SetInventory][] method. +// [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory] +// method. message SetInventoryMetadata {} // Response of the SetInventoryRequest. Currently empty because -// there is no meaningful response populated from the [SetInventory][] +// there is no meaningful response populated from the +// [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory] // method. message SetInventoryResponse {} -// Request message for [AddFulfillmentPlaces][] method. +// Request message for +// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] +// method. message AddFulfillmentPlacesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2beta.Product], such as @@ -610,7 +640,8 @@ message AddFulfillmentPlacesRequest { // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // - // This field directly corresponds to [Product.fulfillment_info.type][]. + // This field directly corresponds to + // [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. string type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The IDs for this @@ -646,15 +677,19 @@ message AddFulfillmentPlacesRequest { // Metadata related to the progress of the AddFulfillmentPlaces operation. // Currently empty because there is no meaningful metadata populated from the -// [AddFulfillmentPlaces][] method. +// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] +// method. message AddFulfillmentPlacesMetadata {} // Response of the AddFulfillmentPlacesRequest. Currently empty because -// there is no meaningful response populated from the [AddFulfillmentPlaces][] +// there is no meaningful response populated from the +// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces] // method. message AddFulfillmentPlacesResponse {} -// Request message for [AddLocalInventories][] method. +// Request message for +// [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] +// method. message AddLocalInventoriesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2beta.Product], such as @@ -707,15 +742,21 @@ message AddLocalInventoriesRequest { // Metadata related to the progress of the AddLocalInventories operation. // Currently empty because there is no meaningful metadata populated from the -// [AddLocalInventories][] method. +// [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] +// method. message AddLocalInventoriesMetadata {} -// Response of the [AddLocalInventories][] API. Currently empty because -// there is no meaningful response populated from the [AddLocalInventories][] +// Response of the +// [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] +// API. Currently empty because there is no meaningful response populated from +// the +// [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] // method. message AddLocalInventoriesResponse {} -// Request message for [RemoveLocalInventories][] method. +// Request message for +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] +// method. message RemoveLocalInventoriesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2beta.Product], such as @@ -749,15 +790,21 @@ message RemoveLocalInventoriesRequest { // Metadata related to the progress of the RemoveLocalInventories operation. // Currently empty because there is no meaningful metadata populated from the -// [RemoveLocalInventories][] method. +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] +// method. message RemoveLocalInventoriesMetadata {} -// Response of the [RemoveLocalInventories][] API. Currently empty because -// there is no meaningful response populated from the [RemoveLocalInventories][] +// Response of the +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] +// API. Currently empty because there is no meaningful response populated from +// the +// [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] // method. message RemoveLocalInventoriesResponse {} -// Request message for [RemoveFulfillmentPlaces][] method. +// Request message for +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] +// method. message RemoveFulfillmentPlacesRequest { // Required. Full resource name of // [Product][google.cloud.retail.v2beta.Product], such as @@ -789,7 +836,8 @@ message RemoveFulfillmentPlacesRequest { // If this field is set to an invalid value other than these, an // INVALID_ARGUMENT error is returned. // - // This field directly corresponds to [Product.fulfillment_info.type][]. + // This field directly corresponds to + // [Product.fulfillment_info.type][google.cloud.retail.v2beta.FulfillmentInfo.type]. string type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The IDs for this @@ -820,10 +868,12 @@ message RemoveFulfillmentPlacesRequest { // Metadata related to the progress of the RemoveFulfillmentPlaces operation. // Currently empty because there is no meaningful metadata populated from the -// [RemoveFulfillmentPlaces][] method. +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] +// method. message RemoveFulfillmentPlacesMetadata {} // Response of the RemoveFulfillmentPlacesRequest. Currently empty because there -// is no meaningful response populated from the [RemoveFulfillmentPlaces][] +// is no meaningful response populated from the +// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces] // method. message RemoveFulfillmentPlacesResponse {} diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto index 5ab09aa3..25502cd7 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/purge_config.proto @@ -37,7 +37,10 @@ message PurgeUserEventsRequest { // Required. The resource name of the catalog under which the events are // created. The format is // `projects/${projectId}/locations/global/catalogs/${catalogId}` - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } + ]; // Required. The filter string to specify the events to be deleted with a // length limit of 5,000 characters. Empty string filter is not allowed. The diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto index b8b2156a..bf0764fd 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto @@ -51,6 +51,10 @@ service SearchService { option (google.api.http) = { post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" body: "*" + additional_bindings { + post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search" + body: "*" + } }; } } @@ -114,8 +118,8 @@ message SearchRequest { // Only get facet for the given restricted values. For example, when using // "pickupInStore" as key and set restricted values to // ["store123", "store456"], only facets for "store123" and "store456" are - // returned. Only supported on textual fields and fulfillments. - // Maximum is 20. + // returned. Only supported on predefined textual fields, custom textual + // attributes and fulfillments. Maximum is 20. // // Must be set for the fulfillment facet keys: // @@ -152,14 +156,22 @@ message SearchRequest { // Only supported on textual fields. Maximum is 10. repeated string contains = 9; - // The order in which [Facet.values][] are returned. + // True to make facet keys case insensitive when getting faceting + // values with prefixes or contains; false otherwise. + bool case_insensitive = 10; + + // The order in which + // [SearchResponse.Facet.values][google.cloud.retail.v2beta.SearchResponse.Facet.values] + // are returned. // // Allowed values are: // - // * "count desc", which means order by [Facet.FacetValue.count][] + // * "count desc", which means order by + // [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count] // descending. // - // * "value desc", which means order by [Facet.FacetValue.value][] + // * "value desc", which means order by + // [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value] // descending. // Only applies to textual facets. // @@ -181,9 +193,11 @@ message SearchRequest { // [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] // when query is specified. // - // In the response, [FacetValue.value][] will be always "1" and - // [FacetValue.count][] will be the number of results that matches the - // query. + // In the response, + // [SearchResponse.Facet.values.value][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.value] + // will be always "1" and + // [SearchResponse.Facet.values.count][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.count] + // will be the number of results that match the query. // // For example, you can set a customized facet for "shipToStore", // where @@ -194,6 +208,10 @@ message SearchRequest { // Then the facet will count the products that are both in stock and ship // to store "123". string query = 5; + + // Returns the min and max value for each numerical facet intervals. + // Ignored for textual facets. + bool return_min_max = 11; } // Required. The facet key specification. @@ -208,19 +226,29 @@ message SearchRequest { // List of keys to exclude when faceting. // + // // By default, // [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] // is not excluded from the filter unless it is listed in this field. // - // For example, suppose there are 100 products with color facet "Red" and - // 200 products with color facet "Blue". A query containing the filter - // "colorFamilies:ANY("Red")" and have "colorFamilies" as + // Listing a facet key in this field allows its values to appear as facet + // results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. + // + // For example, suppose there are 100 products with the color facet "Red" + // and 200 products with the color facet "Blue". A query containing the + // filter "colorFamilies:ANY("Red")" and having "colorFamilies" as // [FacetKey.key][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.key] - // will by default return the "Red" with count 100. + // would by default return only "Red" products in the search results, and + // also return "Red" with count 100 as the only color facet. Although there + // are also blue products available, "Blue" would not be shown as an + // available facet value. // - // If this field contains "colorFamilies", then the query returns both the - // "Red" with count 100 and "Blue" with count 200, because the - // "colorFamilies" key is now excluded from the filter. + // If "colorFamilies" is listed in "excludedFilterKeys", then the query + // returns the facet values "Red" with count 100 and "Blue" with count + // 200, because the "colorFamilies" key is now excluded from the filter. + // Because this field doesn't affect search results, the search results + // are still correctly filtered to return only "Red" products. // // A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error // is returned. @@ -319,7 +347,7 @@ message SearchRequest { // Condition boost specifications. If a product matches multiple conditions // in the specifictions, boost scores from these specifications are all // applied and combined in a non-linear way. Maximum number of - // specifications is 10. + // specifications is 20. repeated ConditionBoostSpec condition_boost_specs = 1; // Whether to skip boostspec validation. If this field is set to true, @@ -363,7 +391,7 @@ message SearchRequest { message PersonalizationSpec { // The personalization mode of each search request. enum Mode { - // Default value. Defaults to + // Default value. In this case, server behavior defaults to // [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO]. MODE_UNSPECIFIED = 0; @@ -379,6 +407,32 @@ message SearchRequest { Mode mode = 1; } + // The specification for query spell correction. + message SpellCorrectionSpec { + // Enum describing under which mode spell correction should occur. + enum Mode { + // Unspecified spell correction mode. In this case, server behavior + // defaults to + // [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + MODE_UNSPECIFIED = 0; + + // Google Retail Search will try to find a spell suggestion if there + // is any and put in the + // [SearchResponse.corrected_query][google.cloud.retail.v2beta.SearchResponse.corrected_query]. + // The spell suggestion will not be used as the search query. + SUGGESTION_ONLY = 1; + + // Automatic spell correction built by Google Retail Search. Search will + // be based on the corrected query if found. + AUTO = 2; + } + + // The mode under which spell correction should take effect to + // replace the original search query. Default to + // [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Mode mode = 1; + } + // The search mode of each search request. enum SearchMode { // Default value. In this case both product search and faceted search will @@ -400,7 +454,9 @@ message SearchRequest { // Only faceted search will be performed. The product search will be // disabled. // - // When in this mode, one or both of [SearchRequest.facet_spec][] and + // When in this mode, one or both of + // [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs] + // and // [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec] // should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only // [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult] @@ -408,8 +464,10 @@ message SearchRequest { FACETED_SEARCH_ONLY = 2; } - // Required. The resource name of the search engine placement, such as - // `projects/*/locations/global/catalogs/default_catalog/placements/default_search` + // Required. The resource name of the Retail Search serving config, such as + // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` + // or the name of the legacy placement resource, such as + // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. // This field is used to identify the serving configuration name and the set // of models that will be used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; @@ -424,6 +482,11 @@ message SearchRequest { ]; // Raw search query. + // + // If this field is empty, the request is considered a category browsing + // request and returned results are based on + // [filter][google.cloud.retail.v2beta.SearchRequest.filter] and + // [page_categories][google.cloud.retail.v2beta.SearchRequest.page_categories]. string query = 3; // Required. A unique identifier for tracking visitors. For example, this @@ -518,10 +581,11 @@ message SearchRequest { // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - // and [SearchRequest.boost_spec] are set, the boost conditions from both - // places are evaluated. If a search request matches multiple boost - // conditions, the final boost score is equal to the sum of the boost scores - // from all matched boost conditions. + // and + // [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + // are set, the boost conditions from both places are evaluated. If a search + // request matches multiple boost conditions, the final boost score is equal + // to the sum of the boost scores from all matched boost conditions. BoostSpec boost_spec = 13; // The query expansion specification that specifies the conditions under which @@ -556,7 +620,8 @@ message SearchRequest { // * inventory(place_id,price) // * inventory(place_id,original_price) // * inventory(place_id,attributes.key), where key is any key in the - // [Product.inventories.attributes][] map. + // [Product.local_inventories.attributes][google.cloud.retail.v2beta.LocalInventory.attributes] + // map. // * attributes.key, where key is any key in the // [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map. // * pickupInStore.id, where id is any @@ -620,6 +685,29 @@ message SearchRequest { // The specification for personalization. PersonalizationSpec personalization_spec = 32; + + // The labels applied to a resource must meet the following requirements: + // + // * Each resource can have multiple labels, up to a maximum of 64. + // * Each label must be a key-value pair. + // * Keys have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a maximum + // length of 63 characters. + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. All characters must use UTF-8 encoding, and + // international characters are allowed. + // * The key portion of a label must be unique. However, you can use the same + // key with multiple resources. + // * Keys must start with a lowercase letter or international character. + // + // See [Google Cloud + // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + map labels = 34; + + // The spell correction specification that specifies the mode under + // which spell correction will take effect. + optional SpellCorrectionSpec spell_correction_spec = 35; } // Response message for @@ -716,6 +804,20 @@ message SearchResponse { // Number of items that have this facet value. int64 count = 3; + + // The minimum value in the + // [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval]. + // Only supported on numerical facets and returned if + // [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max] + // is true. + double min_value = 5; + + // The maximum value in the + // [FacetValue.interval][google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.interval]. + // Only supported on numerical facets and returned if + // [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.return_min_max] + // is true. + double max_value = 6; } // The key for this facet. E.g., "colorFamilies" or "price" or @@ -755,7 +857,9 @@ message SearchResponse { // matches. int32 total_size = 3; - // If spell correction applies, the corrected query. Otherwise, empty. + // Contains the spell corrected query, if found. If the spell correction type + // is AUTOMATIC, then the search results are based on corrected_query. + // Otherwise the original query is used for search. string corrected_query = 4; // A unique search token. This should be included in the @@ -773,10 +877,10 @@ message SearchResponse { QueryExpansionInfo query_expansion_info = 7; // The URI of a customer-defined redirect page. If redirect action is - // triggered, no search will be performed, and only + // triggered, no search is performed, and only // [redirect_uri][google.cloud.retail.v2beta.SearchResponse.redirect_uri] and // [attribution_token][google.cloud.retail.v2beta.SearchResponse.attribution_token] - // will be set in the response. + // are set in the response. string redirect_uri = 10; // The fully qualified resource name of applied diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto index 20112e61..431a4a41 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto @@ -41,7 +41,7 @@ message ServingConfig { }; // Immutable. Fully qualified name - // projects/*/locations/global/catalogs/*/servingConfig/* + // `projects/*/locations/global/catalogs/*/servingConfig/*` string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Required. The human readable serving config display name. Used in Retail @@ -114,10 +114,11 @@ message ServingConfig { // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2beta.ServingConfig.boost_control_ids] - // and [SearchRequest.boost_spec] are set, the boost conditions from both - // places are evaluated. If a search request matches multiple boost - // conditions, the final boost score is equal to the sum of the boost scores - // from all matched boost conditions. + // and + // [SearchRequest.boost_spec][google.cloud.retail.v2beta.SearchRequest.boost_spec] + // are set, the boost conditions from both places are evaluated. If a search + // request matches multiple boost conditions, the final boost score is equal + // to the sum of the boost scores from all matched boost conditions. // // Can only be set if // [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types] diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto index e56c28ac..e2d5319a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto @@ -123,7 +123,7 @@ service ServingConfigService { // Request for CreateServingConfig method. message CreateServingConfigRequest { // Required. Full resource name of parent. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto index e2175801..06c8e64c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto +++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto @@ -54,11 +54,15 @@ message UserEvent { // able to uniquely identify a visitor on a single device. This unique // identifier should not change if the visitor log in/out of the website. // + // Don't set the field to the same fixed ID for different users. This mixes + // the event history of those users together, which results in degraded model + // quality. + // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an INVALID_ARGUMENT error is returned. // // The field should not contain PII or user-data. We recommend to use Google - // Analystics [Client + // Analytics [Client // ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) // for this field. string visitor_id = 2 [(google.api.field_behavior) = REQUIRED]; @@ -111,12 +115,11 @@ message UserEvent { // The main product details related to the event. // - // This field is required for the following event types: + // This field is optional except for the following event types: // // * `add-to-cart` // * `detail-page-view` // * `purchase-complete` - // * `search` // // In a `search` event, this field represents the products returned to the end // user on the current page (the end user may have not finished browsing the diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..976021b9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.ModelServiceSettings; +import com.google.cloud.retail.v2alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ModelServiceSettings modelServiceSettings = + ModelServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings); + } +} +// [END retail_v2alpha_generated_modelserviceclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..5c5cbb3c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.ModelServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ModelServiceSettings modelServiceSettings = + ModelServiceSettings.newBuilder() + .setTransportChannelProvider( + ModelServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings); + } +} +// [END retail_v2alpha_generated_modelserviceclient_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..93dbb902 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_create_setendpoint_sync] +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.ModelServiceSettings; +import com.google.cloud.retail.v2alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ModelServiceSettings modelServiceSettings = + ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings); + } +} +// [END retail_v2alpha_generated_modelserviceclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java new file mode 100644 index 00000000..4dc8f9fb --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java @@ -0,0 +1,49 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_createmodel_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateModel { + + public static void main(String[] args) throws Exception { + asyncCreateModel(); + } + + public static void asyncCreateModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + CreateModelRequest request = + CreateModelRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setModel(Model.newBuilder().build()) + .setDryRun(true) + .build(); + ApiFuture future = modelServiceClient.createModelCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_createmodel_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java new file mode 100644 index 00000000..ebe079ca --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java @@ -0,0 +1,50 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_createmodel_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.CreateModelMetadata; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class AsyncCreateModelLRO { + + public static void main(String[] args) throws Exception { + asyncCreateModelLRO(); + } + + public static void asyncCreateModelLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + CreateModelRequest request = + CreateModelRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setModel(Model.newBuilder().build()) + .setDryRun(true) + .build(); + OperationFuture future = + modelServiceClient.createModelOperationCallable().futureCall(request); + // Do something. + Model response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_createmodel_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java new file mode 100644 index 00000000..2787d070 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java @@ -0,0 +1,45 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_createmodel_sync] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.CreateModelRequest; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncCreateModel { + + public static void main(String[] args) throws Exception { + syncCreateModel(); + } + + public static void syncCreateModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + CreateModelRequest request = + CreateModelRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setModel(Model.newBuilder().build()) + .setDryRun(true) + .build(); + Model response = modelServiceClient.createModelAsync(request).get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_createmodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java new file mode 100644 index 00000000..002b7530 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java @@ -0,0 +1,40 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_createmodel_catalognamemodel_sync] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncCreateModelCatalognameModel { + + public static void main(String[] args) throws Exception { + syncCreateModelCatalognameModel(); + } + + public static void syncCreateModelCatalognameModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = Model.newBuilder().build(); + Model response = modelServiceClient.createModelAsync(parent, model).get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_createmodel_catalognamemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java new file mode 100644 index 00000000..78d6a18e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java @@ -0,0 +1,40 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_createmodel_stringmodel_sync] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncCreateModelStringModel { + + public static void main(String[] args) throws Exception { + syncCreateModelStringModel(); + } + + public static void syncCreateModelStringModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + Model model = Model.newBuilder().build(); + Model response = modelServiceClient.createModelAsync(parent, model).get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_createmodel_stringmodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java new file mode 100644 index 00000000..fb022955 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java @@ -0,0 +1,46 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_deletemodel_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.DeleteModelRequest; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteModel { + + public static void main(String[] args) throws Exception { + asyncDeleteModel(); + } + + public static void asyncDeleteModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + DeleteModelRequest request = + DeleteModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + ApiFuture future = modelServiceClient.deleteModelCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_deletemodel_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java new file mode 100644 index 00000000..cf35faa6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java @@ -0,0 +1,43 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_deletemodel_sync] +import com.google.cloud.retail.v2alpha.DeleteModelRequest; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteModel { + + public static void main(String[] args) throws Exception { + syncDeleteModel(); + } + + public static void syncDeleteModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + DeleteModelRequest request = + DeleteModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + modelServiceClient.deleteModel(request); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_deletemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java new file mode 100644 index 00000000..05d5ac22 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_deletemodel_modelname_sync] +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteModelModelname { + + public static void main(String[] args) throws Exception { + syncDeleteModelModelname(); + } + + public static void syncDeleteModelModelname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + modelServiceClient.deleteModel(name); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_deletemodel_modelname_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java new file mode 100644 index 00000000..7269c68e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_deletemodel_string_sync] +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteModelString { + + public static void main(String[] args) throws Exception { + syncDeleteModelString(); + } + + public static void syncDeleteModelString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString(); + modelServiceClient.deleteModel(name); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_deletemodel_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java new file mode 100644 index 00000000..5a781e55 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java @@ -0,0 +1,50 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_listmodels_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class AsyncListModels { + + public static void main(String[] args) throws Exception { + asyncListModels(); + } + + public static void asyncListModels() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ListModelsRequest request = + ListModelsRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = modelServiceClient.listModelsPagedCallable().futureCall(request); + // Do something. + for (Model element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_listmodels_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java new file mode 100644 index 00000000..ae62b932 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java @@ -0,0 +1,58 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_listmodels_paged_async] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.ListModelsResponse; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.common.base.Strings; + +public class AsyncListModelsPaged { + + public static void main(String[] args) throws Exception { + asyncListModelsPaged(); + } + + public static void asyncListModelsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ListModelsRequest request = + ListModelsRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListModelsResponse response = modelServiceClient.listModelsCallable().call(request); + for (Model element : response.getModelsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_listmodels_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java new file mode 100644 index 00000000..da76f259 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java @@ -0,0 +1,47 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_listmodels_sync] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.ListModelsRequest; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncListModels { + + public static void main(String[] args) throws Exception { + syncListModels(); + } + + public static void syncListModels() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ListModelsRequest request = + ListModelsRequest.newBuilder() + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Model element : modelServiceClient.listModels(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_listmodels_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java new file mode 100644 index 00000000..c59bbc7c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java @@ -0,0 +1,41 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_listmodels_catalogname_sync] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncListModelsCatalogname { + + public static void main(String[] args) throws Exception { + syncListModelsCatalogname(); + } + + public static void syncListModelsCatalogname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + for (Model element : modelServiceClient.listModels(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_listmodels_catalogname_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java new file mode 100644 index 00000000..9e2afe5a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java @@ -0,0 +1,41 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_listmodels_string_sync] +import com.google.cloud.retail.v2alpha.CatalogName; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncListModelsString { + + public static void main(String[] args) throws Exception { + syncListModelsString(); + } + + public static void syncListModelsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + for (Model element : modelServiceClient.listModels(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_listmodels_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java new file mode 100644 index 00000000..2041c08e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java @@ -0,0 +1,46 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_pausemodel_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.PauseModelRequest; + +public class AsyncPauseModel { + + public static void main(String[] args) throws Exception { + asyncPauseModel(); + } + + public static void asyncPauseModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + PauseModelRequest request = + PauseModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + ApiFuture future = modelServiceClient.pauseModelCallable().futureCall(request); + // Do something. + Model response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_pausemodel_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java new file mode 100644 index 00000000..3f098117 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java @@ -0,0 +1,43 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_pausemodel_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.PauseModelRequest; + +public class SyncPauseModel { + + public static void main(String[] args) throws Exception { + syncPauseModel(); + } + + public static void syncPauseModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + PauseModelRequest request = + PauseModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + Model response = modelServiceClient.pauseModel(request); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_pausemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java new file mode 100644 index 00000000..eb56cd19 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_pausemodel_modelname_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncPauseModelModelname { + + public static void main(String[] args) throws Exception { + syncPauseModelModelname(); + } + + public static void syncPauseModelModelname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + Model response = modelServiceClient.pauseModel(name); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_pausemodel_modelname_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java new file mode 100644 index 00000000..d65135a2 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_pausemodel_string_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncPauseModelString { + + public static void main(String[] args) throws Exception { + syncPauseModelString(); + } + + public static void syncPauseModelString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString(); + Model response = modelServiceClient.pauseModel(name); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_pausemodel_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java new file mode 100644 index 00000000..34bcfaff --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java @@ -0,0 +1,42 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_resumemodel_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.ResumeModelRequest; + +public class AsyncResumeModel { + + public static void main(String[] args) throws Exception { + asyncResumeModel(); + } + + public static void asyncResumeModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = modelServiceClient.resumeModelCallable().futureCall(request); + // Do something. + Model response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_resumemodel_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java new file mode 100644 index 00000000..f53ba8cd --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_resumemodel_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.ResumeModelRequest; + +public class SyncResumeModel { + + public static void main(String[] args) throws Exception { + syncResumeModel(); + } + + public static void syncResumeModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build(); + Model response = modelServiceClient.resumeModel(request); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_resumemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java new file mode 100644 index 00000000..351b7239 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java @@ -0,0 +1,38 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_resumemodel_string_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; + +public class SyncResumeModelString { + + public static void main(String[] args) throws Exception { + syncResumeModelString(); + } + + public static void syncResumeModelString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + String name = "name3373707"; + Model response = modelServiceClient.resumeModel(name); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_resumemodel_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java new file mode 100644 index 00000000..e0c7f13a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java @@ -0,0 +1,46 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_tunemodel_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.longrunning.Operation; + +public class AsyncTuneModel { + + public static void main(String[] args) throws Exception { + asyncTuneModel(); + } + + public static void asyncTuneModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + TuneModelRequest request = + TuneModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + ApiFuture future = modelServiceClient.tuneModelCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_tunemodel_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java new file mode 100644 index 00000000..278ca54d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java @@ -0,0 +1,48 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_tunemodel_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.TuneModelMetadata; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelResponse; + +public class AsyncTuneModelLRO { + + public static void main(String[] args) throws Exception { + asyncTuneModelLRO(); + } + + public static void asyncTuneModelLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + TuneModelRequest request = + TuneModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + OperationFuture future = + modelServiceClient.tuneModelOperationCallable().futureCall(request); + // Do something. + TuneModelResponse response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_tunemodel_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java new file mode 100644 index 00000000..9ae2171e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java @@ -0,0 +1,43 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_tunemodel_sync] +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.TuneModelRequest; +import com.google.cloud.retail.v2alpha.TuneModelResponse; + +public class SyncTuneModel { + + public static void main(String[] args) throws Exception { + syncTuneModel(); + } + + public static void syncTuneModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + TuneModelRequest request = + TuneModelRequest.newBuilder() + .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString()) + .build(); + TuneModelResponse response = modelServiceClient.tuneModelAsync(request).get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_tunemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java new file mode 100644 index 00000000..41191714 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_tunemodel_modelname_sync] +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.TuneModelResponse; + +public class SyncTuneModelModelname { + + public static void main(String[] args) throws Exception { + syncTuneModelModelname(); + } + + public static void syncTuneModelModelname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_tunemodel_modelname_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java new file mode 100644 index 00000000..5d5657dd --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java @@ -0,0 +1,39 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_tunemodel_string_sync] +import com.google.cloud.retail.v2alpha.ModelName; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.TuneModelResponse; + +public class SyncTuneModelString { + + public static void main(String[] args) throws Exception { + syncTuneModelString(); + } + + public static void syncTuneModelString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString(); + TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_tunemodel_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java new file mode 100644 index 00000000..ba9423d9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java @@ -0,0 +1,47 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_updatemodel_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.UpdateModelRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateModel { + + public static void main(String[] args) throws Exception { + asyncUpdateModel(); + } + + public static void asyncUpdateModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + UpdateModelRequest request = + UpdateModelRequest.newBuilder() + .setModel(Model.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = modelServiceClient.updateModelCallable().futureCall(request); + // Do something. + Model response = future.get(); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_updatemodel_async] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java new file mode 100644 index 00000000..5b769702 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java @@ -0,0 +1,44 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_updatemodel_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.cloud.retail.v2alpha.UpdateModelRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateModel { + + public static void main(String[] args) throws Exception { + syncUpdateModel(); + } + + public static void syncUpdateModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + UpdateModelRequest request = + UpdateModelRequest.newBuilder() + .setModel(Model.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Model response = modelServiceClient.updateModel(request); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_updatemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java new file mode 100644 index 00000000..e1b8a781 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java @@ -0,0 +1,40 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelserviceclient_updatemodel_modelfieldmask_sync] +import com.google.cloud.retail.v2alpha.Model; +import com.google.cloud.retail.v2alpha.ModelServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateModelModelFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateModelModelFieldmask(); + } + + public static void syncUpdateModelModelFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { + Model model = Model.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Model response = modelServiceClient.updateModel(model, updateMask); + } + } +} +// [END retail_v2alpha_generated_modelserviceclient_updatemodel_modelfieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java new file mode 100644 index 00000000..69de0ef5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java @@ -0,0 +1,45 @@ +/* + * 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.v2alpha.samples; + +// [START retail_v2alpha_generated_modelservicesettings_pausemodel_sync] +import com.google.cloud.retail.v2alpha.ModelServiceSettings; +import java.time.Duration; + +public class SyncPauseModel { + + public static void main(String[] args) throws Exception { + syncPauseModel(); + } + + public static void syncPauseModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder(); + modelServiceSettingsBuilder + .pauseModelSettings() + .setRetrySettings( + modelServiceSettingsBuilder + .pauseModelSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build(); + } +} +// [END retail_v2alpha_generated_modelservicesettings_pausemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java index ba69ccfc..c5c811a6 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java @@ -45,6 +45,7 @@ public static void asyncImportProducts() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); ApiFuture future = productServiceClient.importProductsCallable().futureCall(request); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java index 15032ed9..179b58f4 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java @@ -46,6 +46,7 @@ public static void asyncImportProductsLRO() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); OperationFuture future = productServiceClient.importProductsOperationCallable().futureCall(request); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java index 7717ec99..f7546a49 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java @@ -44,6 +44,7 @@ public static void syncImportProducts() throws Exception { .setErrorsConfig(ImportErrorsConfig.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") + .setSkipDefaultBranchProtection(true) .build(); ImportProductsResponse response = productServiceClient.importProductsAsync(request).get(); } diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java index 7792d93f..7caafa99 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java @@ -24,6 +24,7 @@ import com.google.cloud.retail.v2alpha.SearchServiceClient; import com.google.cloud.retail.v2alpha.UserInfo; import java.util.ArrayList; +import java.util.HashMap; public class AsyncSearch { @@ -56,6 +57,8 @@ public static void asyncSearch() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); ApiFuture future = searchServiceClient.searchPagedCallable().futureCall(request); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java index a5666a84..201ce319 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java @@ -24,6 +24,7 @@ import com.google.cloud.retail.v2alpha.UserInfo; import com.google.common.base.Strings; import java.util.ArrayList; +import java.util.HashMap; public class AsyncSearchPaged { @@ -56,6 +57,8 @@ public static void asyncSearchPaged() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); while (true) { SearchResponse response = searchServiceClient.searchCallable().call(request); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java index 38878c99..54e88cd1 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java @@ -23,6 +23,7 @@ import com.google.cloud.retail.v2alpha.SearchServiceClient; import com.google.cloud.retail.v2alpha.UserInfo; import java.util.ArrayList; +import java.util.HashMap; public class SyncSearch { @@ -55,6 +56,8 @@ public static void syncSearch() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { // doThingsWith(element); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java new file mode 100644 index 00000000..029ec71e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java @@ -0,0 +1,46 @@ +/* + * 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.v2alpha.stub.samples; + +// [START retail_v2alpha_generated_modelservicestubsettings_pausemodel_sync] +import com.google.cloud.retail.v2alpha.stub.ModelServiceStubSettings; +import java.time.Duration; + +public class SyncPauseModel { + + public static void main(String[] args) throws Exception { + syncPauseModel(); + } + + public static void syncPauseModel() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ModelServiceStubSettings.Builder modelServiceSettingsBuilder = + ModelServiceStubSettings.newBuilder(); + modelServiceSettingsBuilder + .pauseModelSettings() + .setRetrySettings( + modelServiceSettingsBuilder + .pauseModelSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build(); + } +} +// [END retail_v2alpha_generated_modelservicestubsettings_pausemodel_sync] diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java index 1f9badbb..baf2a1f8 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java @@ -18,6 +18,7 @@ // [START retail_v2alpha_generated_usereventserviceclient_purgeuserevents_async] import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2alpha.CatalogName; import com.google.cloud.retail.v2alpha.PurgeUserEventsRequest; import com.google.cloud.retail.v2alpha.UserEventServiceClient; import com.google.longrunning.Operation; @@ -34,7 +35,7 @@ public static void asyncPurgeUserEvents() throws Exception { try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java index 74cdb4bd..64d94356 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java @@ -18,6 +18,7 @@ // [START retail_v2alpha_generated_usereventserviceclient_purgeuserevents_lro_async] import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2alpha.CatalogName; import com.google.cloud.retail.v2alpha.PurgeMetadata; import com.google.cloud.retail.v2alpha.PurgeUserEventsRequest; import com.google.cloud.retail.v2alpha.PurgeUserEventsResponse; @@ -35,7 +36,7 @@ public static void asyncPurgeUserEventsLRO() throws Exception { try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java index f2cba1ff..5c541ff4 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java @@ -17,6 +17,7 @@ package com.google.cloud.retail.v2alpha.samples; // [START retail_v2alpha_generated_usereventserviceclient_purgeuserevents_sync] +import com.google.cloud.retail.v2alpha.CatalogName; import com.google.cloud.retail.v2alpha.PurgeUserEventsRequest; import com.google.cloud.retail.v2alpha.PurgeUserEventsResponse; import com.google.cloud.retail.v2alpha.UserEventServiceClient; @@ -33,7 +34,7 @@ public static void syncPurgeUserEvents() throws Exception { try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java index 8e9c16ec..ba06b401 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java @@ -24,6 +24,7 @@ import com.google.cloud.retail.v2beta.SearchServiceClient; import com.google.cloud.retail.v2beta.UserInfo; import java.util.ArrayList; +import java.util.HashMap; public class AsyncSearch { @@ -56,6 +57,8 @@ public static void asyncSearch() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); ApiFuture future = searchServiceClient.searchPagedCallable().futureCall(request); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java index 48cdb363..9d8652c4 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java @@ -24,6 +24,7 @@ import com.google.cloud.retail.v2beta.UserInfo; import com.google.common.base.Strings; import java.util.ArrayList; +import java.util.HashMap; public class AsyncSearchPaged { @@ -56,6 +57,8 @@ public static void asyncSearchPaged() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); while (true) { SearchResponse response = searchServiceClient.searchCallable().call(request); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java index f2fc2b9d..f7ad37da 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java @@ -23,6 +23,7 @@ import com.google.cloud.retail.v2beta.SearchServiceClient; import com.google.cloud.retail.v2beta.UserInfo; import java.util.ArrayList; +import java.util.HashMap; public class SyncSearch { @@ -55,6 +56,8 @@ public static void syncSearch() throws Exception { .addAllVariantRollupKeys(new ArrayList()) .addAllPageCategories(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .putAllLabels(new HashMap()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) .build(); for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { // doThingsWith(element); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java index 2993e355..9dc6f7a3 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java @@ -18,6 +18,7 @@ // [START retail_v2beta_generated_usereventserviceclient_purgeuserevents_async] import com.google.api.core.ApiFuture; +import com.google.cloud.retail.v2beta.CatalogName; import com.google.cloud.retail.v2beta.PurgeUserEventsRequest; import com.google.cloud.retail.v2beta.UserEventServiceClient; import com.google.longrunning.Operation; @@ -34,7 +35,7 @@ public static void asyncPurgeUserEvents() throws Exception { try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java index 0c3327b1..180af8ec 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java @@ -18,6 +18,7 @@ // [START retail_v2beta_generated_usereventserviceclient_purgeuserevents_lro_async] import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.retail.v2beta.CatalogName; import com.google.cloud.retail.v2beta.PurgeMetadata; import com.google.cloud.retail.v2beta.PurgeUserEventsRequest; import com.google.cloud.retail.v2beta.PurgeUserEventsResponse; @@ -35,7 +36,7 @@ public static void asyncPurgeUserEventsLRO() throws Exception { try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build(); diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java index a0beff68..8cc81694 100644 --- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java +++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java @@ -17,6 +17,7 @@ package com.google.cloud.retail.v2beta.samples; // [START retail_v2beta_generated_usereventserviceclient_purgeuserevents_sync] +import com.google.cloud.retail.v2beta.CatalogName; import com.google.cloud.retail.v2beta.PurgeUserEventsRequest; import com.google.cloud.retail.v2beta.PurgeUserEventsResponse; import com.google.cloud.retail.v2beta.UserEventServiceClient; @@ -33,7 +34,7 @@ public static void syncPurgeUserEvents() throws Exception { try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { PurgeUserEventsRequest request = PurgeUserEventsRequest.newBuilder() - .setParent("parent-995424086") + .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) .setFilter("filter-1274492040") .setForce(true) .build();