From a54f6b9df485ca95e3ca210e613f8792e69f4014 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 7 Apr 2023 23:55:58 +0000 Subject: [PATCH] feat: add model service feat: support per-entity search and autocomplete feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675951 Source-Link: https://github.com/googleapis/googleapis/commit/f149e910044225637c9c0a02d9c0672d6d490d8c Source-Link: https://github.com/googleapis/googleapis-gen/commit/c4538a888d2ec13ce719c1a1aa9dc7de5b17375a Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUmV0YWlsLlYyLy5Pd2xCb3QueWFtbCIsImgiOiJjNDUzOGE4ODhkMmVjMTNjZTcxOWMxYTFhYTlkYzdkZTViMTczNzVhIn0= --- ...ompleteQueryRequestObjectAsyncSnippet.g.cs | 1 + ...ent.CompleteQueryRequestObjectSnippet.g.cs | 1 + ...ServiceClient.CreateModelAsyncSnippet.g.cs | 62 + ....CreateModelRequestObjectAsyncSnippet.g.cs | 66 + ...lient.CreateModelRequestObjectSnippet.g.cs | 65 + ....CreateModelResourceNamesAsyncSnippet.g.cs | 62 + ...lient.CreateModelResourceNamesSnippet.g.cs | 61 + ...ModelServiceClient.CreateModelSnippet.g.cs | 61 + ...ServiceClient.DeleteModelAsyncSnippet.g.cs | 44 + ....DeleteModelRequestObjectAsyncSnippet.g.cs | 47 + ...lient.DeleteModelRequestObjectSnippet.g.cs | 46 + ....DeleteModelResourceNamesAsyncSnippet.g.cs | 44 + ...lient.DeleteModelResourceNamesSnippet.g.cs | 43 + ...ModelServiceClient.DeleteModelSnippet.g.cs | 43 + ...delServiceClient.GetModelAsyncSnippet.g.cs | 44 + ...ent.GetModelRequestObjectAsyncSnippet.g.cs | 47 + ...ceClient.GetModelRequestObjectSnippet.g.cs | 46 + ...ent.GetModelResourceNamesAsyncSnippet.g.cs | 44 + ...ceClient.GetModelResourceNamesSnippet.g.cs | 43 + .../ModelServiceClient.GetModelSnippet.g.cs | 43 + ...lServiceClient.ListModelsAsyncSnippet.g.cs | 79 + ...t.ListModelsRequestObjectAsyncSnippet.g.cs | 82 + ...Client.ListModelsRequestObjectSnippet.g.cs | 80 + ...t.ListModelsResourceNamesAsyncSnippet.g.cs | 79 + ...Client.ListModelsResourceNamesSnippet.g.cs | 77 + .../ModelServiceClient.ListModelsSnippet.g.cs | 77 + ...lServiceClient.PauseModelAsyncSnippet.g.cs | 44 + ...t.PauseModelRequestObjectAsyncSnippet.g.cs | 47 + ...Client.PauseModelRequestObjectSnippet.g.cs | 46 + ...t.PauseModelResourceNamesAsyncSnippet.g.cs | 44 + ...Client.PauseModelResourceNamesSnippet.g.cs | 43 + .../ModelServiceClient.PauseModelSnippet.g.cs | 43 + ...ServiceClient.ResumeModelAsyncSnippet.g.cs | 44 + ....ResumeModelRequestObjectAsyncSnippet.g.cs | 44 + ...lient.ResumeModelRequestObjectSnippet.g.cs | 43 + ...ModelServiceClient.ResumeModelSnippet.g.cs | 43 + ...elServiceClient.TuneModelAsyncSnippet.g.cs | 61 + ...nt.TuneModelRequestObjectAsyncSnippet.g.cs | 64 + ...eClient.TuneModelRequestObjectSnippet.g.cs | 63 + ...nt.TuneModelResourceNamesAsyncSnippet.g.cs | 61 + ...eClient.TuneModelResourceNamesSnippet.g.cs | 60 + .../ModelServiceClient.TuneModelSnippet.g.cs | 60 + ...ServiceClient.UpdateModelAsyncSnippet.g.cs | 46 + ....UpdateModelRequestObjectAsyncSnippet.g.cs | 49 + ...lient.UpdateModelRequestObjectSnippet.g.cs | 48 + ...ModelServiceClient.UpdateModelSnippet.g.cs | 45 + ...lient.SearchRequestObjectAsyncSnippet.g.cs | 1 + ...viceClient.SearchRequestObjectSnippet.g.cs | 1 + ...ippet_metadata_google.cloud.retail.v2.json | 2175 ++++++++++++- .../CompletionServiceClientSnippets.g.cs | 2 + .../ModelServiceClientSnippets.g.cs | 1058 +++++++ .../SearchServiceClientSnippets.g.cs | 2 + .../Google.Cloud.Retail.V2/Catalog.g.cs | 17 +- .../Google.Cloud.Retail.V2/Common.g.cs | 44 +- .../CompletionService.g.cs | 113 +- .../CompletionServiceClient.g.cs | 4 +- .../CompletionServiceGrpc.g.cs | 2 +- .../Google.Cloud.Retail.V2/ImportConfig.g.cs | 2 +- .../Google.Cloud.Retail.V2/Model.g.cs | 1172 +++++++ .../ModelResourceNames.g.cs | 283 ++ .../Google.Cloud.Retail.V2/ModelService.g.cs | 2699 +++++++++++++++++ .../ModelServiceClient.g.cs | 1744 +++++++++++ .../ModelServiceGrpc.g.cs | 743 +++++ .../ModelServiceResourceNames.g.cs | 93 + .../PackageApiMetadata.g.cs | 2 + .../PredictionService.g.cs | 3 + .../Google.Cloud.Retail.V2/Product.g.cs | 5 +- .../ProductServiceClient.g.cs | 332 +- .../ProductServiceGrpc.g.cs | 155 +- .../Google.Cloud.Retail.V2/SearchService.g.cs | 792 ++++- .../SearchServiceResourceNames.g.cs | 272 ++ .../ServiceCollectionExtensions.g.cs | 16 + .../Google.Cloud.Retail.V2/ServingConfig.g.cs | 6 +- .../Google.Cloud.Retail.V2/UserEvent.g.cs | 78 +- .../UserEventService.g.cs | 2 +- .../gapic_metadata.json | 57 + 76 files changed, 13861 insertions(+), 399 deletions(-) create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/ModelServiceClientSnippets.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Model.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelResourceNames.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelService.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceClient.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceGrpc.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceResourceNames.g.cs diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectAsyncSnippet.g.cs index 151c91cfb8ee..c0d13e6435cb 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectAsyncSnippet.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectAsyncSnippet.g.cs @@ -44,6 +44,7 @@ public async Task CompleteQueryRequestObjectAsync() MaxSuggestions = 0, Dataset = "", VisitorId = "", + Entity = "", }; // Make the request CompleteQueryResponse response = await completionServiceClient.CompleteQueryAsync(request); diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectSnippet.g.cs index acad6d82f9c0..9be6424cf0b7 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectSnippet.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/CompletionServiceClient.CompleteQueryRequestObjectSnippet.g.cs @@ -43,6 +43,7 @@ public void CompleteQueryRequestObject() MaxSuggestions = 0, Dataset = "", VisitorId = "", + Entity = "", }; // Make the request CompleteQueryResponse response = completionServiceClient.CompleteQuery(request); diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..d84283fc7165 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelAsyncSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_CreateModel_async_flattened] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for CreateModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CreateModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + Model model = new Model(); + // Make the request + Operation response = await modelServiceClient.CreateModelAsync(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceCreateModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_CreateModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..91cbd3c094eb --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_CreateModel_async] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for CreateModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CreateModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + CreateModelRequest request = new CreateModelRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Model = new Model(), + DryRun = false, + }; + // Make the request + Operation response = await modelServiceClient.CreateModelAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceCreateModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_CreateModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..fe7186957ebb --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelRequestObjectSnippet.g.cs @@ -0,0 +1,65 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_CreateModel_sync] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for CreateModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CreateModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + CreateModelRequest request = new CreateModelRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Model = new Model(), + DryRun = false, + }; + // Make the request + Operation response = modelServiceClient.CreateModel(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceCreateModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_CreateModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..54dad8ef4302 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_CreateModel_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for CreateModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task CreateModelResourceNamesAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = new Model(); + // Make the request + Operation response = await modelServiceClient.CreateModelAsync(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceCreateModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_CreateModel_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..0ffc672b0dfe --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelResourceNamesSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_CreateModel_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for CreateModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CreateModelResourceNames() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = new Model(); + // Make the request + Operation response = modelServiceClient.CreateModel(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceCreateModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_CreateModel_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelSnippet.g.cs new file mode 100644 index 000000000000..f53fca7f9987 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.CreateModelSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_CreateModel_sync_flattened] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for CreateModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void CreateModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + Model model = new Model(); + // Make the request + Operation response = modelServiceClient.CreateModel(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceCreateModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_CreateModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..b70bba3b33bc --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_DeleteModel_async_flattened] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for DeleteModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task DeleteModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + await modelServiceClient.DeleteModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_DeleteModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..51198b07a52b --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_DeleteModel_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for DeleteModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task DeleteModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + DeleteModelRequest request = new DeleteModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + await modelServiceClient.DeleteModelAsync(request); + } + } + // [END retail_v2_generated_ModelService_DeleteModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..42c69f3116df --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_DeleteModel_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for DeleteModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void DeleteModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + DeleteModelRequest request = new DeleteModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + modelServiceClient.DeleteModel(request); + } + } + // [END retail_v2_generated_ModelService_DeleteModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..914f5171cafc --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_DeleteModel_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for DeleteModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task DeleteModelResourceNamesAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + await modelServiceClient.DeleteModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_DeleteModel_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..841e190bad0a --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_DeleteModel_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for DeleteModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void DeleteModelResourceNames() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + modelServiceClient.DeleteModel(name); + } + } + // [END retail_v2_generated_ModelService_DeleteModel_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelSnippet.g.cs new file mode 100644 index 000000000000..f0b4979279b9 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.DeleteModelSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_DeleteModel_sync_flattened] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for DeleteModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void DeleteModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + modelServiceClient.DeleteModel(name); + } + } + // [END retail_v2_generated_ModelService_DeleteModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..964e052dd8e4 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_GetModel_async_flattened] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for GetModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = await modelServiceClient.GetModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_GetModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..19023be52ce4 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_GetModel_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for GetModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + GetModelRequest request = new GetModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = await modelServiceClient.GetModelAsync(request); + } + } + // [END retail_v2_generated_ModelService_GetModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..c3557473b678 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_GetModel_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for GetModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + GetModelRequest request = new GetModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = modelServiceClient.GetModel(request); + } + } + // [END retail_v2_generated_ModelService_GetModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..7fc63f2c7a3b --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_GetModel_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for GetModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetModelResourceNamesAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = await modelServiceClient.GetModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_GetModel_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..182e67b72890 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_GetModel_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for GetModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetModelResourceNames() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = modelServiceClient.GetModel(name); + } + } + // [END retail_v2_generated_ModelService_GetModel_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelSnippet.g.cs new file mode 100644 index 000000000000..a63769f443f5 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.GetModelSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_GetModel_sync_flattened] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for GetModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = modelServiceClient.GetModel(name); + } + } + // [END retail_v2_generated_ModelService_GetModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsAsyncSnippet.g.cs new file mode 100644 index 000000000000..b748a2b4cfe8 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ListModels_async_flattened] + using Google.Api.Gax; + using Google.Cloud.Retail.V2; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ListModelsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListModelsAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + PagedAsyncEnumerable response = modelServiceClient.ListModelsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Model item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListModelsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END retail_v2_generated_ModelService_ListModels_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..f30c7127a584 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,82 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ListModels_async] + using Google.Api.Gax; + using Google.Cloud.Retail.V2; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ListModelsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListModelsRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ListModelsRequest request = new ListModelsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + PagedAsyncEnumerable response = modelServiceClient.ListModelsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Model item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListModelsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END retail_v2_generated_ModelService_ListModels_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..a5f264cba479 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsRequestObjectSnippet.g.cs @@ -0,0 +1,80 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ListModels_sync] + using Google.Api.Gax; + using Google.Cloud.Retail.V2; + using System; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ListModels + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListModelsRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ListModelsRequest request = new ListModelsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + PagedEnumerable response = modelServiceClient.ListModels(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Model item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListModelsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END retail_v2_generated_ModelService_ListModels_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..adebcf87f198 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ListModels_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.Retail.V2; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ListModelsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListModelsResourceNamesAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + PagedAsyncEnumerable response = modelServiceClient.ListModelsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Model item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListModelsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END retail_v2_generated_ModelService_ListModels_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..457e3fbd5035 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsResourceNamesSnippet.g.cs @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ListModels_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.Retail.V2; + using System; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ListModels + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListModelsResourceNames() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + PagedEnumerable response = modelServiceClient.ListModels(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Model item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListModelsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END retail_v2_generated_ModelService_ListModels_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsSnippet.g.cs new file mode 100644 index 000000000000..19f163f562bb --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ListModelsSnippet.g.cs @@ -0,0 +1,77 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ListModels_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.Retail.V2; + using System; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ListModels + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListModels() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + PagedEnumerable response = modelServiceClient.ListModels(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Model item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListModelsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END retail_v2_generated_ModelService_ListModels_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..6425f8cf93a8 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_PauseModel_async_flattened] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for PauseModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task PauseModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = await modelServiceClient.PauseModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_PauseModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..8e29732382e2 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_PauseModel_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for PauseModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task PauseModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + PauseModelRequest request = new PauseModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = await modelServiceClient.PauseModelAsync(request); + } + } + // [END retail_v2_generated_ModelService_PauseModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..71dcca8d76bc --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_PauseModel_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for PauseModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void PauseModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + PauseModelRequest request = new PauseModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = modelServiceClient.PauseModel(request); + } + } + // [END retail_v2_generated_ModelService_PauseModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..6ef79cbb6e32 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_PauseModel_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for PauseModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task PauseModelResourceNamesAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = await modelServiceClient.PauseModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_PauseModel_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..3196a3a006f7 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_PauseModel_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for PauseModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void PauseModelResourceNames() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = modelServiceClient.PauseModel(name); + } + } + // [END retail_v2_generated_ModelService_PauseModel_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelSnippet.g.cs new file mode 100644 index 000000000000..165976626141 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.PauseModelSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_PauseModel_sync_flattened] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for PauseModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void PauseModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = modelServiceClient.PauseModel(name); + } + } + // [END retail_v2_generated_ModelService_PauseModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..27a7fa78934f --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ResumeModel_async_flattened] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ResumeModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ResumeModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = ""; + // Make the request + Model response = await modelServiceClient.ResumeModelAsync(name); + } + } + // [END retail_v2_generated_ModelService_ResumeModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..632d23ad3b7a --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ResumeModel_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ResumeModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ResumeModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ResumeModelRequest request = new ResumeModelRequest { Name = "", }; + // Make the request + Model response = await modelServiceClient.ResumeModelAsync(request); + } + } + // [END retail_v2_generated_ModelService_ResumeModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..019075a556b6 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelRequestObjectSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ResumeModel_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ResumeModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ResumeModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ResumeModelRequest request = new ResumeModelRequest { Name = "", }; + // Make the request + Model response = modelServiceClient.ResumeModel(request); + } + } + // [END retail_v2_generated_ModelService_ResumeModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelSnippet.g.cs new file mode 100644 index 000000000000..9ff2aa288d66 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.ResumeModelSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_ResumeModel_sync_flattened] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for ResumeModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ResumeModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = ""; + // Make the request + Model response = modelServiceClient.ResumeModel(name); + } + } + // [END retail_v2_generated_ModelService_ResumeModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..bf8f253464e1 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelAsyncSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_TuneModel_async_flattened] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for TuneModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task TuneModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Operation response = await modelServiceClient.TuneModelAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceTuneModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_TuneModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..b01496910c07 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,64 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_TuneModel_async] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for TuneModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task TuneModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + TuneModelRequest request = new TuneModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Operation response = await modelServiceClient.TuneModelAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceTuneModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_TuneModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..c162029db30b --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelRequestObjectSnippet.g.cs @@ -0,0 +1,63 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_TuneModel_sync] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for TuneModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void TuneModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + TuneModelRequest request = new TuneModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Operation response = modelServiceClient.TuneModel(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceTuneModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_TuneModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..be3da0ac875c --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_TuneModel_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for TuneModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task TuneModelResourceNamesAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Operation response = await modelServiceClient.TuneModelAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceTuneModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_TuneModel_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..8a28f8efc9f6 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelResourceNamesSnippet.g.cs @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_TuneModel_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for TuneModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void TuneModelResourceNames() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Operation response = modelServiceClient.TuneModel(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceTuneModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_TuneModel_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelSnippet.g.cs new file mode 100644 index 000000000000..365e9019c44b --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.TuneModelSnippet.g.cs @@ -0,0 +1,60 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_TuneModel_sync_flattened] + using Google.Cloud.Retail.V2; + using Google.LongRunning; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for TuneModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void TuneModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Operation response = modelServiceClient.TuneModel(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceTuneModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END retail_v2_generated_ModelService_TuneModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelAsyncSnippet.g.cs new file mode 100644 index 000000000000..ac93a682c954 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_UpdateModel_async_flattened] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for UpdateModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task UpdateModelAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + Model model = new Model(); + FieldMask updateMask = new FieldMask(); + // Make the request + Model response = await modelServiceClient.UpdateModelAsync(model, updateMask); + } + } + // [END retail_v2_generated_ModelService_UpdateModel_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..0ebacd0a7800 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_UpdateModel_async] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for UpdateModelAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task UpdateModelRequestObjectAsync() + { + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateModelRequest request = new UpdateModelRequest + { + Model = new Model(), + UpdateMask = new FieldMask(), + }; + // Make the request + Model response = await modelServiceClient.UpdateModelAsync(request); + } + } + // [END retail_v2_generated_ModelService_UpdateModel_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..150bd68f37cc --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_UpdateModel_sync] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for UpdateModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void UpdateModelRequestObject() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + UpdateModelRequest request = new UpdateModelRequest + { + Model = new Model(), + UpdateMask = new FieldMask(), + }; + // Make the request + Model response = modelServiceClient.UpdateModel(request); + } + } + // [END retail_v2_generated_ModelService_UpdateModel_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelSnippet.g.cs new file mode 100644 index 000000000000..1cef1d909728 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/ModelServiceClient.UpdateModelSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + // [START retail_v2_generated_ModelService_UpdateModel_sync_flattened] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedModelServiceClientSnippets + { + /// Snippet for UpdateModel + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/in-range values for request initialization. + /// - It may require specifying regional endpoints when creating the service client as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void UpdateModel() + { + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + Model model = new Model(); + FieldMask updateMask = new FieldMask(); + // Make the request + Model response = modelServiceClient.UpdateModel(model, updateMask); + } + } + // [END retail_v2_generated_ModelService_UpdateModel_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectAsyncSnippet.g.cs index 3bc09a2f744f..2b2f67230115 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectAsyncSnippet.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectAsyncSnippet.g.cs @@ -61,6 +61,7 @@ public async Task SearchRequestObjectAsync() PersonalizationSpec = new SearchRequest.Types.PersonalizationSpec(), Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), + Entity = "", }; // Make the request PagedAsyncEnumerable response = searchServiceClient.SearchAsync(request); diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectSnippet.g.cs index e752e425daa8..36defa84b8a9 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectSnippet.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/SearchServiceClient.SearchRequestObjectSnippet.g.cs @@ -59,6 +59,7 @@ public void SearchRequestObject() PersonalizationSpec = new SearchRequest.Types.PersonalizationSpec(), Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), + Entity = "", }; // Make the request PagedEnumerable response = searchServiceClient.Search(request); diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/snippet_metadata_google.cloud.retail.v2.json b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/snippet_metadata_google.cloud.retail.v2.json index 2bfd3d475071..4c9bf2f78d24 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/snippet_metadata_google.cloud.retail.v2.json +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/snippet_metadata_google.cloud.retail.v2.json @@ -2403,12 +2403,12 @@ "segments": [ { "start": 20, - "end": 50, + "end": 51, "type": "FULL" }, { "start": 34, - "end": 48, + "end": 49, "type": "SHORT" } ] @@ -2452,12 +2452,12 @@ "segments": [ { "start": 20, - "end": 51, + "end": 52, "type": "FULL" }, { "start": 35, - "end": 49, + "end": 50, "type": "SHORT" } ] @@ -3968,6 +3968,2165 @@ } ] }, + { + "regionTag": "retail_v2_generated_ModelService_CreateModel_sync", + "title": "CreateModelRequestObject", + "description": "Snippet for CreateModel", + "file": "ModelServiceClient.CreateModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.CreateModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CreateModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "CreateModel", + "fullName": "google.cloud.retail.v2.ModelService.CreateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 63, + "type": "FULL" + }, + { + "start": 35, + "end": 61, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_CreateModel_async", + "title": "CreateModelRequestObjectAsync", + "description": "Snippet for CreateModelAsync", + "file": "ModelServiceClient.CreateModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.CreateModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CreateModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "CreateModel", + "fullName": "google.cloud.retail.v2.ModelService.CreateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 64, + "type": "FULL" + }, + { + "start": 36, + "end": 62, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_CreateModel_sync_flattened", + "title": "CreateModel", + "description": "Snippet for CreateModel", + "file": "ModelServiceClient.CreateModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.CreateModel", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Retail.V2.Model", + "name": "model" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "CreateModel", + "fullName": "google.cloud.retail.v2.ModelService.CreateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 35, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_CreateModel_async_flattened", + "title": "CreateModelAsync", + "description": "Snippet for CreateModelAsync", + "file": "ModelServiceClient.CreateModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.CreateModelAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Cloud.Retail.V2.Model", + "name": "model" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "CreateModel", + "fullName": "google.cloud.retail.v2.ModelService.CreateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 36, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_CreateModel_sync_flattened_resourceNames", + "title": "CreateModelResourceNames", + "description": "Snippet for CreateModel", + "file": "ModelServiceClient.CreateModelResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.CreateModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "Google.Cloud.Retail.V2.Model", + "name": "model" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "CreateModel", + "fullName": "google.cloud.retail.v2.ModelService.CreateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 35, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_CreateModel_async_flattened_resourceNames", + "title": "CreateModelResourceNamesAsync", + "description": "Snippet for CreateModelAsync", + "file": "ModelServiceClient.CreateModelResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "CreateModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.CreateModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "Google.Cloud.Retail.V2.Model", + "name": "model" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "CreateModel", + "fullName": "google.cloud.retail.v2.ModelService.CreateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 60, + "type": "FULL" + }, + { + "start": 36, + "end": 58, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_GetModel_sync", + "title": "GetModelRequestObject", + "description": "Snippet for GetModel", + "file": "ModelServiceClient.GetModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.GetModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GetModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.cloud.retail.v2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_GetModel_async", + "title": "GetModelRequestObjectAsync", + "description": "Snippet for GetModelAsync", + "file": "ModelServiceClient.GetModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.GetModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GetModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.cloud.retail.v2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_GetModel_sync_flattened", + "title": "GetModel", + "description": "Snippet for GetModel", + "file": "ModelServiceClient.GetModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.GetModel", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.cloud.retail.v2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_GetModel_async_flattened", + "title": "GetModelAsync", + "description": "Snippet for GetModelAsync", + "file": "ModelServiceClient.GetModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.GetModelAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.cloud.retail.v2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_GetModel_sync_flattened_resourceNames", + "title": "GetModelResourceNames", + "description": "Snippet for GetModel", + "file": "ModelServiceClient.GetModelResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.GetModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.cloud.retail.v2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_GetModel_async_flattened_resourceNames", + "title": "GetModelResourceNamesAsync", + "description": "Snippet for GetModelAsync", + "file": "ModelServiceClient.GetModelResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.GetModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.cloud.retail.v2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_PauseModel_sync", + "title": "PauseModelRequestObject", + "description": "Snippet for PauseModel", + "file": "ModelServiceClient.PauseModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PauseModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.PauseModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.PauseModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "PauseModel", + "fullName": "google.cloud.retail.v2.ModelService.PauseModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_PauseModel_async", + "title": "PauseModelRequestObjectAsync", + "description": "Snippet for PauseModelAsync", + "file": "ModelServiceClient.PauseModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PauseModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.PauseModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.PauseModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "PauseModel", + "fullName": "google.cloud.retail.v2.ModelService.PauseModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_PauseModel_sync_flattened", + "title": "PauseModel", + "description": "Snippet for PauseModel", + "file": "ModelServiceClient.PauseModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PauseModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.PauseModel", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "PauseModel", + "fullName": "google.cloud.retail.v2.ModelService.PauseModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_PauseModel_async_flattened", + "title": "PauseModelAsync", + "description": "Snippet for PauseModelAsync", + "file": "ModelServiceClient.PauseModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PauseModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.PauseModelAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "PauseModel", + "fullName": "google.cloud.retail.v2.ModelService.PauseModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_PauseModel_sync_flattened_resourceNames", + "title": "PauseModelResourceNames", + "description": "Snippet for PauseModel", + "file": "ModelServiceClient.PauseModelResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PauseModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.PauseModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "PauseModel", + "fullName": "google.cloud.retail.v2.ModelService.PauseModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_PauseModel_async_flattened_resourceNames", + "title": "PauseModelResourceNamesAsync", + "description": "Snippet for PauseModelAsync", + "file": "ModelServiceClient.PauseModelResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "PauseModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.PauseModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "PauseModel", + "fullName": "google.cloud.retail.v2.ModelService.PauseModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ResumeModel_sync", + "title": "ResumeModelRequestObject", + "description": "Snippet for ResumeModel", + "file": "ModelServiceClient.ResumeModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ResumeModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ResumeModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ResumeModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ResumeModel", + "fullName": "google.cloud.retail.v2.ModelService.ResumeModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ResumeModel_async", + "title": "ResumeModelRequestObjectAsync", + "description": "Snippet for ResumeModelAsync", + "file": "ModelServiceClient.ResumeModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ResumeModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ResumeModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ResumeModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ResumeModel", + "fullName": "google.cloud.retail.v2.ModelService.ResumeModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ResumeModel_sync_flattened", + "title": "ResumeModel", + "description": "Snippet for ResumeModel", + "file": "ModelServiceClient.ResumeModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ResumeModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ResumeModel", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ResumeModel", + "fullName": "google.cloud.retail.v2.ModelService.ResumeModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ResumeModel_async_flattened", + "title": "ResumeModelAsync", + "description": "Snippet for ResumeModelAsync", + "file": "ModelServiceClient.ResumeModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ResumeModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ResumeModelAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ResumeModel", + "fullName": "google.cloud.retail.v2.ModelService.ResumeModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_DeleteModel_sync", + "title": "DeleteModelRequestObject", + "description": "Snippet for DeleteModel", + "file": "ModelServiceClient.DeleteModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.DeleteModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.DeleteModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "DeleteModel", + "fullName": "google.cloud.retail.v2.ModelService.DeleteModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_DeleteModel_async", + "title": "DeleteModelRequestObjectAsync", + "description": "Snippet for DeleteModelAsync", + "file": "ModelServiceClient.DeleteModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.DeleteModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.DeleteModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "DeleteModel", + "fullName": "google.cloud.retail.v2.ModelService.DeleteModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_DeleteModel_sync_flattened", + "title": "DeleteModel", + "description": "Snippet for DeleteModel", + "file": "ModelServiceClient.DeleteModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.DeleteModel", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "DeleteModel", + "fullName": "google.cloud.retail.v2.ModelService.DeleteModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_DeleteModel_async_flattened", + "title": "DeleteModelAsync", + "description": "Snippet for DeleteModelAsync", + "file": "ModelServiceClient.DeleteModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.DeleteModelAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "DeleteModel", + "fullName": "google.cloud.retail.v2.ModelService.DeleteModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_DeleteModel_sync_flattened_resourceNames", + "title": "DeleteModelResourceNames", + "description": "Snippet for DeleteModel", + "file": "ModelServiceClient.DeleteModelResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.DeleteModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "DeleteModel", + "fullName": "google.cloud.retail.v2.ModelService.DeleteModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_DeleteModel_async_flattened_resourceNames", + "title": "DeleteModelResourceNamesAsync", + "description": "Snippet for DeleteModelAsync", + "file": "ModelServiceClient.DeleteModelResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "DeleteModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.DeleteModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "DeleteModel", + "fullName": "google.cloud.retail.v2.ModelService.DeleteModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ListModels_sync", + "title": "ListModelsRequestObject", + "description": "Snippet for ListModels", + "file": "ModelServiceClient.ListModelsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListModels", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ListModels", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ListModelsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.cloud.retail.v2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 78, + "type": "FULL" + }, + { + "start": 36, + "end": 76, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ListModels_async", + "title": "ListModelsRequestObjectAsync", + "description": "Snippet for ListModelsAsync", + "file": "ModelServiceClient.ListModelsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListModelsAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ListModelsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ListModelsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.cloud.retail.v2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 80, + "type": "FULL" + }, + { + "start": 38, + "end": 78, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ListModels_sync_flattened", + "title": "ListModels", + "description": "Snippet for ListModels", + "file": "ModelServiceClient.ListModelsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListModels", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ListModels", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.cloud.retail.v2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ListModels_async_flattened", + "title": "ListModelsAsync", + "description": "Snippet for ListModelsAsync", + "file": "ModelServiceClient.ListModelsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListModelsAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ListModelsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.cloud.retail.v2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ListModels_sync_flattened_resourceNames", + "title": "ListModelsResourceNames", + "description": "Snippet for ListModels", + "file": "ModelServiceClient.ListModelsResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListModels", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ListModels", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.cloud.retail.v2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_ListModels_async_flattened_resourceNames", + "title": "ListModelsResourceNamesAsync", + "description": "Snippet for ListModelsAsync", + "file": "ModelServiceClient.ListModelsResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListModelsAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.ListModelsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.cloud.retail.v2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_UpdateModel_sync", + "title": "UpdateModelRequestObject", + "description": "Snippet for UpdateModel", + "file": "ModelServiceClient.UpdateModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.UpdateModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.UpdateModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "UpdateModel", + "fullName": "google.cloud.retail.v2.ModelService.UpdateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_UpdateModel_async", + "title": "UpdateModelRequestObjectAsync", + "description": "Snippet for UpdateModelAsync", + "file": "ModelServiceClient.UpdateModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.UpdateModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.UpdateModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "UpdateModel", + "fullName": "google.cloud.retail.v2.ModelService.UpdateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_UpdateModel_sync_flattened", + "title": "UpdateModel", + "description": "Snippet for UpdateModel", + "file": "ModelServiceClient.UpdateModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.UpdateModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.Model", + "name": "model" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "UpdateModel", + "fullName": "google.cloud.retail.v2.ModelService.UpdateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_UpdateModel_async_flattened", + "title": "UpdateModelAsync", + "description": "Snippet for UpdateModelAsync", + "file": "ModelServiceClient.UpdateModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.UpdateModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.Model", + "name": "model" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "UpdateModel", + "fullName": "google.cloud.retail.v2.ModelService.UpdateModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_TuneModel_sync", + "title": "TuneModelRequestObject", + "description": "Snippet for TuneModel", + "file": "ModelServiceClient.TuneModelRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "TuneModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.TuneModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.TuneModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "TuneModel", + "fullName": "google.cloud.retail.v2.ModelService.TuneModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 61, + "type": "FULL" + }, + { + "start": 35, + "end": 59, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_TuneModel_async", + "title": "TuneModelRequestObjectAsync", + "description": "Snippet for TuneModelAsync", + "file": "ModelServiceClient.TuneModelRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "TuneModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.TuneModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.TuneModelRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "TuneModel", + "fullName": "google.cloud.retail.v2.ModelService.TuneModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 62, + "type": "FULL" + }, + { + "start": 36, + "end": 60, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_TuneModel_sync_flattened", + "title": "TuneModel", + "description": "Snippet for TuneModel", + "file": "ModelServiceClient.TuneModelSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "TuneModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.TuneModel", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "TuneModel", + "fullName": "google.cloud.retail.v2.ModelService.TuneModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 58, + "type": "FULL" + }, + { + "start": 35, + "end": 56, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_TuneModel_async_flattened", + "title": "TuneModelAsync", + "description": "Snippet for TuneModelAsync", + "file": "ModelServiceClient.TuneModelAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "TuneModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.TuneModelAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "TuneModel", + "fullName": "google.cloud.retail.v2.ModelService.TuneModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_TuneModel_sync_flattened_resourceNames", + "title": "TuneModelResourceNames", + "description": "Snippet for TuneModel", + "file": "ModelServiceClient.TuneModelResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "TuneModel", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.TuneModel", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "TuneModel", + "fullName": "google.cloud.retail.v2.ModelService.TuneModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 58, + "type": "FULL" + }, + { + "start": 35, + "end": 56, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_ModelService_TuneModel_async_flattened_resourceNames", + "title": "TuneModelResourceNamesAsync", + "description": "Snippet for TuneModelAsync", + "file": "ModelServiceClient.TuneModelResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "TuneModelAsync", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient.TuneModelAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ModelName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "ModelServiceClient", + "fullName": "Google.Cloud.Retail.V2.ModelServiceClient" + }, + "method": { + "shortName": "TuneModel", + "fullName": "google.cloud.retail.v2.ModelService.TuneModel", + "service": { + "shortName": "ModelService", + "fullName": "google.cloud.retail.v2.ModelService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 59, + "type": "FULL" + }, + { + "start": 36, + "end": 57, + "type": "SHORT" + } + ] + }, { "regionTag": "retail_v2_generated_PredictionService_Predict_sync", "title": "PredictRequestObject", @@ -6957,12 +9116,12 @@ "segments": [ { "start": 20, - "end": 98, + "end": 99, "type": "FULL" }, { "start": 36, - "end": 96, + "end": 97, "type": "SHORT" } ] @@ -7006,12 +9165,12 @@ "segments": [ { "start": 20, - "end": 100, + "end": 101, "type": "FULL" }, { "start": 38, - "end": 98, + "end": 99, "type": "SHORT" } ] diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/CompletionServiceClientSnippets.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/CompletionServiceClientSnippets.g.cs index 6fb8dafa5a6c..c2684e847b5b 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/CompletionServiceClientSnippets.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/CompletionServiceClientSnippets.g.cs @@ -38,6 +38,7 @@ public void CompleteQueryRequestObject() MaxSuggestions = 0, Dataset = "", VisitorId = "", + Entity = "", }; // Make the request CompleteQueryResponse response = completionServiceClient.CompleteQuery(request); @@ -61,6 +62,7 @@ public async Task CompleteQueryRequestObjectAsync() MaxSuggestions = 0, Dataset = "", VisitorId = "", + Entity = "", }; // Make the request CompleteQueryResponse response = await completionServiceClient.CompleteQueryAsync(request); diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/ModelServiceClientSnippets.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/ModelServiceClientSnippets.g.cs new file mode 100644 index 000000000000..dae518644bd6 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/ModelServiceClientSnippets.g.cs @@ -0,0 +1,1058 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +namespace Google.Cloud.Retail.V2.Snippets +{ + using Google.Api.Gax; + using Google.LongRunning; + using Google.Protobuf.WellKnownTypes; + using System; + using System.Linq; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedModelServiceClientSnippets + { + /// Snippet for CreateModel + public void CreateModelRequestObject() + { + // Snippet: CreateModel(CreateModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + CreateModelRequest request = new CreateModelRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Model = new Model(), + DryRun = false, + }; + // Make the request + Operation response = modelServiceClient.CreateModel(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceCreateModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateModelAsync + public async Task CreateModelRequestObjectAsync() + { + // Snippet: CreateModelAsync(CreateModelRequest, CallSettings) + // Additional: CreateModelAsync(CreateModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + CreateModelRequest request = new CreateModelRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Model = new Model(), + DryRun = false, + }; + // Make the request + Operation response = await modelServiceClient.CreateModelAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceCreateModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateModel + public void CreateModel() + { + // Snippet: CreateModel(string, Model, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + Model model = new Model(); + // Make the request + Operation response = modelServiceClient.CreateModel(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceCreateModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateModelAsync + public async Task CreateModelAsync() + { + // Snippet: CreateModelAsync(string, Model, CallSettings) + // Additional: CreateModelAsync(string, Model, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + Model model = new Model(); + // Make the request + Operation response = await modelServiceClient.CreateModelAsync(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceCreateModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateModel + public void CreateModelResourceNames() + { + // Snippet: CreateModel(CatalogName, Model, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = new Model(); + // Make the request + Operation response = modelServiceClient.CreateModel(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceCreateModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for CreateModelAsync + public async Task CreateModelResourceNamesAsync() + { + // Snippet: CreateModelAsync(CatalogName, Model, CallSettings) + // Additional: CreateModelAsync(CatalogName, Model, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + Model model = new Model(); + // Make the request + Operation response = await modelServiceClient.CreateModelAsync(parent, model); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + Model result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceCreateModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + Model retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for GetModel + public void GetModelRequestObject() + { + // Snippet: GetModel(GetModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + GetModelRequest request = new GetModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = modelServiceClient.GetModel(request); + // End snippet + } + + /// Snippet for GetModelAsync + public async Task GetModelRequestObjectAsync() + { + // Snippet: GetModelAsync(GetModelRequest, CallSettings) + // Additional: GetModelAsync(GetModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + GetModelRequest request = new GetModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = await modelServiceClient.GetModelAsync(request); + // End snippet + } + + /// Snippet for GetModel + public void GetModel() + { + // Snippet: GetModel(string, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = modelServiceClient.GetModel(name); + // End snippet + } + + /// Snippet for GetModelAsync + public async Task GetModelAsync() + { + // Snippet: GetModelAsync(string, CallSettings) + // Additional: GetModelAsync(string, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = await modelServiceClient.GetModelAsync(name); + // End snippet + } + + /// Snippet for GetModel + public void GetModelResourceNames() + { + // Snippet: GetModel(ModelName, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = modelServiceClient.GetModel(name); + // End snippet + } + + /// Snippet for GetModelAsync + public async Task GetModelResourceNamesAsync() + { + // Snippet: GetModelAsync(ModelName, CallSettings) + // Additional: GetModelAsync(ModelName, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = await modelServiceClient.GetModelAsync(name); + // End snippet + } + + /// Snippet for PauseModel + public void PauseModelRequestObject() + { + // Snippet: PauseModel(PauseModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + PauseModelRequest request = new PauseModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = modelServiceClient.PauseModel(request); + // End snippet + } + + /// Snippet for PauseModelAsync + public async Task PauseModelRequestObjectAsync() + { + // Snippet: PauseModelAsync(PauseModelRequest, CallSettings) + // Additional: PauseModelAsync(PauseModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + PauseModelRequest request = new PauseModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Model response = await modelServiceClient.PauseModelAsync(request); + // End snippet + } + + /// Snippet for PauseModel + public void PauseModel() + { + // Snippet: PauseModel(string, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = modelServiceClient.PauseModel(name); + // End snippet + } + + /// Snippet for PauseModelAsync + public async Task PauseModelAsync() + { + // Snippet: PauseModelAsync(string, CallSettings) + // Additional: PauseModelAsync(string, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Model response = await modelServiceClient.PauseModelAsync(name); + // End snippet + } + + /// Snippet for PauseModel + public void PauseModelResourceNames() + { + // Snippet: PauseModel(ModelName, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = modelServiceClient.PauseModel(name); + // End snippet + } + + /// Snippet for PauseModelAsync + public async Task PauseModelResourceNamesAsync() + { + // Snippet: PauseModelAsync(ModelName, CallSettings) + // Additional: PauseModelAsync(ModelName, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Model response = await modelServiceClient.PauseModelAsync(name); + // End snippet + } + + /// Snippet for ResumeModel + public void ResumeModelRequestObject() + { + // Snippet: ResumeModel(ResumeModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ResumeModelRequest request = new ResumeModelRequest { Name = "", }; + // Make the request + Model response = modelServiceClient.ResumeModel(request); + // End snippet + } + + /// Snippet for ResumeModelAsync + public async Task ResumeModelRequestObjectAsync() + { + // Snippet: ResumeModelAsync(ResumeModelRequest, CallSettings) + // Additional: ResumeModelAsync(ResumeModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ResumeModelRequest request = new ResumeModelRequest { Name = "", }; + // Make the request + Model response = await modelServiceClient.ResumeModelAsync(request); + // End snippet + } + + /// Snippet for ResumeModel + public void ResumeModel() + { + // Snippet: ResumeModel(string, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = ""; + // Make the request + Model response = modelServiceClient.ResumeModel(name); + // End snippet + } + + /// Snippet for ResumeModelAsync + public async Task ResumeModelAsync() + { + // Snippet: ResumeModelAsync(string, CallSettings) + // Additional: ResumeModelAsync(string, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = ""; + // Make the request + Model response = await modelServiceClient.ResumeModelAsync(name); + // End snippet + } + + /// Snippet for DeleteModel + public void DeleteModelRequestObject() + { + // Snippet: DeleteModel(DeleteModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + DeleteModelRequest request = new DeleteModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + modelServiceClient.DeleteModel(request); + // End snippet + } + + /// Snippet for DeleteModelAsync + public async Task DeleteModelRequestObjectAsync() + { + // Snippet: DeleteModelAsync(DeleteModelRequest, CallSettings) + // Additional: DeleteModelAsync(DeleteModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + DeleteModelRequest request = new DeleteModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + await modelServiceClient.DeleteModelAsync(request); + // End snippet + } + + /// Snippet for DeleteModel + public void DeleteModel() + { + // Snippet: DeleteModel(string, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + modelServiceClient.DeleteModel(name); + // End snippet + } + + /// Snippet for DeleteModelAsync + public async Task DeleteModelAsync() + { + // Snippet: DeleteModelAsync(string, CallSettings) + // Additional: DeleteModelAsync(string, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + await modelServiceClient.DeleteModelAsync(name); + // End snippet + } + + /// Snippet for DeleteModel + public void DeleteModelResourceNames() + { + // Snippet: DeleteModel(ModelName, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + modelServiceClient.DeleteModel(name); + // End snippet + } + + /// Snippet for DeleteModelAsync + public async Task DeleteModelResourceNamesAsync() + { + // Snippet: DeleteModelAsync(ModelName, CallSettings) + // Additional: DeleteModelAsync(ModelName, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + await modelServiceClient.DeleteModelAsync(name); + // End snippet + } + + /// Snippet for ListModels + public void ListModelsRequestObject() + { + // Snippet: ListModels(ListModelsRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ListModelsRequest request = new ListModelsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + PagedEnumerable response = modelServiceClient.ListModels(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Model item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListModelsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListModelsAsync + public async Task ListModelsRequestObjectAsync() + { + // Snippet: ListModelsAsync(ListModelsRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ListModelsRequest request = new ListModelsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + PagedAsyncEnumerable response = modelServiceClient.ListModelsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Model item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListModelsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListModels + public void ListModels() + { + // Snippet: ListModels(string, string, int?, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + PagedEnumerable response = modelServiceClient.ListModels(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Model item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListModelsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListModelsAsync + public async Task ListModelsAsync() + { + // Snippet: ListModelsAsync(string, string, int?, CallSettings) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + PagedAsyncEnumerable response = modelServiceClient.ListModelsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Model item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListModelsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListModels + public void ListModelsResourceNames() + { + // Snippet: ListModels(CatalogName, string, int?, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + PagedEnumerable response = modelServiceClient.ListModels(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (Model item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListModelsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListModelsAsync + public async Task ListModelsResourceNamesAsync() + { + // Snippet: ListModelsAsync(CatalogName, string, int?, CallSettings) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + PagedAsyncEnumerable response = modelServiceClient.ListModelsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((Model item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListModelsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (Model item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (Model item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for UpdateModel + public void UpdateModelRequestObject() + { + // Snippet: UpdateModel(UpdateModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + UpdateModelRequest request = new UpdateModelRequest + { + Model = new Model(), + UpdateMask = new FieldMask(), + }; + // Make the request + Model response = modelServiceClient.UpdateModel(request); + // End snippet + } + + /// Snippet for UpdateModelAsync + public async Task UpdateModelRequestObjectAsync() + { + // Snippet: UpdateModelAsync(UpdateModelRequest, CallSettings) + // Additional: UpdateModelAsync(UpdateModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateModelRequest request = new UpdateModelRequest + { + Model = new Model(), + UpdateMask = new FieldMask(), + }; + // Make the request + Model response = await modelServiceClient.UpdateModelAsync(request); + // End snippet + } + + /// Snippet for UpdateModel + public void UpdateModel() + { + // Snippet: UpdateModel(Model, FieldMask, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + Model model = new Model(); + FieldMask updateMask = new FieldMask(); + // Make the request + Model response = modelServiceClient.UpdateModel(model, updateMask); + // End snippet + } + + /// Snippet for UpdateModelAsync + public async Task UpdateModelAsync() + { + // Snippet: UpdateModelAsync(Model, FieldMask, CallSettings) + // Additional: UpdateModelAsync(Model, FieldMask, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + Model model = new Model(); + FieldMask updateMask = new FieldMask(); + // Make the request + Model response = await modelServiceClient.UpdateModelAsync(model, updateMask); + // End snippet + } + + /// Snippet for TuneModel + public void TuneModelRequestObject() + { + // Snippet: TuneModel(TuneModelRequest, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + TuneModelRequest request = new TuneModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Operation response = modelServiceClient.TuneModel(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceTuneModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for TuneModelAsync + public async Task TuneModelRequestObjectAsync() + { + // Snippet: TuneModelAsync(TuneModelRequest, CallSettings) + // Additional: TuneModelAsync(TuneModelRequest, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + TuneModelRequest request = new TuneModelRequest + { + ModelName = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"), + }; + // Make the request + Operation response = await modelServiceClient.TuneModelAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceTuneModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for TuneModel + public void TuneModel() + { + // Snippet: TuneModel(string, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Operation response = modelServiceClient.TuneModel(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceTuneModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for TuneModelAsync + public async Task TuneModelAsync() + { + // Snippet: TuneModelAsync(string, CallSettings) + // Additional: TuneModelAsync(string, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/models/[MODEL]"; + // Make the request + Operation response = await modelServiceClient.TuneModelAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceTuneModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for TuneModel + public void TuneModelResourceNames() + { + // Snippet: TuneModel(ModelName, CallSettings) + // Create client + ModelServiceClient modelServiceClient = ModelServiceClient.Create(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Operation response = modelServiceClient.TuneModel(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = modelServiceClient.PollOnceTuneModel(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for TuneModelAsync + public async Task TuneModelResourceNamesAsync() + { + // Snippet: TuneModelAsync(ModelName, CallSettings) + // Additional: TuneModelAsync(ModelName, CancellationToken) + // Create client + ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); + // Initialize request argument(s) + ModelName name = ModelName.FromProjectLocationCatalogModel("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]"); + // Make the request + Operation response = await modelServiceClient.TuneModelAsync(name); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + TuneModelResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await modelServiceClient.PollOnceTuneModelAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + TuneModelResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + } +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/SearchServiceClientSnippets.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/SearchServiceClientSnippets.g.cs index 3627452703f1..2757a569cb33 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/SearchServiceClientSnippets.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/SearchServiceClientSnippets.g.cs @@ -54,6 +54,7 @@ public void SearchRequestObject() PersonalizationSpec = new SearchRequest.Types.PersonalizationSpec(), Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), + Entity = "", }; // Make the request PagedEnumerable response = searchServiceClient.Search(request); @@ -122,6 +123,7 @@ public async Task SearchRequestObjectAsync() PersonalizationSpec = new SearchRequest.Types.PersonalizationSpec(), Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), + Entity = "", }; // Make the request PagedAsyncEnumerable response = searchServiceClient.SearchAsync(request); diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Catalog.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Catalog.g.cs index 15a960eb8549..b7500a0d3393 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Catalog.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Catalog.g.cs @@ -452,6 +452,10 @@ public sealed partial class CatalogAttribute : pb::IMessage /// characters and underscores. For example, an attribute named /// `attributes.abc_xyz` can be indexed, but an attribute named /// `attributes.abc-xyz` cannot be indexed. + /// + /// If the attribute key starts with `attributes.`, then the attribute is a + /// custom attribute. Attributes such as `brands`, `patterns`, and `title` are + /// built-in and called system attributes. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -588,7 +592,9 @@ public sealed partial class CatalogAttribute : pb::IMessage /// /// If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. /// This property only applies to textual custom attributes and requires - /// indexable set to enabled to enable exact-searchable. + /// indexable set to enabled to enable exact-searchable. If unset, the server + /// behavior defaults to + /// [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -604,7 +610,8 @@ public sealed partial class CatalogAttribute : pb::IMessage private global::Google.Cloud.Retail.V2.CatalogAttribute.Types.RetrievableOption retrievableOption_ = global::Google.Cloud.Retail.V2.CatalogAttribute.Types.RetrievableOption.Unspecified; /// /// If RETRIEVABLE_ENABLED, attribute values are retrievable in the search - /// results. + /// results. If unset, the server behavior defaults to + /// [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -999,8 +1006,7 @@ public enum SearchableOption { /// public enum ExactSearchableOption { /// - /// Value used when unset. Defaults to - /// [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. + /// Value used when unset. /// [pbr::OriginalName("EXACT_SEARCHABLE_OPTION_UNSPECIFIED")] Unspecified = 0, /// @@ -1018,8 +1024,7 @@ public enum ExactSearchableOption { /// public enum RetrievableOption { /// - /// Value used when unset. Defaults to - /// [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. + /// Value used when unset. /// [pbr::OriginalName("RETRIEVABLE_OPTION_UNSPECIFIED")] Unspecified = 0, /// diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Common.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Common.g.cs index 24ef398fa1f5..1aacff6515b2 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Common.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Common.g.cs @@ -94,17 +94,21 @@ public static partial class CommonReflection { "VEVfQ09ORklHEAESIgoeQ0FUQUxPR19MRVZFTF9BVFRSSUJVVEVfQ09ORklH", "EAIqaQoMU29sdXRpb25UeXBlEh0KGVNPTFVUSU9OX1RZUEVfVU5TUEVDSUZJ", "RUQQABIgChxTT0xVVElPTl9UWVBFX1JFQ09NTUVOREFUSU9OEAESGAoUU09M", - "VVRJT05fVFlQRV9TRUFSQ0gQAiqLAQoVU2VhcmNoU29sdXRpb25Vc2VDYXNl", - "EigKJFNFQVJDSF9TT0xVVElPTl9VU0VfQ0FTRV9VTlNQRUNJRklFRBAAEiMK", - "H1NFQVJDSF9TT0xVVElPTl9VU0VfQ0FTRV9TRUFSQ0gQARIjCh9TRUFSQ0hf", - "U09MVVRJT05fVVNFX0NBU0VfQlJPV1NFEAJCtgEKGmNvbS5nb29nbGUuY2xv", - "dWQucmV0YWlsLnYyQgtDb21tb25Qcm90b1ABWjJjbG91ZC5nb29nbGUuY29t", - "L2dvL3JldGFpbC9hcGl2Mi9yZXRhaWxwYjtyZXRhaWxwYqICBlJFVEFJTKoC", - "Fkdvb2dsZS5DbG91ZC5SZXRhaWwuVjLKAhZHb29nbGVcQ2xvdWRcUmV0YWls", - "XFYy6gIZR29vZ2xlOjpDbG91ZDo6UmV0YWlsOjpWMmIGcHJvdG8z")); + "VVRJT05fVFlQRV9TRUFSQ0gQAiqhAQoeUmVjb21tZW5kYXRpb25zRmlsdGVy", + "aW5nT3B0aW9uEjAKLFJFQ09NTUVOREFUSU9OU19GSUxURVJJTkdfT1BUSU9O", + "X1VOU1BFQ0lGSUVEEAASJgoiUkVDT01NRU5EQVRJT05TX0ZJTFRFUklOR19E", + "SVNBQkxFRBABEiUKIVJFQ09NTUVOREFUSU9OU19GSUxURVJJTkdfRU5BQkxF", + "RBADKosBChVTZWFyY2hTb2x1dGlvblVzZUNhc2USKAokU0VBUkNIX1NPTFVU", + "SU9OX1VTRV9DQVNFX1VOU1BFQ0lGSUVEEAASIwofU0VBUkNIX1NPTFVUSU9O", + "X1VTRV9DQVNFX1NFQVJDSBABEiMKH1NFQVJDSF9TT0xVVElPTl9VU0VfQ0FT", + "RV9CUk9XU0UQAkK2AQoaY29tLmdvb2dsZS5jbG91ZC5yZXRhaWwudjJCC0Nv", + "bW1vblByb3RvUAFaMmNsb3VkLmdvb2dsZS5jb20vZ28vcmV0YWlsL2FwaXYy", + "L3JldGFpbHBiO3JldGFpbHBiogIGUkVUQUlMqgIWR29vZ2xlLkNsb3VkLlJl", + "dGFpbC5WMsoCFkdvb2dsZVxDbG91ZFxSZXRhaWxcVjLqAhlHb29nbGU6OkNs", + "b3VkOjpSZXRhaWw6OlYyYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Retail.V2.AttributeConfigLevel), typeof(global::Google.Cloud.Retail.V2.SolutionType), typeof(global::Google.Cloud.Retail.V2.SearchSolutionUseCase), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Retail.V2.AttributeConfigLevel), typeof(global::Google.Cloud.Retail.V2.SolutionType), typeof(global::Google.Cloud.Retail.V2.RecommendationsFilteringOption), typeof(global::Google.Cloud.Retail.V2.SearchSolutionUseCase), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Condition), global::Google.Cloud.Retail.V2.Condition.Parser, new[]{ "QueryTerms", "ActiveTimeRange" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Condition.Types.QueryTerm), global::Google.Cloud.Retail.V2.Condition.Types.QueryTerm.Parser, new[]{ "Value", "FullMatch" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Condition.Types.TimeRange), global::Google.Cloud.Retail.V2.Condition.Types.TimeRange.Parser, new[]{ "StartTime", "EndTime" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Rule), global::Google.Cloud.Retail.V2.Rule.Parser, new[]{ "BoostAction", "RedirectAction", "OnewaySynonymsAction", "DoNotAssociateAction", "ReplacementAction", "IgnoreAction", "FilterAction", "TwowaySynonymsAction", "Condition" }, new[]{ "Action" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Rule.Types.BoostAction), global::Google.Cloud.Retail.V2.Rule.Types.BoostAction.Parser, new[]{ "Boost", "ProductsFilter" }, null, null, null, null), @@ -170,6 +174,26 @@ public enum SolutionType { [pbr::OriginalName("SOLUTION_TYPE_SEARCH")] Search = 2, } + /// + /// If filtering for recommendations is enabled. + /// + public enum RecommendationsFilteringOption { + /// + /// Value used when unset. + /// In this case, server behavior defaults to + /// [RECOMMENDATIONS_FILTERING_DISABLED][google.cloud.retail.v2.RecommendationsFilteringOption.RECOMMENDATIONS_FILTERING_DISABLED]. + /// + [pbr::OriginalName("RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED")] Unspecified = 0, + /// + /// Recommendation filtering is disabled. + /// + [pbr::OriginalName("RECOMMENDATIONS_FILTERING_DISABLED")] RecommendationsFilteringDisabled = 1, + /// + /// Recommendation filtering is enabled. + /// + [pbr::OriginalName("RECOMMENDATIONS_FILTERING_ENABLED")] RecommendationsFilteringEnabled = 3, + } + /// /// The use case of Cloud Retail Search. /// @@ -3761,7 +3785,7 @@ public sealed partial class ColorInfo : pb::IMessage /// it is expected to have only 1 color. May consider using single "Mixed" /// instead of multiple values. /// - /// A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded + /// A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded /// string with a length limit of 128 characters. Otherwise, an /// INVALID_ARGUMENT error is returned. /// diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionService.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionService.g.cs index bb14c9893384..66a5832250c0 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionService.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionService.g.cs @@ -30,45 +30,45 @@ public static partial class CompletionServiceReflection { "ZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdvb2dsZS9hcGkvcmVzb3Vy", "Y2UucHJvdG8aI2dvb2dsZS9jbG91ZC9yZXRhaWwvdjIvY29tbW9uLnByb3Rv", "Gipnb29nbGUvY2xvdWQvcmV0YWlsL3YyL2ltcG9ydF9jb25maWcucHJvdG8a", - "I2dvb2dsZS9sb25ncnVubmluZy9vcGVyYXRpb25zLnByb3RvIs0BChRDb21w", + "I2dvb2dsZS9sb25ncnVubmluZy9vcGVyYXRpb25zLnByb3RvIt0BChRDb21w", "bGV0ZVF1ZXJ5UmVxdWVzdBI2CgdjYXRhbG9nGAEgASgJQiXgQQL6QR8KHXJl", "dGFpbC5nb29nbGVhcGlzLmNvbS9DYXRhbG9nEhIKBXF1ZXJ5GAIgASgJQgPg", "QQISEgoKdmlzaXRvcl9pZBgHIAEoCRIWCg5sYW5ndWFnZV9jb2RlcxgDIAMo", "CRITCgtkZXZpY2VfdHlwZRgEIAEoCRIPCgdkYXRhc2V0GAYgASgJEhcKD21h", - "eF9zdWdnZXN0aW9ucxgFIAEoBSKFBAoVQ29tcGxldGVRdWVyeVJlc3BvbnNl", - "EloKEmNvbXBsZXRpb25fcmVzdWx0cxgBIAMoCzI+Lmdvb2dsZS5jbG91ZC5y", - "ZXRhaWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNlLkNvbXBsZXRpb25SZXN1", - "bHQSGQoRYXR0cmlidXRpb25fdG9rZW4YAiABKAkSXwoVcmVjZW50X3NlYXJj", - "aF9yZXN1bHRzGAMgAygLMkAuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Db21w", - "bGV0ZVF1ZXJ5UmVzcG9uc2UuUmVjZW50U2VhcmNoUmVzdWx0GuYBChBDb21w", - "bGV0aW9uUmVzdWx0EhIKCnN1Z2dlc3Rpb24YASABKAkSYgoKYXR0cmlidXRl", - "cxgCIAMoCzJOLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuQ29tcGxldGVRdWVy", - "eVJlc3BvbnNlLkNvbXBsZXRpb25SZXN1bHQuQXR0cmlidXRlc0VudHJ5GloK", - "D0F0dHJpYnV0ZXNFbnRyeRILCgNrZXkYASABKAkSNgoFdmFsdWUYAiABKAsy", - "Jy5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkN1c3RvbUF0dHJpYnV0ZToCOAEa", - "KwoSUmVjZW50U2VhcmNoUmVzdWx0EhUKDXJlY2VudF9zZWFyY2gYASABKAky", - "sgQKEUNvbXBsZXRpb25TZXJ2aWNlErMBCg1Db21wbGV0ZVF1ZXJ5EiwuZ29v", - "Z2xlLmNsb3VkLnJldGFpbC52Mi5Db21wbGV0ZVF1ZXJ5UmVxdWVzdBotLmdv", - "b2dsZS5jbG91ZC5yZXRhaWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNlIkWC", - "0+STAj8SPS92Mi97Y2F0YWxvZz1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2Nh", - "dGFsb2dzLyp9OmNvbXBsZXRlUXVlcnkSmwIKFEltcG9ydENvbXBsZXRpb25E", - "YXRhEjMuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5JbXBvcnRDb21wbGV0aW9u", - "RGF0YVJlcXVlc3QaHS5nb29nbGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9uIq4B", - "gtPkkwJJIkQvdjIve3BhcmVudD1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2Nh", - "dGFsb2dzLyp9L2NvbXBsZXRpb25EYXRhOmltcG9ydDoBKspBXAozZ29vZ2xl", - "LmNsb3VkLnJldGFpbC52Mi5JbXBvcnRDb21wbGV0aW9uRGF0YVJlc3BvbnNl", - "EiVnb29nbGUuY2xvdWQucmV0YWlsLnYyLkltcG9ydE1ldGFkYXRhGknKQRVy", - "ZXRhaWwuZ29vZ2xlYXBpcy5jb23SQS5odHRwczovL3d3dy5nb29nbGVhcGlz", - "LmNvbS9hdXRoL2Nsb3VkLXBsYXRmb3JtQsEBChpjb20uZ29vZ2xlLmNsb3Vk", - "LnJldGFpbC52MkIWQ29tcGxldGlvblNlcnZpY2VQcm90b1ABWjJjbG91ZC5n", - "b29nbGUuY29tL2dvL3JldGFpbC9hcGl2Mi9yZXRhaWxwYjtyZXRhaWxwYqIC", - "BlJFVEFJTKoCFkdvb2dsZS5DbG91ZC5SZXRhaWwuVjLKAhZHb29nbGVcQ2xv", - "dWRcUmV0YWlsXFYy6gIZR29vZ2xlOjpDbG91ZDo6UmV0YWlsOjpWMmIGcHJv", - "dG8z")); + "eF9zdWdnZXN0aW9ucxgFIAEoBRIOCgZlbnRpdHkYCiABKAkihQQKFUNvbXBs", + "ZXRlUXVlcnlSZXNwb25zZRJaChJjb21wbGV0aW9uX3Jlc3VsdHMYASADKAsy", + "Pi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkNvbXBsZXRlUXVlcnlSZXNwb25z", + "ZS5Db21wbGV0aW9uUmVzdWx0EhkKEWF0dHJpYnV0aW9uX3Rva2VuGAIgASgJ", + "El8KFXJlY2VudF9zZWFyY2hfcmVzdWx0cxgDIAMoCzJALmdvb2dsZS5jbG91", + "ZC5yZXRhaWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNlLlJlY2VudFNlYXJj", + "aFJlc3VsdBrmAQoQQ29tcGxldGlvblJlc3VsdBISCgpzdWdnZXN0aW9uGAEg", + "ASgJEmIKCmF0dHJpYnV0ZXMYAiADKAsyTi5nb29nbGUuY2xvdWQucmV0YWls", + "LnYyLkNvbXBsZXRlUXVlcnlSZXNwb25zZS5Db21wbGV0aW9uUmVzdWx0LkF0", + "dHJpYnV0ZXNFbnRyeRpaCg9BdHRyaWJ1dGVzRW50cnkSCwoDa2V5GAEgASgJ", + "EjYKBXZhbHVlGAIgASgLMicuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5DdXN0", + "b21BdHRyaWJ1dGU6AjgBGisKElJlY2VudFNlYXJjaFJlc3VsdBIVCg1yZWNl", + "bnRfc2VhcmNoGAEgASgJMrIEChFDb21wbGV0aW9uU2VydmljZRKzAQoNQ29t", + "cGxldGVRdWVyeRIsLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuQ29tcGxldGVR", + "dWVyeVJlcXVlc3QaLS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkNvbXBsZXRl", + "UXVlcnlSZXNwb25zZSJFgtPkkwI/Ej0vdjIve2NhdGFsb2c9cHJvamVjdHMv", + "Ki9sb2NhdGlvbnMvKi9jYXRhbG9ncy8qfTpjb21wbGV0ZVF1ZXJ5EpsCChRJ", + "bXBvcnRDb21wbGV0aW9uRGF0YRIzLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIu", + "SW1wb3J0Q29tcGxldGlvbkRhdGFSZXF1ZXN0Gh0uZ29vZ2xlLmxvbmdydW5u", + "aW5nLk9wZXJhdGlvbiKuAYLT5JMCSSJEL3YyL3twYXJlbnQ9cHJvamVjdHMv", + "Ki9sb2NhdGlvbnMvKi9jYXRhbG9ncy8qfS9jb21wbGV0aW9uRGF0YTppbXBv", + "cnQ6ASrKQVwKM2dvb2dsZS5jbG91ZC5yZXRhaWwudjIuSW1wb3J0Q29tcGxl", + "dGlvbkRhdGFSZXNwb25zZRIlZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5JbXBv", + "cnRNZXRhZGF0YRpJykEVcmV0YWlsLmdvb2dsZWFwaXMuY29t0kEuaHR0cHM6", + "Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9jbG91ZC1wbGF0Zm9ybULBAQoa", + "Y29tLmdvb2dsZS5jbG91ZC5yZXRhaWwudjJCFkNvbXBsZXRpb25TZXJ2aWNl", + "UHJvdG9QAVoyY2xvdWQuZ29vZ2xlLmNvbS9nby9yZXRhaWwvYXBpdjIvcmV0", + "YWlscGI7cmV0YWlscGKiAgZSRVRBSUyqAhZHb29nbGUuQ2xvdWQuUmV0YWls", + "LlYyygIWR29vZ2xlXENsb3VkXFJldGFpbFxWMuoCGUdvb2dsZTo6Q2xvdWQ6", + "OlJldGFpbDo6VjJiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Retail.V2.CommonReflection.Descriptor, global::Google.Cloud.Retail.V2.ImportConfigReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryRequest), global::Google.Cloud.Retail.V2.CompleteQueryRequest.Parser, new[]{ "Catalog", "Query", "VisitorId", "LanguageCodes", "DeviceType", "Dataset", "MaxSuggestions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryRequest), global::Google.Cloud.Retail.V2.CompleteQueryRequest.Parser, new[]{ "Catalog", "Query", "VisitorId", "LanguageCodes", "DeviceType", "Dataset", "MaxSuggestions", "Entity" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryResponse), global::Google.Cloud.Retail.V2.CompleteQueryResponse.Parser, new[]{ "CompletionResults", "AttributionToken", "RecentSearchResults" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.CompletionResult), global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.CompletionResult.Parser, new[]{ "Suggestion", "Attributes" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.RecentSearchResult), global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.RecentSearchResult.Parser, new[]{ "RecentSearch" }, null, null, null, null)}) })); @@ -78,7 +78,7 @@ public static partial class CompletionServiceReflection { } #region Messages /// - /// Auto-complete parameters. + /// Autocomplete parameters. /// public sealed partial class CompleteQueryRequest : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -121,6 +121,7 @@ public sealed partial class CompleteQueryRequest : pb::IMessageField number for the "entity" field. + public const int EntityFieldNumber = 10; + private string entity_ = ""; + /// + /// The entity for customers that may run multiple different entities, domains, + /// sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, + /// `google.com`, `youtube.com`, etc. + /// If this is set, it should be exactly matched with + /// [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get + /// per-entity autocomplete results. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Entity { + get { return entity_; } + set { + entity_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -307,6 +328,7 @@ public sealed partial class CompleteQueryRequest : pb::IMessage - /// Response of the auto-complete query. + /// Response of the autocomplete query. /// public sealed partial class CompleteQueryResponse : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceClient.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceClient.g.cs index ba048a2dd21b..26808f4d38bd 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceClient.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceClient.g.cs @@ -180,7 +180,7 @@ private CompletionServiceClient BuildImpl() /// CompletionService client wrapper, for convenient use. /// - /// Auto-completion service for retail. + /// Autocomplete service for retail. /// /// This feature is only available for users who have Retail Search enabled. /// Enable Retail Search on Cloud Console before using this feature. @@ -385,7 +385,7 @@ internal static CompletionServiceClient Create(grpccore::CallInvoker callInvoker /// CompletionService client wrapper implementation, for convenient use. /// - /// Auto-completion service for retail. + /// Autocomplete service for retail. /// /// This feature is only available for users who have Retail Search enabled. /// Enable Retail Search on Cloud Console before using this feature. diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceGrpc.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceGrpc.g.cs index 6c20e929d3e6..c430b58256fe 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceGrpc.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/CompletionServiceGrpc.g.cs @@ -24,7 +24,7 @@ namespace Google.Cloud.Retail.V2 { /// - /// Auto-completion service for retail. + /// Autocomplete service for retail. /// /// This feature is only available for users who have Retail Search enabled. /// Enable Retail Search on Cloud Console before using this feature. diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ImportConfig.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ImportConfig.g.cs index 8ba2edfaf598..8901e1027f80 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ImportConfig.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ImportConfig.g.cs @@ -544,7 +544,7 @@ public sealed partial class BigQuerySource : pb::IMessage /// The schema is available here: /// https://support.google.com/analytics/answer/7029846. /// - /// Supported values for auto-completion imports: + /// Supported values for autocomplete imports: /// /// * `suggestions` (default): One JSON completion suggestion per line. /// * `denylist`: One JSON deny suggestion per line. diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Model.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Model.g.cs new file mode 100644 index 000000000000..e5af65059a0c --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Model.g.cs @@ -0,0 +1,1172 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/model.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Retail.V2 { + + /// Holder for reflection information generated from google/cloud/retail/v2/model.proto + public static partial class ModelReflection { + + #region Descriptor + /// File descriptor for google/cloud/retail/v2/model.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ModelReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJnb29nbGUvY2xvdWQvcmV0YWlsL3YyL21vZGVsLnByb3RvEhZnb29nbGUu", + "Y2xvdWQucmV0YWlsLnYyGh9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2aW9yLnBy", + "b3RvGhlnb29nbGUvYXBpL3Jlc291cmNlLnByb3RvGiNnb29nbGUvY2xvdWQv", + "cmV0YWlsL3YyL2NvbW1vbi5wcm90bxofZ29vZ2xlL3Byb3RvYnVmL3RpbWVz", + "dGFtcC5wcm90byKiCgoFTW9kZWwSEQoEbmFtZRgBIAEoCUID4EECEhkKDGRp", + "c3BsYXlfbmFtZRgCIAEoCUID4EECEkgKDnRyYWluaW5nX3N0YXRlGAMgASgO", + "MisuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Nb2RlbC5UcmFpbmluZ1N0YXRl", + "QgPgQQESRgoNc2VydmluZ19zdGF0ZRgEIAEoDjIqLmdvb2dsZS5jbG91ZC5y", + "ZXRhaWwudjIuTW9kZWwuU2VydmluZ1N0YXRlQgPgQQMSNAoLY3JlYXRlX3Rp", + "bWUYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSNAoL", + "dXBkYXRlX3RpbWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1w", + "QgPgQQMSEQoEdHlwZRgHIAEoCUID4EECEiMKFm9wdGltaXphdGlvbl9vYmpl", + "Y3RpdmUYCCABKAlCA+BBARJVChVwZXJpb2RpY190dW5pbmdfc3RhdGUYCyAB", + "KA4yMS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLk1vZGVsLlBlcmlvZGljVHVu", + "aW5nU3RhdGVCA+BBARI3Cg5sYXN0X3R1bmVfdGltZRgMIAEoCzIaLmdvb2ds", + "ZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIdChB0dW5pbmdfb3BlcmF0aW9u", + "GA8gASgJQgPgQQMSQAoKZGF0YV9zdGF0ZRgQIAEoDjInLmdvb2dsZS5jbG91", + "ZC5yZXRhaWwudjIuTW9kZWwuRGF0YVN0YXRlQgPgQQMSVQoQZmlsdGVyaW5n", + "X29wdGlvbhgSIAEoDjI2Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuUmVjb21t", + "ZW5kYXRpb25zRmlsdGVyaW5nT3B0aW9uQgPgQQESUgoUc2VydmluZ19jb25m", + "aWdfbGlzdHMYEyADKAsyLy5nb29nbGUuY2xvdWQucmV0YWlsLnYyLk1vZGVs", + "LlNlcnZpbmdDb25maWdMaXN0QgPgQQMaNAoRU2VydmluZ0NvbmZpZ0xpc3QS", + "HwoSc2VydmluZ19jb25maWdfaWRzGAEgAygJQgPgQQEiUgoMU2VydmluZ1N0", + "YXRlEh0KGVNFUlZJTkdfU1RBVEVfVU5TUEVDSUZJRUQQABIMCghJTkFDVElW", + "RRABEgoKBkFDVElWRRACEgkKBVRVTkVEEAMiSQoNVHJhaW5pbmdTdGF0ZRIe", + "ChpUUkFJTklOR19TVEFURV9VTlNQRUNJRklFRBAAEgoKBlBBVVNFRBABEgwK", + "CFRSQUlOSU5HEAIikAEKE1BlcmlvZGljVHVuaW5nU3RhdGUSJQohUEVSSU9E", + "SUNfVFVOSU5HX1NUQVRFX1VOU1BFQ0lGSUVEEAASHAoYUEVSSU9ESUNfVFVO", + "SU5HX0RJU0FCTEVEEAESFwoTQUxMX1RVTklOR19ESVNBQkxFRBADEhsKF1BF", + "UklPRElDX1RVTklOR19FTkFCTEVEEAIiRAoJRGF0YVN0YXRlEhoKFkRBVEFf", + "U1RBVEVfVU5TUEVDSUZJRUQQABILCgdEQVRBX09LEAESDgoKREFUQV9FUlJP", + "UhACOmvqQWgKG3JldGFpbC5nb29nbGVhcGlzLmNvbS9Nb2RlbBJJcHJvamVj", + "dHMve3Byb2plY3R9L2xvY2F0aW9ucy97bG9jYXRpb259L2NhdGFsb2dzL3tj", + "YXRhbG9nfS9tb2RlbHMve21vZGVsfUK1AQoaY29tLmdvb2dsZS5jbG91ZC5y", + "ZXRhaWwudjJCCk1vZGVsUHJvdG9QAVoyY2xvdWQuZ29vZ2xlLmNvbS9nby9y", + "ZXRhaWwvYXBpdjIvcmV0YWlscGI7cmV0YWlscGKiAgZSRVRBSUyqAhZHb29n", + "bGUuQ2xvdWQuUmV0YWlsLlYyygIWR29vZ2xlXENsb3VkXFJldGFpbFxWMuoC", + "GUdvb2dsZTo6Q2xvdWQ6OlJldGFpbDo6VjJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Retail.V2.CommonReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Model), global::Google.Cloud.Retail.V2.Model.Parser, new[]{ "Name", "DisplayName", "TrainingState", "ServingState", "CreateTime", "UpdateTime", "Type", "OptimizationObjective", "PeriodicTuningState", "LastTuneTime", "TuningOperation", "DataState", "FilteringOption", "ServingConfigLists" }, null, new[]{ typeof(global::Google.Cloud.Retail.V2.Model.Types.ServingState), typeof(global::Google.Cloud.Retail.V2.Model.Types.TrainingState), typeof(global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState), typeof(global::Google.Cloud.Retail.V2.Model.Types.DataState) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Model.Types.ServingConfigList), global::Google.Cloud.Retail.V2.Model.Types.ServingConfigList.Parser, new[]{ "ServingConfigIds" }, null, null, null, null)}) + })); + } + #endregion + + } + #region Messages + /// + /// Metadata that describes the training and serving parameters of a + /// [Model][google.cloud.retail.v2.Model]. A + /// [Model][google.cloud.retail.v2.Model] can be associated with a + /// [ServingConfig][google.cloud.retail.v2.ServingConfig] and then queried + /// through the Predict API. + /// + public sealed partial class Model : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Model()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Model() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Model(Model other) : this() { + name_ = other.name_; + displayName_ = other.displayName_; + trainingState_ = other.trainingState_; + servingState_ = other.servingState_; + createTime_ = other.createTime_ != null ? other.createTime_.Clone() : null; + updateTime_ = other.updateTime_ != null ? other.updateTime_.Clone() : null; + type_ = other.type_; + optimizationObjective_ = other.optimizationObjective_; + periodicTuningState_ = other.periodicTuningState_; + lastTuneTime_ = other.lastTuneTime_ != null ? other.lastTuneTime_.Clone() : null; + tuningOperation_ = other.tuningOperation_; + dataState_ = other.dataState_; + filteringOption_ = other.filteringOption_; + servingConfigLists_ = other.servingConfigLists_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Model Clone() { + return new Model(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 2; + private string displayName_ = ""; + /// + /// Required. The display name of the model. + /// + /// Should be human readable, used to display Recommendation Models in the + /// Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 + /// characters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "training_state" field. + public const int TrainingStateFieldNumber = 3; + private global::Google.Cloud.Retail.V2.Model.Types.TrainingState trainingState_ = global::Google.Cloud.Retail.V2.Model.Types.TrainingState.Unspecified; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Model.Types.TrainingState TrainingState { + get { return trainingState_; } + set { + trainingState_ = value; + } + } + + /// Field number for the "serving_state" field. + public const int ServingStateFieldNumber = 4; + private global::Google.Cloud.Retail.V2.Model.Types.ServingState servingState_ = global::Google.Cloud.Retail.V2.Model.Types.ServingState.Unspecified; + /// + /// Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Model.Types.ServingState ServingState { + get { return servingState_; } + set { + servingState_ = value; + } + } + + /// Field number for the "create_time" field. + public const int CreateTimeFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.Timestamp createTime_; + /// + /// Output only. Timestamp the Recommendation Model was created at. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp CreateTime { + get { return createTime_; } + set { + createTime_ = value; + } + } + + /// Field number for the "update_time" field. + public const int UpdateTimeFieldNumber = 6; + private global::Google.Protobuf.WellKnownTypes.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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp UpdateTime { + get { return updateTime_; } + set { + updateTime_ = value; + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 7; + private string 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`, `on-sale-items`, and `recently-viewed`(readonly value). + /// + /// This field together with + /// [optimization_objective][google.cloud.retail.v2.Model.optimization_objective] + /// describe model metadata to use to control model training and serving. + /// See https://cloud.google.com/retail/docs/models + /// for more details on what the model metadata control and which combination + /// of parameters are valid. For invalid combinations of parameters (e.g. type + /// = `frequently-bought-together` and optimization_objective = `ctr`), you + /// receive an error 400 if you try to create/update a recommendation with + /// this set of knobs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "optimization_objective" field. + public const int OptimizationObjectiveFieldNumber = 8; + private string 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` + /// + /// This field together with + /// [optimization_objective][google.cloud.retail.v2.Model.type] + /// describe model metadata to use to control model training and serving. + /// See https://cloud.google.com/retail/docs/models + /// for more details on what the model metadata control and which combination + /// of parameters are valid. For invalid combinations of parameters (e.g. type + /// = `frequently-bought-together` and optimization_objective = `ctr`), you + /// receive an error 400 if you try to create/update a recommendation with + /// this set of knobs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OptimizationObjective { + get { return optimizationObjective_; } + set { + optimizationObjective_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "periodic_tuning_state" field. + public const int PeriodicTuningStateFieldNumber = 11; + private global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState periodicTuningState_ = global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState.Unspecified; + /// + /// 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`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState PeriodicTuningState { + get { return periodicTuningState_; } + set { + periodicTuningState_ = value; + } + } + + /// Field number for the "last_tune_time" field. + public const int LastTuneTimeFieldNumber = 12; + private global::Google.Protobuf.WellKnownTypes.Timestamp lastTuneTime_; + /// + /// Output only. The timestamp when the latest successful tune finished. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp LastTuneTime { + get { return lastTuneTime_; } + set { + lastTuneTime_ = value; + } + } + + /// Field number for the "tuning_operation" field. + public const int TuningOperationFieldNumber = 15; + private string 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TuningOperation { + get { return tuningOperation_; } + set { + tuningOperation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "data_state" field. + public const int DataStateFieldNumber = 16; + private global::Google.Cloud.Retail.V2.Model.Types.DataState dataState_ = global::Google.Cloud.Retail.V2.Model.Types.DataState.Unspecified; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Model.Types.DataState DataState { + get { return dataState_; } + set { + dataState_ = value; + } + } + + /// Field number for the "filtering_option" field. + public const int FilteringOptionFieldNumber = 18; + private global::Google.Cloud.Retail.V2.RecommendationsFilteringOption filteringOption_ = global::Google.Cloud.Retail.V2.RecommendationsFilteringOption.Unspecified; + /// + /// Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering + /// by attributes is enabled for the model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.RecommendationsFilteringOption FilteringOption { + get { return filteringOption_; } + set { + filteringOption_ = value; + } + } + + /// Field number for the "serving_config_lists" field. + public const int ServingConfigListsFieldNumber = 19; + private static readonly pb::FieldCodec _repeated_servingConfigLists_codec + = pb::FieldCodec.ForMessage(154, global::Google.Cloud.Retail.V2.Model.Types.ServingConfigList.Parser); + private readonly pbc::RepeatedField servingConfigLists_ = new pbc::RepeatedField(); + /// + /// Output only. The list of valid serving configs associated with the + /// PageOptimizationConfig. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ServingConfigLists { + get { return servingConfigLists_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Model); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Model other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (DisplayName != other.DisplayName) return false; + if (TrainingState != other.TrainingState) return false; + if (ServingState != other.ServingState) return false; + if (!object.Equals(CreateTime, other.CreateTime)) return false; + if (!object.Equals(UpdateTime, other.UpdateTime)) return false; + if (Type != other.Type) return false; + if (OptimizationObjective != other.OptimizationObjective) return false; + if (PeriodicTuningState != other.PeriodicTuningState) return false; + if (!object.Equals(LastTuneTime, other.LastTuneTime)) return false; + if (TuningOperation != other.TuningOperation) return false; + if (DataState != other.DataState) return false; + if (FilteringOption != other.FilteringOption) return false; + if(!servingConfigLists_.Equals(other.servingConfigLists_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (TrainingState != global::Google.Cloud.Retail.V2.Model.Types.TrainingState.Unspecified) hash ^= TrainingState.GetHashCode(); + if (ServingState != global::Google.Cloud.Retail.V2.Model.Types.ServingState.Unspecified) hash ^= ServingState.GetHashCode(); + if (createTime_ != null) hash ^= CreateTime.GetHashCode(); + if (updateTime_ != null) hash ^= UpdateTime.GetHashCode(); + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (OptimizationObjective.Length != 0) hash ^= OptimizationObjective.GetHashCode(); + if (PeriodicTuningState != global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState.Unspecified) hash ^= PeriodicTuningState.GetHashCode(); + if (lastTuneTime_ != null) hash ^= LastTuneTime.GetHashCode(); + if (TuningOperation.Length != 0) hash ^= TuningOperation.GetHashCode(); + if (DataState != global::Google.Cloud.Retail.V2.Model.Types.DataState.Unspecified) hash ^= DataState.GetHashCode(); + if (FilteringOption != global::Google.Cloud.Retail.V2.RecommendationsFilteringOption.Unspecified) hash ^= FilteringOption.GetHashCode(); + hash ^= servingConfigLists_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DisplayName); + } + if (TrainingState != global::Google.Cloud.Retail.V2.Model.Types.TrainingState.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) TrainingState); + } + if (ServingState != global::Google.Cloud.Retail.V2.Model.Types.ServingState.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) ServingState); + } + if (createTime_ != null) { + output.WriteRawTag(42); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(50); + output.WriteMessage(UpdateTime); + } + if (Type.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Type); + } + if (OptimizationObjective.Length != 0) { + output.WriteRawTag(66); + output.WriteString(OptimizationObjective); + } + if (PeriodicTuningState != global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState.Unspecified) { + output.WriteRawTag(88); + output.WriteEnum((int) PeriodicTuningState); + } + if (lastTuneTime_ != null) { + output.WriteRawTag(98); + output.WriteMessage(LastTuneTime); + } + if (TuningOperation.Length != 0) { + output.WriteRawTag(122); + output.WriteString(TuningOperation); + } + if (DataState != global::Google.Cloud.Retail.V2.Model.Types.DataState.Unspecified) { + output.WriteRawTag(128, 1); + output.WriteEnum((int) DataState); + } + if (FilteringOption != global::Google.Cloud.Retail.V2.RecommendationsFilteringOption.Unspecified) { + output.WriteRawTag(144, 1); + output.WriteEnum((int) FilteringOption); + } + servingConfigLists_.WriteTo(output, _repeated_servingConfigLists_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DisplayName); + } + if (TrainingState != global::Google.Cloud.Retail.V2.Model.Types.TrainingState.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) TrainingState); + } + if (ServingState != global::Google.Cloud.Retail.V2.Model.Types.ServingState.Unspecified) { + output.WriteRawTag(32); + output.WriteEnum((int) ServingState); + } + if (createTime_ != null) { + output.WriteRawTag(42); + output.WriteMessage(CreateTime); + } + if (updateTime_ != null) { + output.WriteRawTag(50); + output.WriteMessage(UpdateTime); + } + if (Type.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Type); + } + if (OptimizationObjective.Length != 0) { + output.WriteRawTag(66); + output.WriteString(OptimizationObjective); + } + if (PeriodicTuningState != global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState.Unspecified) { + output.WriteRawTag(88); + output.WriteEnum((int) PeriodicTuningState); + } + if (lastTuneTime_ != null) { + output.WriteRawTag(98); + output.WriteMessage(LastTuneTime); + } + if (TuningOperation.Length != 0) { + output.WriteRawTag(122); + output.WriteString(TuningOperation); + } + if (DataState != global::Google.Cloud.Retail.V2.Model.Types.DataState.Unspecified) { + output.WriteRawTag(128, 1); + output.WriteEnum((int) DataState); + } + if (FilteringOption != global::Google.Cloud.Retail.V2.RecommendationsFilteringOption.Unspecified) { + output.WriteRawTag(144, 1); + output.WriteEnum((int) FilteringOption); + } + servingConfigLists_.WriteTo(ref output, _repeated_servingConfigLists_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (TrainingState != global::Google.Cloud.Retail.V2.Model.Types.TrainingState.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TrainingState); + } + if (ServingState != global::Google.Cloud.Retail.V2.Model.Types.ServingState.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServingState); + } + if (createTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CreateTime); + } + if (updateTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateTime); + } + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (OptimizationObjective.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OptimizationObjective); + } + if (PeriodicTuningState != global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PeriodicTuningState); + } + if (lastTuneTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastTuneTime); + } + if (TuningOperation.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TuningOperation); + } + if (DataState != global::Google.Cloud.Retail.V2.Model.Types.DataState.Unspecified) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) DataState); + } + if (FilteringOption != global::Google.Cloud.Retail.V2.RecommendationsFilteringOption.Unspecified) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) FilteringOption); + } + size += servingConfigLists_.CalculateSize(_repeated_servingConfigLists_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Model other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + if (other.TrainingState != global::Google.Cloud.Retail.V2.Model.Types.TrainingState.Unspecified) { + TrainingState = other.TrainingState; + } + if (other.ServingState != global::Google.Cloud.Retail.V2.Model.Types.ServingState.Unspecified) { + ServingState = other.ServingState; + } + if (other.createTime_ != null) { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + CreateTime.MergeFrom(other.CreateTime); + } + if (other.updateTime_ != null) { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + UpdateTime.MergeFrom(other.UpdateTime); + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.OptimizationObjective.Length != 0) { + OptimizationObjective = other.OptimizationObjective; + } + if (other.PeriodicTuningState != global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState.Unspecified) { + PeriodicTuningState = other.PeriodicTuningState; + } + if (other.lastTuneTime_ != null) { + if (lastTuneTime_ == null) { + LastTuneTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + LastTuneTime.MergeFrom(other.LastTuneTime); + } + if (other.TuningOperation.Length != 0) { + TuningOperation = other.TuningOperation; + } + if (other.DataState != global::Google.Cloud.Retail.V2.Model.Types.DataState.Unspecified) { + DataState = other.DataState; + } + if (other.FilteringOption != global::Google.Cloud.Retail.V2.RecommendationsFilteringOption.Unspecified) { + FilteringOption = other.FilteringOption; + } + servingConfigLists_.Add(other.servingConfigLists_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + DisplayName = input.ReadString(); + break; + } + case 24: { + TrainingState = (global::Google.Cloud.Retail.V2.Model.Types.TrainingState) input.ReadEnum(); + break; + } + case 32: { + ServingState = (global::Google.Cloud.Retail.V2.Model.Types.ServingState) input.ReadEnum(); + break; + } + case 42: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 50: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 58: { + Type = input.ReadString(); + break; + } + case 66: { + OptimizationObjective = input.ReadString(); + break; + } + case 88: { + PeriodicTuningState = (global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState) input.ReadEnum(); + break; + } + case 98: { + if (lastTuneTime_ == null) { + LastTuneTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(LastTuneTime); + break; + } + case 122: { + TuningOperation = input.ReadString(); + break; + } + case 128: { + DataState = (global::Google.Cloud.Retail.V2.Model.Types.DataState) input.ReadEnum(); + break; + } + case 144: { + FilteringOption = (global::Google.Cloud.Retail.V2.RecommendationsFilteringOption) input.ReadEnum(); + break; + } + case 154: { + servingConfigLists_.AddEntriesFrom(input, _repeated_servingConfigLists_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + DisplayName = input.ReadString(); + break; + } + case 24: { + TrainingState = (global::Google.Cloud.Retail.V2.Model.Types.TrainingState) input.ReadEnum(); + break; + } + case 32: { + ServingState = (global::Google.Cloud.Retail.V2.Model.Types.ServingState) input.ReadEnum(); + break; + } + case 42: { + if (createTime_ == null) { + CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(CreateTime); + break; + } + case 50: { + if (updateTime_ == null) { + UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(UpdateTime); + break; + } + case 58: { + Type = input.ReadString(); + break; + } + case 66: { + OptimizationObjective = input.ReadString(); + break; + } + case 88: { + PeriodicTuningState = (global::Google.Cloud.Retail.V2.Model.Types.PeriodicTuningState) input.ReadEnum(); + break; + } + case 98: { + if (lastTuneTime_ == null) { + LastTuneTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(LastTuneTime); + break; + } + case 122: { + TuningOperation = input.ReadString(); + break; + } + case 128: { + DataState = (global::Google.Cloud.Retail.V2.Model.Types.DataState) input.ReadEnum(); + break; + } + case 144: { + FilteringOption = (global::Google.Cloud.Retail.V2.RecommendationsFilteringOption) input.ReadEnum(); + break; + } + case 154: { + servingConfigLists_.AddEntriesFrom(ref input, _repeated_servingConfigLists_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Model message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The serving state of the model. + /// + public enum ServingState { + /// + /// Unspecified serving state. + /// + [pbr::OriginalName("SERVING_STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// The model is not serving. + /// + [pbr::OriginalName("INACTIVE")] Inactive = 1, + /// + /// The model is serving and can be queried. + /// + [pbr::OriginalName("ACTIVE")] Active = 2, + /// + /// The model is trained on tuned hyperparameters and can be + /// queried. + /// + [pbr::OriginalName("TUNED")] Tuned = 3, + } + + /// + /// The training state of the model. + /// + public enum TrainingState { + /// + /// Unspecified training state. + /// + [pbr::OriginalName("TRAINING_STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// The model training is paused. + /// + [pbr::OriginalName("PAUSED")] Paused = 1, + /// + /// The model is training. + /// + [pbr::OriginalName("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 `TuneModel` + /// method, which starts a tuning process immediately and resets the quarterly + /// schedule. Enabling or disabling periodic tuning does not affect any + /// current tuning processes. + /// + public enum PeriodicTuningState { + /// + /// Unspecified default value, should never be explicitly set. + /// + [pbr::OriginalName("PERIODIC_TUNING_STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// The model has periodic tuning disabled. Tuning + /// can be reenabled by calling the `EnableModelPeriodicTuning` + /// method or by calling the `TuneModel` method. + /// + [pbr::OriginalName("PERIODIC_TUNING_DISABLED")] PeriodicTuningDisabled = 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. + /// + [pbr::OriginalName("ALL_TUNING_DISABLED")] AllTuningDisabled = 3, + /// + /// The model has periodic tuning enabled. Tuning + /// can be disabled by calling the `DisableModelPeriodicTuning` + /// method. + /// + [pbr::OriginalName("PERIODIC_TUNING_ENABLED")] PeriodicTuningEnabled = 2, + } + + /// + /// Describes whether this model have sufficient training data + /// to be continuously trained. + /// + public enum DataState { + /// + /// Unspecified default value, should never be explicitly set. + /// + [pbr::OriginalName("DATA_STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// The model has sufficient training data. + /// + [pbr::OriginalName("DATA_OK")] DataOk = 1, + /// + /// The model does not have sufficient training data. Error + /// messages can be queried via Stackdriver. + /// + [pbr::OriginalName("DATA_ERROR")] DataError = 2, + } + + /// + /// Represents an ordered combination of valid serving configs, which + /// can be used for `PAGE_OPTIMIZATION` recommendations. + /// + public sealed partial class ServingConfigList : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServingConfigList()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.Model.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServingConfigList() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServingConfigList(ServingConfigList other) : this() { + servingConfigIds_ = other.servingConfigIds_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServingConfigList Clone() { + return new ServingConfigList(this); + } + + /// Field number for the "serving_config_ids" field. + public const int ServingConfigIdsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_servingConfigIds_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField servingConfigIds_ = new pbc::RepeatedField(); + /// + /// Optional. A set of valid serving configs that may be used for + /// `PAGE_OPTIMIZATION`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ServingConfigIds { + get { return servingConfigIds_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ServingConfigList); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ServingConfigList other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!servingConfigIds_.Equals(other.servingConfigIds_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= servingConfigIds_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + servingConfigIds_.WriteTo(output, _repeated_servingConfigIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + servingConfigIds_.WriteTo(ref output, _repeated_servingConfigIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += servingConfigIds_.CalculateSize(_repeated_servingConfigIds_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ServingConfigList other) { + if (other == null) { + return; + } + servingConfigIds_.Add(other.servingConfigIds_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + servingConfigIds_.AddEntriesFrom(input, _repeated_servingConfigIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + servingConfigIds_.AddEntriesFrom(ref input, _repeated_servingConfigIds_codec); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelResourceNames.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelResourceNames.g.cs new file mode 100644 index 000000000000..7f6d6d14c310 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelResourceNames.g.cs @@ -0,0 +1,283 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gcrv = Google.Cloud.Retail.V2; +using sys = System; + +namespace Google.Cloud.Retail.V2 +{ + /// Resource name for the Model resource. + public sealed partial class ModelName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. + /// + ProjectLocationCatalogModel = 1, + } + + private static gax::PathTemplate s_projectLocationCatalogModel = new gax::PathTemplate("projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static ModelName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ModelName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ModelName FromProjectLocationCatalogModel(string projectId, string locationId, string catalogId, string modelId) => + new ModelName(ResourceNameType.ProjectLocationCatalogModel, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), catalogId: gax::GaxPreconditions.CheckNotNullOrEmpty(catalogId, nameof(catalogId)), modelId: gax::GaxPreconditions.CheckNotNullOrEmpty(modelId, nameof(modelId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. + /// + public static string Format(string projectId, string locationId, string catalogId, string modelId) => + FormatProjectLocationCatalogModel(projectId, locationId, catalogId, modelId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. + /// + public static string FormatProjectLocationCatalogModel(string projectId, string locationId, string catalogId, string modelId) => + s_projectLocationCatalogModel.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(catalogId, nameof(catalogId)), gax::GaxPreconditions.CheckNotNullOrEmpty(modelId, nameof(modelId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ModelName Parse(string modelName) => Parse(modelName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing an + /// unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model} + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static ModelName Parse(string modelName, bool allowUnparsed) => + TryParse(modelName, allowUnparsed, out ModelName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string modelName, out ModelName result) => TryParse(modelName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model} + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string modelName, bool allowUnparsed, out ModelName result) + { + gax::GaxPreconditions.CheckNotNull(modelName, nameof(modelName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationCatalogModel.TryParseName(modelName, out resourceName)) + { + result = FromProjectLocationCatalogModel(resourceName[0], resourceName[1], resourceName[2], resourceName[3]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(modelName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ModelName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string catalogId = null, string locationId = null, string modelId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + CatalogId = catalogId; + LocationId = locationId; + ModelId = modelId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/models/{model} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + public ModelName(string projectId, string locationId, string catalogId, string modelId) : this(ResourceNameType.ProjectLocationCatalogModel, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), catalogId: gax::GaxPreconditions.CheckNotNullOrEmpty(catalogId, nameof(catalogId)), modelId: gax::GaxPreconditions.CheckNotNullOrEmpty(modelId, nameof(modelId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Catalog ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string CatalogId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Model ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ModelId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationCatalogModel: return s_projectLocationCatalogModel.Expand(ProjectId, LocationId, CatalogId, ModelId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as ModelName); + + /// + public bool Equals(ModelName other) => ToString() == other?.ToString(); + + /// + public static bool operator ==(ModelName a, ModelName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// + public static bool operator !=(ModelName a, ModelName b) => !(a == b); + } + + public partial class Model + { + /// + /// -typed view over the resource name property. + /// + public gcrv::ModelName ModelName + { + get => string.IsNullOrEmpty(Name) ? null : gcrv::ModelName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelService.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelService.g.cs new file mode 100644 index 000000000000..52210614bd0a --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelService.g.cs @@ -0,0 +1,2699 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/model_service.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.Retail.V2 { + + /// Holder for reflection information generated from google/cloud/retail/v2/model_service.proto + public static partial class ModelServiceReflection { + + #region Descriptor + /// File descriptor for google/cloud/retail/v2/model_service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ModelServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cipnb29nbGUvY2xvdWQvcmV0YWlsL3YyL21vZGVsX3NlcnZpY2UucHJvdG8S", + "Fmdvb2dsZS5jbG91ZC5yZXRhaWwudjIaHGdvb2dsZS9hcGkvYW5ub3RhdGlv", + "bnMucHJvdG8aF2dvb2dsZS9hcGkvY2xpZW50LnByb3RvGh9nb29nbGUvYXBp", + "L2ZpZWxkX2JlaGF2aW9yLnByb3RvGhlnb29nbGUvYXBpL3Jlc291cmNlLnBy", + "b3RvGiJnb29nbGUvY2xvdWQvcmV0YWlsL3YyL21vZGVsLnByb3RvGiNnb29n", + "bGUvbG9uZ3J1bm5pbmcvb3BlcmF0aW9ucy5wcm90bxobZ29vZ2xlL3Byb3Rv", + "YnVmL2VtcHR5LnByb3RvGiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5w", + "cm90byKUAQoSQ3JlYXRlTW9kZWxSZXF1ZXN0EjUKBnBhcmVudBgBIAEoCUIl", + "4EEC+kEfCh1yZXRhaWwuZ29vZ2xlYXBpcy5jb20vQ2F0YWxvZxIxCgVtb2Rl", + "bBgCIAEoCzIdLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuTW9kZWxCA+BBAhIU", + "CgdkcnlfcnVuGAMgASgIQgPgQQEifQoSVXBkYXRlTW9kZWxSZXF1ZXN0EjEK", + "BW1vZGVsGAEgASgLMh0uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Nb2RlbEID", + "4EECEjQKC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZp", + "ZWxkTWFza0ID4EEBIkQKD0dldE1vZGVsUmVxdWVzdBIxCgRuYW1lGAEgASgJ", + "QiPgQQL6QR0KG3JldGFpbC5nb29nbGVhcGlzLmNvbS9Nb2RlbCJGChFQYXVz", + "ZU1vZGVsUmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG3JldGFpbC5n", + "b29nbGVhcGlzLmNvbS9Nb2RlbCInChJSZXN1bWVNb2RlbFJlcXVlc3QSEQoE", + "bmFtZRgBIAEoCUID4EECInsKEUxpc3RNb2RlbHNSZXF1ZXN0EjUKBnBhcmVu", + "dBgBIAEoCUIl4EEC+kEfCh1yZXRhaWwuZ29vZ2xlYXBpcy5jb20vQ2F0YWxv", + "ZxIWCglwYWdlX3NpemUYAiABKAVCA+BBARIXCgpwYWdlX3Rva2VuGAMgASgJ", + "QgPgQQEiRwoSRGVsZXRlTW9kZWxSZXF1ZXN0EjEKBG5hbWUYASABKAlCI+BB", + "AvpBHQobcmV0YWlsLmdvb2dsZWFwaXMuY29tL01vZGVsIlwKEkxpc3RNb2Rl", + "bHNSZXNwb25zZRItCgZtb2RlbHMYASADKAsyHS5nb29nbGUuY2xvdWQucmV0", + "YWlsLnYyLk1vZGVsEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJFChBUdW5l", + "TW9kZWxSZXF1ZXN0EjEKBG5hbWUYASABKAlCI+BBAvpBHQobcmV0YWlsLmdv", + "b2dsZWFwaXMuY29tL01vZGVsIiQKE0NyZWF0ZU1vZGVsTWV0YWRhdGESDQoF", + "bW9kZWwYASABKAkiIgoRVHVuZU1vZGVsTWV0YWRhdGESDQoFbW9kZWwYASAB", + "KAkiEwoRVHVuZU1vZGVsUmVzcG9uc2UyxQwKDE1vZGVsU2VydmljZRL7AQoL", + "Q3JlYXRlTW9kZWwSKi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkNyZWF0ZU1v", + "ZGVsUmVxdWVzdBodLmdvb2dsZS5sb25ncnVubmluZy5PcGVyYXRpb24ioAGC", + "0+STAj4iNS92Mi97cGFyZW50PXByb2plY3RzLyovbG9jYXRpb25zLyovY2F0", + "YWxvZ3MvKn0vbW9kZWxzOgVtb2RlbNpBDHBhcmVudCxtb2RlbMpBSgocZ29v", + "Z2xlLmNsb3VkLnJldGFpbC52Mi5Nb2RlbBIqZ29vZ2xlLmNsb3VkLnJldGFp", + "bC52Mi5DcmVhdGVNb2RlbE1ldGFkYXRhEpgBCghHZXRNb2RlbBInLmdvb2ds", + "ZS5jbG91ZC5yZXRhaWwudjIuR2V0TW9kZWxSZXF1ZXN0Gh0uZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52Mi5Nb2RlbCJEgtPkkwI3EjUvdjIve25hbWU9cHJvamVj", + "dHMvKi9sb2NhdGlvbnMvKi9jYXRhbG9ncy8qL21vZGVscy8qfdpBBG5hbWUS", + "pQEKClBhdXNlTW9kZWwSKS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlBhdXNl", + "TW9kZWxSZXF1ZXN0Gh0uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Nb2RlbCJN", + "gtPkkwJAIjsvdjIve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9jYXRh", + "bG9ncy8qL21vZGVscy8qfTpwYXVzZToBKtpBBG5hbWUSqAEKC1Jlc3VtZU1v", + "ZGVsEiouZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5SZXN1bWVNb2RlbFJlcXVl", + "c3QaHS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLk1vZGVsIk6C0+STAkEiPC92", + "Mi97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL2NhdGFsb2dzLyovbW9k", + "ZWxzLyp9OnJlc3VtZToBKtpBBG5hbWUSlwEKC0RlbGV0ZU1vZGVsEiouZ29v", + "Z2xlLmNsb3VkLnJldGFpbC52Mi5EZWxldGVNb2RlbFJlcXVlc3QaFi5nb29n", + "bGUucHJvdG9idWYuRW1wdHkiRILT5JMCNyo1L3YyL3tuYW1lPXByb2plY3Rz", + "LyovbG9jYXRpb25zLyovY2F0YWxvZ3MvKi9tb2RlbHMvKn3aQQRuYW1lEqsB", + "CgpMaXN0TW9kZWxzEikuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5MaXN0TW9k", + "ZWxzUmVxdWVzdBoqLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuTGlzdE1vZGVs", + "c1Jlc3BvbnNlIkaC0+STAjcSNS92Mi97cGFyZW50PXByb2plY3RzLyovbG9j", + "YXRpb25zLyovY2F0YWxvZ3MvKn0vbW9kZWxz2kEGcGFyZW50ErgBCgtVcGRh", + "dGVNb2RlbBIqLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuVXBkYXRlTW9kZWxS", + "ZXF1ZXN0Gh0uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Nb2RlbCJegtPkkwJE", + "MjsvdjIve21vZGVsLm5hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9jYXRh", + "bG9ncy8qL21vZGVscy8qfToFbW9kZWzaQRFtb2RlbCx1cGRhdGVfbWFzaxL6", + "AQoJVHVuZU1vZGVsEiguZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5UdW5lTW9k", + "ZWxSZXF1ZXN0Gh0uZ29vZ2xlLmxvbmdydW5uaW5nLk9wZXJhdGlvbiKjAYLT", + "5JMCPyI6L3YyL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyovY2F0YWxv", + "Z3MvKi9tb2RlbHMvKn06dHVuZToBKtpBBG5hbWXKQVQKKGdvb2dsZS5jbG91", + "ZC5yZXRhaWwudjIuVHVuZU1vZGVsUmVzcG9uc2USKGdvb2dsZS5jbG91ZC5y", + "ZXRhaWwudjIuVHVuZU1vZGVsTWV0YWRhdGEaScpBFXJldGFpbC5nb29nbGVh", + "cGlzLmNvbdJBLmh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvY2xv", + "dWQtcGxhdGZvcm1CvAEKGmNvbS5nb29nbGUuY2xvdWQucmV0YWlsLnYyQhFN", + "b2RlbFNlcnZpY2VQcm90b1ABWjJjbG91ZC5nb29nbGUuY29tL2dvL3JldGFp", + "bC9hcGl2Mi9yZXRhaWxwYjtyZXRhaWxwYqICBlJFVEFJTKoCFkdvb2dsZS5D", + "bG91ZC5SZXRhaWwuVjLKAhZHb29nbGVcQ2xvdWRcUmV0YWlsXFYy6gIZR29v", + "Z2xlOjpDbG91ZDo6UmV0YWlsOjpWMmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Retail.V2.ModelReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CreateModelRequest), global::Google.Cloud.Retail.V2.CreateModelRequest.Parser, new[]{ "Parent", "Model", "DryRun" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.UpdateModelRequest), global::Google.Cloud.Retail.V2.UpdateModelRequest.Parser, new[]{ "Model", "UpdateMask" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.GetModelRequest), global::Google.Cloud.Retail.V2.GetModelRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.PauseModelRequest), global::Google.Cloud.Retail.V2.PauseModelRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ResumeModelRequest), global::Google.Cloud.Retail.V2.ResumeModelRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ListModelsRequest), global::Google.Cloud.Retail.V2.ListModelsRequest.Parser, new[]{ "Parent", "PageSize", "PageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.DeleteModelRequest), global::Google.Cloud.Retail.V2.DeleteModelRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ListModelsResponse), global::Google.Cloud.Retail.V2.ListModelsResponse.Parser, new[]{ "Models", "NextPageToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.TuneModelRequest), global::Google.Cloud.Retail.V2.TuneModelRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CreateModelMetadata), global::Google.Cloud.Retail.V2.CreateModelMetadata.Parser, new[]{ "Model" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.TuneModelMetadata), global::Google.Cloud.Retail.V2.TuneModelMetadata.Parser, new[]{ "Model" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.TuneModelResponse), global::Google.Cloud.Retail.V2.TuneModelResponse.Parser, null, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Request for creating a model. + /// + public sealed partial class CreateModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateModelRequest(CreateModelRequest other) : this() { + parent_ = other.parent_; + model_ = other.model_ != null ? other.model_.Clone() : null; + dryRun_ = other.dryRun_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateModelRequest Clone() { + return new CreateModelRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 2; + private global::Google.Cloud.Retail.V2.Model model_; + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Model Model { + get { return model_; } + set { + model_ = value; + } + } + + /// Field number for the "dry_run" field. + public const int DryRunFieldNumber = 3; + private bool dryRun_; + /// + /// Optional. Whether to run a dry run to validate the request (without + /// actually creating the model). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DryRun { + get { return dryRun_; } + set { + dryRun_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (!object.Equals(Model, other.Model)) return false; + if (DryRun != other.DryRun) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (model_ != null) hash ^= Model.GetHashCode(); + if (DryRun != false) hash ^= DryRun.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (model_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Model); + } + if (DryRun != false) { + output.WriteRawTag(24); + output.WriteBool(DryRun); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (model_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Model); + } + if (DryRun != false) { + output.WriteRawTag(24); + output.WriteBool(DryRun); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (model_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Model); + } + if (DryRun != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateModelRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.model_ != null) { + if (model_ == null) { + Model = new global::Google.Cloud.Retail.V2.Model(); + } + Model.MergeFrom(other.Model); + } + if (other.DryRun != false) { + DryRun = other.DryRun; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + if (model_ == null) { + Model = new global::Google.Cloud.Retail.V2.Model(); + } + input.ReadMessage(Model); + break; + } + case 24: { + DryRun = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + if (model_ == null) { + Model = new global::Google.Cloud.Retail.V2.Model(); + } + input.ReadMessage(Model); + break; + } + case 24: { + DryRun = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// Request for updating an existing model. + /// + public sealed partial class UpdateModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateModelRequest(UpdateModelRequest other) : this() { + model_ = other.model_ != null ? other.model_.Clone() : null; + updateMask_ = other.updateMask_ != null ? other.updateMask_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateModelRequest Clone() { + return new UpdateModelRequest(this); + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 1; + private global::Google.Cloud.Retail.V2.Model model_; + /// + /// Required. The body of the updated [Model][google.cloud.retail.v2.Model]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Model Model { + get { return model_; } + set { + model_ = value; + } + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Optional. Indicates which fields in the provided 'model' to + /// update. If not set, by default updates all fields. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.FieldMask UpdateMask { + get { return updateMask_; } + set { + updateMask_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UpdateModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Model, other.Model)) return false; + if (!object.Equals(UpdateMask, other.UpdateMask)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (model_ != null) hash ^= Model.GetHashCode(); + if (updateMask_ != null) hash ^= UpdateMask.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (model_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Model); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (model_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Model); + } + if (updateMask_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UpdateMask); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (model_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Model); + } + if (updateMask_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UpdateMask); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateModelRequest other) { + if (other == null) { + return; + } + if (other.model_ != null) { + if (model_ == null) { + Model = new global::Google.Cloud.Retail.V2.Model(); + } + Model.MergeFrom(other.Model); + } + if (other.updateMask_ != null) { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + UpdateMask.MergeFrom(other.UpdateMask); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (model_ == null) { + Model = new global::Google.Cloud.Retail.V2.Model(); + } + input.ReadMessage(Model); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (model_ == null) { + Model = new global::Google.Cloud.Retail.V2.Model(); + } + input.ReadMessage(Model); + break; + } + case 18: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + } + } + } + #endif + + } + + /// + /// Request for getting a model. + /// + public sealed partial class GetModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetModelRequest(GetModelRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetModelRequest Clone() { + return new GetModelRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetModelRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request for pausing training of a model. + /// + public sealed partial class PauseModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PauseModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PauseModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PauseModelRequest(PauseModelRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PauseModelRequest Clone() { + return new PauseModelRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PauseModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PauseModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PauseModelRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request for resuming training of a model. + /// + public sealed partial class ResumeModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResumeModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResumeModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResumeModelRequest(ResumeModelRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ResumeModelRequest Clone() { + return new ResumeModelRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The name of the model to resume. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ResumeModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ResumeModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ResumeModelRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request for listing models associated with a resource. + /// + public sealed partial class ListModelsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListModelsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListModelsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListModelsRequest(ListModelsRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListModelsRequest Clone() { + return new ListModelsRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. The parent for which to list models. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. Maximum number of results to return. If unspecified, defaults + /// to 50. Max allowed value is 1000. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// Optional. A page token, received from a previous `ListModels` + /// call. Provide this to retrieve the subsequent page. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListModelsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListModelsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListModelsRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request for deleting a model. + /// + public sealed partial class DeleteModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteModelRequest(DeleteModelRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteModelRequest Clone() { + return new DeleteModelRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeleteModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteModelRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Response to a ListModelRequest. + /// + public sealed partial class ListModelsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListModelsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListModelsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListModelsResponse(ListModelsResponse other) : this() { + models_ = other.models_.Clone(); + nextPageToken_ = other.nextPageToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListModelsResponse Clone() { + return new ListModelsResponse(this); + } + + /// Field number for the "models" field. + public const int ModelsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_models_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.Model.Parser); + private readonly pbc::RepeatedField models_ = new pbc::RepeatedField(); + /// + /// List of Models. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Models { + get { return models_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// Pagination token, if not returned indicates the last page. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListModelsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListModelsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!models_.Equals(other.models_)) return false; + if (NextPageToken != other.NextPageToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= models_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + models_.WriteTo(output, _repeated_models_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + models_.WriteTo(ref output, _repeated_models_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += models_.CalculateSize(_repeated_models_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListModelsResponse other) { + if (other == null) { + return; + } + models_.Add(other.models_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + models_.AddEntriesFrom(input, _repeated_models_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + models_.AddEntriesFrom(ref input, _repeated_models_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request to manually start a tuning process now (instead of waiting for + /// the periodically scheduled tuning to happen). + /// + public sealed partial class TuneModelRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TuneModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelRequest(TuneModelRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelRequest Clone() { + return new TuneModelRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TuneModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TuneModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TuneModelRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Metadata associated with a create operation. + /// + public sealed partial class CreateModelMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateModelMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateModelMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateModelMetadata(CreateModelMetadata other) : this() { + model_ = other.model_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateModelMetadata Clone() { + return new CreateModelMetadata(this); + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 1; + private string 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}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Model { + get { return model_; } + set { + model_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateModelMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateModelMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Model != other.Model) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Model.Length != 0) hash ^= Model.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Model.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Model); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Model.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Model); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Model.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Model); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateModelMetadata other) { + if (other == null) { + return; + } + if (other.Model.Length != 0) { + Model = other.Model; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Model = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Model = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Metadata associated with a tune operation. + /// + public sealed partial class TuneModelMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TuneModelMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelMetadata(TuneModelMetadata other) : this() { + model_ = other.model_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelMetadata Clone() { + return new TuneModelMetadata(this); + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 1; + private string 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}` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Model { + get { return model_; } + set { + model_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TuneModelMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TuneModelMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Model != other.Model) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Model.Length != 0) hash ^= Model.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Model.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Model); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Model.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Model); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Model.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Model); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TuneModelMetadata other) { + if (other == null) { + return; + } + if (other.Model.Length != 0) { + Model = other.Model; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Model = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Model = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Response associated with a tune operation. + /// + public sealed partial class TuneModelResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TuneModelResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelResponse(TuneModelResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TuneModelResponse Clone() { + return new TuneModelResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TuneModelResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TuneModelResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TuneModelResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceClient.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceClient.g.cs new file mode 100644 index 000000000000..30438cdbbcec --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceClient.g.cs @@ -0,0 +1,1744 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using wkt = Google.Protobuf.WellKnownTypes; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using mel = Microsoft.Extensions.Logging; +using sys = System; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; + +namespace Google.Cloud.Retail.V2 +{ + /// Settings for instances. + public sealed partial class ModelServiceSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static ModelServiceSettings GetDefault() => new ModelServiceSettings(); + + /// Constructs a new object with default settings. + public ModelServiceSettings() + { + } + + private ModelServiceSettings(ModelServiceSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + CreateModelSettings = existing.CreateModelSettings; + CreateModelOperationsSettings = existing.CreateModelOperationsSettings.Clone(); + GetModelSettings = existing.GetModelSettings; + PauseModelSettings = existing.PauseModelSettings; + ResumeModelSettings = existing.ResumeModelSettings; + DeleteModelSettings = existing.DeleteModelSettings; + ListModelsSettings = existing.ListModelsSettings; + UpdateModelSettings = existing.UpdateModelSettings; + TuneModelSettings = existing.TuneModelSettings; + TuneModelOperationsSettings = existing.TuneModelOperationsSettings.Clone(); + LocationsSettings = existing.LocationsSettings; + OnCopy(existing); + } + + partial void OnCopy(ModelServiceSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.CreateModel and ModelServiceClient.CreateModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings CreateModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// Long Running Operation settings for calls to ModelServiceClient.CreateModel and + /// ModelServiceClient.CreateModelAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings CreateModelOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// for synchronous and asynchronous calls to ModelServiceClient.GetModel + /// and ModelServiceClient.GetModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.PauseModel and ModelServiceClient.PauseModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings PauseModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.ResumeModel and ModelServiceClient.ResumeModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ResumeModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.DeleteModel and ModelServiceClient.DeleteModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings DeleteModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.ListModels and ModelServiceClient.ListModelsAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListModelsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.UpdateModel and ModelServiceClient.UpdateModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings UpdateModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// ModelServiceClient.TuneModel and ModelServiceClient.TuneModelAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings TuneModelSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// Long Running Operation settings for calls to ModelServiceClient.TuneModel and + /// ModelServiceClient.TuneModelAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings TuneModelOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// + /// The settings to use for the associated with the client. + /// + public gcl::LocationsSettings LocationsSettings { get; set; } = gcl::LocationsSettings.GetDefault(); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public ModelServiceSettings Clone() => new ModelServiceSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint etc. + /// + public sealed partial class ModelServiceClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public ModelServiceSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public ModelServiceClientBuilder() : base(ModelServiceClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref ModelServiceClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override ModelServiceClient Build() + { + ModelServiceClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private ModelServiceClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return ModelServiceClient.Create(callInvoker, Settings, Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return ModelServiceClient.Create(callInvoker, Settings, Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => ModelServiceClient.ChannelPool; + } + + /// ModelService client wrapper, for convenient use. + /// + /// 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 you to do the following: + /// + /// * 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 partial class ModelServiceClient + { + /// + /// The default endpoint for the ModelService service, which is a host of "retail.googleapis.com" and a port of + /// 443. + /// + public static string DefaultEndpoint { get; } = "retail.googleapis.com:443"; + + /// The default ModelService scopes. + /// + /// The default ModelService scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(ModelService.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new ModelServiceClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// The created . + public static ModelServiceClient Create() => new ModelServiceClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for remote operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static ModelServiceClient Create(grpccore::CallInvoker callInvoker, ModelServiceSettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + ModelService.ModelServiceClient grpcClient = new ModelService.ModelServiceClient(callInvoker); + return new ModelServiceClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC ModelService client + public virtual ModelService.ModelServiceClient GrpcClient => throw new sys::NotImplementedException(); + + /// The associated with this client. + public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException(); + + /// + /// Creates a new model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateModel(CreateModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Creates a new model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateModelAsync(CreateModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Creates a new model. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateModelAsync(CreateModelRequest request, st::CancellationToken cancellationToken) => + CreateModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for CreateModel. + public virtual lro::OperationsClient CreateModelOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of CreateModel. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceCreateModel(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CreateModelOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// CreateModel. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceCreateModelAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), CreateModelOperationsClient, callSettings); + + /// + /// Creates a new model. + /// + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateModel(string parent, Model model, gaxgrpc::CallSettings callSettings = null) => + CreateModel(new CreateModelRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + Model = gax::GaxPreconditions.CheckNotNull(model, nameof(model)), + }, callSettings); + + /// + /// Creates a new model. + /// + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateModelAsync(string parent, Model model, gaxgrpc::CallSettings callSettings = null) => + CreateModelAsync(new CreateModelRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + Model = gax::GaxPreconditions.CheckNotNull(model, nameof(model)), + }, callSettings); + + /// + /// Creates a new model. + /// + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateModelAsync(string parent, Model model, st::CancellationToken cancellationToken) => + CreateModelAsync(parent, model, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Creates a new model. + /// + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation CreateModel(CatalogName parent, Model model, gaxgrpc::CallSettings callSettings = null) => + CreateModel(new CreateModelRequest + { + ParentAsCatalogName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + Model = gax::GaxPreconditions.CheckNotNull(model, nameof(model)), + }, callSettings); + + /// + /// Creates a new model. + /// + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> CreateModelAsync(CatalogName parent, Model model, gaxgrpc::CallSettings callSettings = null) => + CreateModelAsync(new CreateModelRequest + { + ParentAsCatalogName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + Model = gax::GaxPreconditions.CheckNotNull(model, nameof(model)), + }, callSettings); + + /// + /// Creates a new model. + /// + /// + /// Required. The parent resource under which to create the model. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// Required. The payload of the [Model][google.cloud.retail.v2.Model] to + /// create. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> CreateModelAsync(CatalogName parent, Model model, st::CancellationToken cancellationToken) => + CreateModelAsync(parent, model, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model GetModel(GetModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetModelAsync(GetModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a model. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetModelAsync(GetModelRequest request, st::CancellationToken cancellationToken) => + GetModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model GetModel(string name, gaxgrpc::CallSettings callSettings = null) => + GetModel(new GetModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetModelAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetModelAsync(new GetModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetModelAsync(string name, st::CancellationToken cancellationToken) => + GetModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model GetModel(ModelName name, gaxgrpc::CallSettings callSettings = null) => + GetModel(new GetModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetModelAsync(ModelName name, gaxgrpc::CallSettings callSettings = null) => + GetModelAsync(new GetModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// get. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetModelAsync(ModelName name, st::CancellationToken cancellationToken) => + GetModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Pauses the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model PauseModel(PauseModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Pauses the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task PauseModelAsync(PauseModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Pauses the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task PauseModelAsync(PauseModelRequest request, st::CancellationToken cancellationToken) => + PauseModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Pauses the training of an existing model. + /// + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model PauseModel(string name, gaxgrpc::CallSettings callSettings = null) => + PauseModel(new PauseModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Pauses the training of an existing model. + /// + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task PauseModelAsync(string name, gaxgrpc::CallSettings callSettings = null) => + PauseModelAsync(new PauseModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Pauses the training of an existing model. + /// + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task PauseModelAsync(string name, st::CancellationToken cancellationToken) => + PauseModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Pauses the training of an existing model. + /// + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model PauseModel(ModelName name, gaxgrpc::CallSettings callSettings = null) => + PauseModel(new PauseModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Pauses the training of an existing model. + /// + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task PauseModelAsync(ModelName name, gaxgrpc::CallSettings callSettings = null) => + PauseModelAsync(new PauseModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Pauses the training of an existing model. + /// + /// + /// Required. The name of the model to pause. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task PauseModelAsync(ModelName name, st::CancellationToken cancellationToken) => + PauseModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Resumes the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model ResumeModel(ResumeModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Resumes the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ResumeModelAsync(ResumeModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Resumes the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ResumeModelAsync(ResumeModelRequest request, st::CancellationToken cancellationToken) => + ResumeModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Resumes the training of an existing model. + /// + /// + /// Required. The name of the model to resume. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model ResumeModel(string name, gaxgrpc::CallSettings callSettings = null) => + ResumeModel(new ResumeModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Resumes the training of an existing model. + /// + /// + /// Required. The name of the model to resume. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ResumeModelAsync(string name, gaxgrpc::CallSettings callSettings = null) => + ResumeModelAsync(new ResumeModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Resumes the training of an existing model. + /// + /// + /// Required. The name of the model to resume. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ResumeModelAsync(string name, st::CancellationToken cancellationToken) => + ResumeModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void DeleteModel(DeleteModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Deletes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task DeleteModelAsync(DeleteModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Deletes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task DeleteModelAsync(DeleteModelRequest request, st::CancellationToken cancellationToken) => + DeleteModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes an existing model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void DeleteModel(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteModel(new DeleteModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Deletes an existing model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task DeleteModelAsync(string name, gaxgrpc::CallSettings callSettings = null) => + DeleteModelAsync(new DeleteModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Deletes an existing model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task DeleteModelAsync(string name, st::CancellationToken cancellationToken) => + DeleteModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Deletes an existing model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual void DeleteModel(ModelName name, gaxgrpc::CallSettings callSettings = null) => + DeleteModel(new DeleteModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Deletes an existing model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task DeleteModelAsync(ModelName name, gaxgrpc::CallSettings callSettings = null) => + DeleteModelAsync(new DeleteModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Deletes an existing model. + /// + /// + /// Required. The resource name of the [Model][google.cloud.retail.v2.Model] to + /// delete. Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task DeleteModelAsync(ModelName name, st::CancellationToken cancellationToken) => + DeleteModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Lists all the models linked to this event store. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListModels(ListModelsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists all the models linked to this event store. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListModelsAsync(ListModelsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists all the models linked to this event store. + /// + /// + /// Required. The parent for which to list models. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListModels(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListModels(new ListModelsRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Lists all the models linked to this event store. + /// + /// + /// Required. The parent for which to list models. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListModelsAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListModelsAsync(new ListModelsRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Lists all the models linked to this event store. + /// + /// + /// Required. The parent for which to list models. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListModels(CatalogName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListModels(new ListModelsRequest + { + ParentAsCatalogName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Lists all the models linked to this event store. + /// + /// + /// Required. The parent for which to list models. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListModelsAsync(CatalogName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) => + ListModelsAsync(new ListModelsRequest + { + ParentAsCatalogName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + PageToken = pageToken ?? "", + PageSize = pageSize ?? 0, + }, callSettings); + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model UpdateModel(UpdateModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateModelAsync(UpdateModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateModelAsync(UpdateModelRequest request, st::CancellationToken cancellationToken) => + UpdateModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// + /// Required. The body of the updated [Model][google.cloud.retail.v2.Model]. + /// + /// + /// Optional. Indicates which fields in the provided 'model' to + /// update. If not set, by default updates all fields. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual Model UpdateModel(Model model, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateModel(new UpdateModelRequest + { + Model = gax::GaxPreconditions.CheckNotNull(model, nameof(model)), + UpdateMask = updateMask, + }, callSettings); + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// + /// Required. The body of the updated [Model][google.cloud.retail.v2.Model]. + /// + /// + /// Optional. Indicates which fields in the provided 'model' to + /// update. If not set, by default updates all fields. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateModelAsync(Model model, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateModelAsync(new UpdateModelRequest + { + Model = gax::GaxPreconditions.CheckNotNull(model, nameof(model)), + UpdateMask = updateMask, + }, callSettings); + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// + /// Required. The body of the updated [Model][google.cloud.retail.v2.Model]. + /// + /// + /// Optional. Indicates which fields in the provided 'model' to + /// update. If not set, by default updates all fields. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateModelAsync(Model model, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateModelAsync(model, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Tunes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation TuneModel(TuneModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Tunes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> TuneModelAsync(TuneModelRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Tunes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> TuneModelAsync(TuneModelRequest request, st::CancellationToken cancellationToken) => + TuneModelAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for TuneModel. + public virtual lro::OperationsClient TuneModelOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of TuneModel. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceTuneModel(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), TuneModelOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// TuneModel. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceTuneModelAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), TuneModelOperationsClient, callSettings); + + /// + /// Tunes an existing model. + /// + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation TuneModel(string name, gaxgrpc::CallSettings callSettings = null) => + TuneModel(new TuneModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Tunes an existing model. + /// + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> TuneModelAsync(string name, gaxgrpc::CallSettings callSettings = null) => + TuneModelAsync(new TuneModelRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Tunes an existing model. + /// + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> TuneModelAsync(string name, st::CancellationToken cancellationToken) => + TuneModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Tunes an existing model. + /// + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation TuneModel(ModelName name, gaxgrpc::CallSettings callSettings = null) => + TuneModel(new TuneModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Tunes an existing model. + /// + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> TuneModelAsync(ModelName name, gaxgrpc::CallSettings callSettings = null) => + TuneModelAsync(new TuneModelRequest + { + ModelName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Tunes an existing model. + /// + /// + /// Required. The resource name of the model to tune. + /// Format: + /// `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> TuneModelAsync(ModelName name, st::CancellationToken cancellationToken) => + TuneModelAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + } + + /// ModelService client wrapper implementation, for convenient use. + /// + /// 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 you to do the following: + /// + /// * 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 sealed partial class ModelServiceClientImpl : ModelServiceClient + { + private readonly gaxgrpc::ApiCall _callCreateModel; + + private readonly gaxgrpc::ApiCall _callGetModel; + + private readonly gaxgrpc::ApiCall _callPauseModel; + + private readonly gaxgrpc::ApiCall _callResumeModel; + + private readonly gaxgrpc::ApiCall _callDeleteModel; + + private readonly gaxgrpc::ApiCall _callListModels; + + private readonly gaxgrpc::ApiCall _callUpdateModel; + + private readonly gaxgrpc::ApiCall _callTuneModel; + + /// + /// Constructs a client wrapper for the ModelService service, with the specified gRPC client and settings. + /// + /// The underlying gRPC client. + /// The base used within this client. + /// Optional to use within this client. + public ModelServiceClientImpl(ModelService.ModelServiceClient grpcClient, ModelServiceSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + ModelServiceSettings effectiveSettings = settings ?? ModelServiceSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings, logger); + CreateModelOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateModelOperationsSettings, logger); + TuneModelOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.TuneModelOperationsSettings, logger); + LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger); + _callCreateModel = clientHelper.BuildApiCall("CreateModel", grpcClient.CreateModelAsync, grpcClient.CreateModel, effectiveSettings.CreateModelSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callCreateModel); + Modify_CreateModelApiCall(ref _callCreateModel); + _callGetModel = clientHelper.BuildApiCall("GetModel", grpcClient.GetModelAsync, grpcClient.GetModel, effectiveSettings.GetModelSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetModel); + Modify_GetModelApiCall(ref _callGetModel); + _callPauseModel = clientHelper.BuildApiCall("PauseModel", grpcClient.PauseModelAsync, grpcClient.PauseModel, effectiveSettings.PauseModelSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callPauseModel); + Modify_PauseModelApiCall(ref _callPauseModel); + _callResumeModel = clientHelper.BuildApiCall("ResumeModel", grpcClient.ResumeModelAsync, grpcClient.ResumeModel, effectiveSettings.ResumeModelSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callResumeModel); + Modify_ResumeModelApiCall(ref _callResumeModel); + _callDeleteModel = clientHelper.BuildApiCall("DeleteModel", grpcClient.DeleteModelAsync, grpcClient.DeleteModel, effectiveSettings.DeleteModelSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callDeleteModel); + Modify_DeleteModelApiCall(ref _callDeleteModel); + _callListModels = clientHelper.BuildApiCall("ListModels", grpcClient.ListModelsAsync, grpcClient.ListModels, effectiveSettings.ListModelsSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListModels); + Modify_ListModelsApiCall(ref _callListModels); + _callUpdateModel = clientHelper.BuildApiCall("UpdateModel", grpcClient.UpdateModelAsync, grpcClient.UpdateModel, effectiveSettings.UpdateModelSettings).WithGoogleRequestParam("model.name", request => request.Model?.Name); + Modify_ApiCall(ref _callUpdateModel); + Modify_UpdateModelApiCall(ref _callUpdateModel); + _callTuneModel = clientHelper.BuildApiCall("TuneModel", grpcClient.TuneModelAsync, grpcClient.TuneModel, effectiveSettings.TuneModelSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callTuneModel); + Modify_TuneModelApiCall(ref _callTuneModel); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_CreateModelApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetModelApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_PauseModelApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ResumeModelApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_DeleteModelApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListModelsApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateModelApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_TuneModelApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(ModelService.ModelServiceClient grpcClient, ModelServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC ModelService client + public override ModelService.ModelServiceClient GrpcClient { get; } + + /// The associated with this client. + public override gcl::LocationsClient LocationsClient { get; } + + partial void Modify_CreateModelRequest(ref CreateModelRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetModelRequest(ref GetModelRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_PauseModelRequest(ref PauseModelRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ResumeModelRequest(ref ResumeModelRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_DeleteModelRequest(ref DeleteModelRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListModelsRequest(ref ListModelsRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateModelRequest(ref UpdateModelRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_TuneModelRequest(ref TuneModelRequest request, ref gaxgrpc::CallSettings settings); + + /// The long-running operations client for CreateModel. + public override lro::OperationsClient CreateModelOperationsClient { get; } + + /// + /// Creates a new model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation CreateModel(CreateModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateModelRequest(ref request, ref callSettings); + return new lro::Operation(_callCreateModel.Sync(request, callSettings), CreateModelOperationsClient); + } + + /// + /// Creates a new model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> CreateModelAsync(CreateModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_CreateModelRequest(ref request, ref callSettings); + return new lro::Operation(await _callCreateModel.Async(request, callSettings).ConfigureAwait(false), CreateModelOperationsClient); + } + + /// + /// Gets a model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Model GetModel(GetModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetModelRequest(ref request, ref callSettings); + return _callGetModel.Sync(request, callSettings); + } + + /// + /// Gets a model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetModelAsync(GetModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetModelRequest(ref request, ref callSettings); + return _callGetModel.Async(request, callSettings); + } + + /// + /// Pauses the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Model PauseModel(PauseModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_PauseModelRequest(ref request, ref callSettings); + return _callPauseModel.Sync(request, callSettings); + } + + /// + /// Pauses the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task PauseModelAsync(PauseModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_PauseModelRequest(ref request, ref callSettings); + return _callPauseModel.Async(request, callSettings); + } + + /// + /// Resumes the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Model ResumeModel(ResumeModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ResumeModelRequest(ref request, ref callSettings); + return _callResumeModel.Sync(request, callSettings); + } + + /// + /// Resumes the training of an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task ResumeModelAsync(ResumeModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ResumeModelRequest(ref request, ref callSettings); + return _callResumeModel.Async(request, callSettings); + } + + /// + /// Deletes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override void DeleteModel(DeleteModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteModelRequest(ref request, ref callSettings); + _callDeleteModel.Sync(request, callSettings); + } + + /// + /// Deletes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task DeleteModelAsync(DeleteModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_DeleteModelRequest(ref request, ref callSettings); + return _callDeleteModel.Async(request, callSettings); + } + + /// + /// Lists all the models linked to this event store. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListModels(ListModelsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListModelsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListModels, request, callSettings); + } + + /// + /// Lists all the models linked to this event store. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListModelsAsync(ListModelsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListModelsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListModels, request, callSettings); + } + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override Model UpdateModel(UpdateModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateModelRequest(ref request, ref callSettings); + return _callUpdateModel.Sync(request, callSettings); + } + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task UpdateModelAsync(UpdateModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateModelRequest(ref request, ref callSettings); + return _callUpdateModel.Async(request, callSettings); + } + + /// The long-running operations client for TuneModel. + public override lro::OperationsClient TuneModelOperationsClient { get; } + + /// + /// Tunes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation TuneModel(TuneModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_TuneModelRequest(ref request, ref callSettings); + return new lro::Operation(_callTuneModel.Sync(request, callSettings), TuneModelOperationsClient); + } + + /// + /// Tunes an existing model. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> TuneModelAsync(TuneModelRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_TuneModelRequest(ref request, ref callSettings); + return new lro::Operation(await _callTuneModel.Async(request, callSettings).ConfigureAwait(false), TuneModelOperationsClient); + } + } + + public partial class ListModelsRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListModelsResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => Models.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public static partial class ModelService + { + public partial class ModelServiceClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// A new Operations client for the same target as this client. + public virtual lro::Operations.OperationsClient CreateOperationsClient() => + new lro::Operations.OperationsClient(CallInvoker); + } + } + + public static partial class ModelService + { + public partial class ModelServiceClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// + /// A new for the same target as this client. + /// + public virtual gcl::Locations.LocationsClient CreateLocationsClient() => + new gcl::Locations.LocationsClient(CallInvoker); + } + } +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceGrpc.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceGrpc.g.cs new file mode 100644 index 000000000000..6faefaeb3510 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceGrpc.g.cs @@ -0,0 +1,743 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/model_service.proto +// +// Original file comments: +// 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. +// +#pragma warning disable 0414, 1591, 8981 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.Retail.V2 { + /// + /// 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 you to do the following: + /// + /// * 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 partial class ModelService + { + static readonly string __ServiceName = "google.cloud.retail.v2.ModelService"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_CreateModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.CreateModelRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_longrunning_Operation = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.LongRunning.Operation.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_GetModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.GetModelRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_Model = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.Model.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_PauseModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.PauseModelRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_ResumeModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.ResumeModelRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_DeleteModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.DeleteModelRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_ListModelsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.ListModelsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_ListModelsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.ListModelsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_UpdateModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.UpdateModelRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_TuneModelRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.TuneModelRequest.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_CreateModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CreateModel", + __Marshaller_google_cloud_retail_v2_CreateModelRequest, + __Marshaller_google_longrunning_Operation); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetModel", + __Marshaller_google_cloud_retail_v2_GetModelRequest, + __Marshaller_google_cloud_retail_v2_Model); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_PauseModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "PauseModel", + __Marshaller_google_cloud_retail_v2_PauseModelRequest, + __Marshaller_google_cloud_retail_v2_Model); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ResumeModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ResumeModel", + __Marshaller_google_cloud_retail_v2_ResumeModelRequest, + __Marshaller_google_cloud_retail_v2_Model); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_DeleteModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "DeleteModel", + __Marshaller_google_cloud_retail_v2_DeleteModelRequest, + __Marshaller_google_protobuf_Empty); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListModels = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListModels", + __Marshaller_google_cloud_retail_v2_ListModelsRequest, + __Marshaller_google_cloud_retail_v2_ListModelsResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateModel", + __Marshaller_google_cloud_retail_v2_UpdateModelRequest, + __Marshaller_google_cloud_retail_v2_Model); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_TuneModel = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "TuneModel", + __Marshaller_google_cloud_retail_v2_TuneModelRequest, + __Marshaller_google_longrunning_Operation); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Retail.V2.ModelServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of ModelService + [grpc::BindServiceMethod(typeof(ModelService), "BindService")] + public abstract partial class ModelServiceBase + { + /// + /// Creates a new model. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task CreateModel(global::Google.Cloud.Retail.V2.CreateModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets a model. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetModel(global::Google.Cloud.Retail.V2.GetModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Pauses the training of an existing model. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task PauseModel(global::Google.Cloud.Retail.V2.PauseModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Resumes the training of an existing model. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ResumeModel(global::Google.Cloud.Retail.V2.ResumeModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Deletes an existing model. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task DeleteModel(global::Google.Cloud.Retail.V2.DeleteModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Lists all the models linked to this event store. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListModels(global::Google.Cloud.Retail.V2.ListModelsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task UpdateModel(global::Google.Cloud.Retail.V2.UpdateModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Tunes an existing model. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task TuneModel(global::Google.Cloud.Retail.V2.TuneModelRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for ModelService + public partial class ModelServiceClient : grpc::ClientBase + { + /// Creates a new client for ModelService + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public ModelServiceClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for ModelService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public ModelServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected ModelServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected ModelServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Creates a new model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation CreateModel(global::Google.Cloud.Retail.V2.CreateModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Creates a new model. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation CreateModel(global::Google.Cloud.Retail.V2.CreateModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CreateModel, null, options, request); + } + /// + /// Creates a new model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateModelAsync(global::Google.Cloud.Retail.V2.CreateModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CreateModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Creates a new model. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall CreateModelAsync(global::Google.Cloud.Retail.V2.CreateModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CreateModel, null, options, request); + } + /// + /// Gets a model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model GetModel(global::Google.Cloud.Retail.V2.GetModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a model. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model GetModel(global::Google.Cloud.Retail.V2.GetModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetModel, null, options, request); + } + /// + /// Gets a model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetModelAsync(global::Google.Cloud.Retail.V2.GetModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a model. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetModelAsync(global::Google.Cloud.Retail.V2.GetModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetModel, null, options, request); + } + /// + /// Pauses the training of an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model PauseModel(global::Google.Cloud.Retail.V2.PauseModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return PauseModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Pauses the training of an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model PauseModel(global::Google.Cloud.Retail.V2.PauseModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_PauseModel, null, options, request); + } + /// + /// Pauses the training of an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall PauseModelAsync(global::Google.Cloud.Retail.V2.PauseModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return PauseModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Pauses the training of an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall PauseModelAsync(global::Google.Cloud.Retail.V2.PauseModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_PauseModel, null, options, request); + } + /// + /// Resumes the training of an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model ResumeModel(global::Google.Cloud.Retail.V2.ResumeModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ResumeModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Resumes the training of an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model ResumeModel(global::Google.Cloud.Retail.V2.ResumeModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ResumeModel, null, options, request); + } + /// + /// Resumes the training of an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ResumeModelAsync(global::Google.Cloud.Retail.V2.ResumeModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ResumeModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Resumes the training of an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ResumeModelAsync(global::Google.Cloud.Retail.V2.ResumeModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ResumeModel, null, options, request); + } + /// + /// Deletes an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Protobuf.WellKnownTypes.Empty DeleteModel(global::Google.Cloud.Retail.V2.DeleteModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Deletes an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Protobuf.WellKnownTypes.Empty DeleteModel(global::Google.Cloud.Retail.V2.DeleteModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_DeleteModel, null, options, request); + } + /// + /// Deletes an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteModelAsync(global::Google.Cloud.Retail.V2.DeleteModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return DeleteModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Deletes an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall DeleteModelAsync(global::Google.Cloud.Retail.V2.DeleteModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_DeleteModel, null, options, request); + } + /// + /// Lists all the models linked to this event store. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.ListModelsResponse ListModels(global::Google.Cloud.Retail.V2.ListModelsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListModels(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists all the models linked to this event store. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.ListModelsResponse ListModels(global::Google.Cloud.Retail.V2.ListModelsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListModels, null, options, request); + } + /// + /// Lists all the models linked to this event store. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListModelsAsync(global::Google.Cloud.Retail.V2.ListModelsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListModelsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists all the models linked to this event store. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListModelsAsync(global::Google.Cloud.Retail.V2.ListModelsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListModels, null, options, request); + } + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model UpdateModel(global::Google.Cloud.Retail.V2.UpdateModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.Retail.V2.Model UpdateModel(global::Google.Cloud.Retail.V2.UpdateModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateModel, null, options, request); + } + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateModelAsync(global::Google.Cloud.Retail.V2.UpdateModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Update of model metadata. Only fields that + /// currently can be updated are: `filtering_option` and + /// `periodic_tuning_state`. + /// If other values are provided, this API method ignores them. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall UpdateModelAsync(global::Google.Cloud.Retail.V2.UpdateModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateModel, null, options, request); + } + /// + /// Tunes an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation TuneModel(global::Google.Cloud.Retail.V2.TuneModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return TuneModel(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Tunes an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation TuneModel(global::Google.Cloud.Retail.V2.TuneModelRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_TuneModel, null, options, request); + } + /// + /// Tunes an existing model. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall TuneModelAsync(global::Google.Cloud.Retail.V2.TuneModelRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return TuneModelAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Tunes an existing model. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall TuneModelAsync(global::Google.Cloud.Retail.V2.TuneModelRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_TuneModel, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override ModelServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new ModelServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(ModelServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_CreateModel, serviceImpl.CreateModel) + .AddMethod(__Method_GetModel, serviceImpl.GetModel) + .AddMethod(__Method_PauseModel, serviceImpl.PauseModel) + .AddMethod(__Method_ResumeModel, serviceImpl.ResumeModel) + .AddMethod(__Method_DeleteModel, serviceImpl.DeleteModel) + .AddMethod(__Method_ListModels, serviceImpl.ListModels) + .AddMethod(__Method_UpdateModel, serviceImpl.UpdateModel) + .AddMethod(__Method_TuneModel, serviceImpl.TuneModel).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, ModelServiceBase serviceImpl) + { + serviceBinder.AddMethod(__Method_CreateModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.CreateModel)); + serviceBinder.AddMethod(__Method_GetModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetModel)); + serviceBinder.AddMethod(__Method_PauseModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.PauseModel)); + serviceBinder.AddMethod(__Method_ResumeModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ResumeModel)); + serviceBinder.AddMethod(__Method_DeleteModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.DeleteModel)); + serviceBinder.AddMethod(__Method_ListModels, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListModels)); + serviceBinder.AddMethod(__Method_UpdateModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateModel)); + serviceBinder.AddMethod(__Method_TuneModel, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.TuneModel)); + } + + } +} +#endregion diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceResourceNames.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceResourceNames.g.cs new file mode 100644 index 000000000000..19e52f3360a9 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ModelServiceResourceNames.g.cs @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gcrv = Google.Cloud.Retail.V2; + +namespace Google.Cloud.Retail.V2 +{ + public partial class CreateModelRequest + { + /// + /// -typed view over the resource name property. + /// + public CatalogName ParentAsCatalogName + { + get => string.IsNullOrEmpty(Parent) ? null : CatalogName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetModelRequest + { + /// + /// -typed view over the resource name property. + /// + public gcrv::ModelName ModelName + { + get => string.IsNullOrEmpty(Name) ? null : gcrv::ModelName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class PauseModelRequest + { + /// + /// -typed view over the resource name property. + /// + public gcrv::ModelName ModelName + { + get => string.IsNullOrEmpty(Name) ? null : gcrv::ModelName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ListModelsRequest + { + /// + /// -typed view over the resource name property. + /// + public CatalogName ParentAsCatalogName + { + get => string.IsNullOrEmpty(Parent) ? null : CatalogName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class DeleteModelRequest + { + /// + /// -typed view over the resource name property. + /// + public gcrv::ModelName ModelName + { + get => string.IsNullOrEmpty(Name) ? null : gcrv::ModelName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class TuneModelRequest + { + /// + /// -typed view over the resource name property. + /// + public gcrv::ModelName ModelName + { + get => string.IsNullOrEmpty(Name) ? null : gcrv::ModelName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PackageApiMetadata.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PackageApiMetadata.g.cs index d9154d08294a..de21b61a5b11 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PackageApiMetadata.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PackageApiMetadata.g.cs @@ -54,6 +54,8 @@ internal static class PackageApiMetadata yield return ControlReflection.Descriptor; yield return ControlServiceReflection.Descriptor; yield return ImportConfigReflection.Descriptor; + yield return ModelReflection.Descriptor; + yield return ModelServiceReflection.Descriptor; yield return PredictionServiceReflection.Descriptor; yield return ProductReflection.Descriptor; yield return ProductServiceReflection.Descriptor; diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PredictionService.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PredictionService.g.cs index c13267b5a0cd..f9f3484f9cc9 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PredictionService.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/PredictionService.g.cs @@ -255,6 +255,9 @@ public sealed partial class PredictRequest : pb::IMessage /// * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones")) /// * (availability: ANY("IN_STOCK")) AND /// (colors: ANY("Red") OR categories: ANY("Phones")) + /// + /// For more information, see + /// [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs). /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Product.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Product.g.cs index 3453cfa62d6d..73c30a005eb0 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Product.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/Product.g.cs @@ -1038,12 +1038,11 @@ public sealed partial class Product : pb::IMessage /// /// Output only. A list of local inventories specific to different places. /// - /// This is only available for users who have Retail Search enabled, and it can - /// be managed by + /// This field can be managed by /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] /// and /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] - /// APIs. + /// APIs if fine-grained, high-volume updates are necessary. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceClient.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceClient.g.cs index 0d6d2aa3c83e..8b986c9dcbd3 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceClient.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceClient.g.cs @@ -1585,9 +1585,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -1645,9 +1642,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -1705,9 +1699,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// A to use for this RPC. @@ -1791,9 +1782,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. The inventory information to update. The allowable fields to @@ -1923,9 +1911,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. The inventory information to update. The allowable fields to @@ -2055,9 +2040,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. The inventory information to update. The allowable fields to @@ -2134,6 +2116,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P SetInventoryAsync(inventory, setMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2155,9 +2145,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -2166,6 +2153,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P throw new sys::NotImplementedException(); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2187,9 +2182,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -2198,6 +2190,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P throw new sys::NotImplementedException(); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2219,9 +2219,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// A to use for this RPC. @@ -2257,6 +2254,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), AddFulfillmentPlacesOperationsClient, callSettings); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2278,9 +2283,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2300,6 +2302,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2321,9 +2331,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2343,6 +2350,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2364,9 +2379,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2383,6 +2395,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P AddFulfillmentPlacesAsync(product, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2404,9 +2424,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2426,6 +2443,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2447,9 +2472,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2469,6 +2491,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2490,9 +2520,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2509,6 +2536,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P AddFulfillmentPlacesAsync(product, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2530,9 +2565,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -2541,6 +2573,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P throw new sys::NotImplementedException(); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2562,9 +2602,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -2573,6 +2610,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P throw new sys::NotImplementedException(); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2594,9 +2639,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// A to use for this RPC. @@ -2632,6 +2674,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), RemoveFulfillmentPlacesOperationsClient, callSettings); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2653,9 +2703,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2675,6 +2722,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2696,9 +2751,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2718,6 +2770,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2739,9 +2799,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2758,6 +2815,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P RemoveFulfillmentPlacesAsync(product, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2779,9 +2844,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2801,6 +2863,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2822,9 +2892,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2844,6 +2911,14 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P }, callSettings); /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -2865,9 +2940,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -2912,9 +2984,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -2951,9 +3020,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -2990,9 +3056,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// A to use for this RPC. @@ -3056,9 +3119,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3106,9 +3166,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3156,9 +3213,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3203,9 +3257,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3253,9 +3304,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3303,9 +3351,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3348,9 +3393,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -3385,9 +3427,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -3422,9 +3461,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// A to use for this RPC. @@ -3486,9 +3522,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3534,9 +3567,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3582,9 +3612,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3627,9 +3654,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3675,9 +3699,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -3723,9 +3744,6 @@ internal static ProductServiceClient Create(grpccore::CallInvoker callInvoker, P /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// /// Required. Full resource name of [Product][google.cloud.retail.v2.Product], @@ -4091,9 +4109,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4154,9 +4169,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4171,6 +4183,14 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe public override lro::OperationsClient AddFulfillmentPlacesOperationsClient { get; } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -4192,9 +4212,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4206,6 +4223,14 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -4227,9 +4252,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4244,6 +4266,14 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe public override lro::OperationsClient RemoveFulfillmentPlacesOperationsClient { get; } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -4265,9 +4295,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4279,6 +4306,14 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -4300,9 +4335,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4345,9 +4377,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4387,9 +4416,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4430,9 +4456,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. @@ -4470,9 +4493,6 @@ public override void DeleteProduct(DeleteProductRequest request, gaxgrpc::CallSe /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request object containing all of the parameters for the API call. /// If not null, applies overrides to this RPC call. diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceGrpc.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceGrpc.g.cs index 7711adc5ae53..f1820328d926 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceGrpc.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ProductServiceGrpc.g.cs @@ -321,9 +321,6 @@ public abstract partial class ProductServiceBase /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request received from the client. /// The context of the server-side call handler being invoked. @@ -335,6 +332,14 @@ public abstract partial class ProductServiceBase } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -356,9 +361,6 @@ public abstract partial class ProductServiceBase /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request received from the client. /// The context of the server-side call handler being invoked. @@ -370,6 +372,14 @@ public abstract partial class ProductServiceBase } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -391,9 +401,6 @@ public abstract partial class ProductServiceBase /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request received from the client. /// The context of the server-side call handler being invoked. @@ -433,9 +440,6 @@ public abstract partial class ProductServiceBase /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request received from the client. /// The context of the server-side call handler being invoked. @@ -473,9 +477,6 @@ public abstract partial class ProductServiceBase /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request received from the client. /// The context of the server-side call handler being invoked. @@ -877,9 +878,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -941,9 +939,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1003,9 +998,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1067,9 +1059,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates are not marked as [done][google.longrunning.Operation.done] until /// they are obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1080,6 +1069,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return CallInvoker.AsyncUnaryCall(__Method_SetInventory, null, options, request); } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1101,9 +1098,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1116,6 +1110,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return AddFulfillmentPlaces(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1137,9 +1139,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1150,6 +1149,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return CallInvoker.BlockingUnaryCall(__Method_AddFulfillmentPlaces, null, options, request); } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1171,9 +1178,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1186,6 +1190,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return AddFulfillmentPlacesAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } /// + /// It is recommended to use the + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// method instead of + /// [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. + /// [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally adds place IDs to /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1207,9 +1219,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1220,6 +1229,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return CallInvoker.AsyncUnaryCall(__Method_AddFulfillmentPlaces, null, options, request); } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1241,9 +1258,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1256,6 +1270,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return RemoveFulfillmentPlaces(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1277,9 +1299,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1290,6 +1309,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return CallInvoker.BlockingUnaryCall(__Method_RemoveFulfillmentPlaces, null, options, request); } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1311,9 +1338,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1326,6 +1350,14 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con return RemoveFulfillmentPlacesAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } /// + /// It is recommended to use the + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// method instead of + /// [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + /// [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + /// achieves the same results but provides more fine-grained control over + /// ingesting local inventory data. + /// /// Incrementally removes place IDs from a /// [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. /// @@ -1347,9 +1379,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1388,9 +1417,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1431,9 +1457,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1472,9 +1495,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1515,9 +1535,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1554,9 +1571,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1595,9 +1609,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. @@ -1634,9 +1645,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The initial metadata to send with the call. This parameter is optional. @@ -1675,9 +1683,6 @@ protected ProductServiceClient(ClientBaseConfiguration configuration) : base(con /// [Operation][google.longrunning.Operation]s associated with the stale /// updates will not be marked as [done][google.longrunning.Operation.done] /// until being obsolete. - /// - /// This feature is only available for users who have Retail Search enabled. - /// Enable Retail Search on Cloud Console before using this feature. /// /// The request to send to the server. /// The options for the call. diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchService.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchService.g.cs index 826819715194..ef343e113157 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchService.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchService.g.cs @@ -31,7 +31,7 @@ public static partial class SearchServiceReflection { "cm90bxojZ29vZ2xlL2Nsb3VkL3JldGFpbC92Mi9jb21tb24ucHJvdG8aJGdv", "b2dsZS9jbG91ZC9yZXRhaWwvdjIvcHJvZHVjdC5wcm90bxogZ29vZ2xlL3By", "b3RvYnVmL2ZpZWxkX21hc2sucHJvdG8aHGdvb2dsZS9wcm90b2J1Zi9zdHJ1", - "Y3QucHJvdG8irhMKDVNlYXJjaFJlcXVlc3QSFgoJcGxhY2VtZW50GAEgASgJ", + "Y3QucHJvdG8ivhMKDVNlYXJjaFJlcXVlc3QSFgoJcGxhY2VtZW50GAEgASgJ", "QgPgQQISMQoGYnJhbmNoGAIgASgJQiH6QR4KHHJldGFpbC5nb29nbGVhcGlz", "LmNvbS9CcmFuY2gSDQoFcXVlcnkYAyABKAkSFwoKdmlzaXRvcl9pZBgEIAEo", "CUID4EECEjMKCXVzZXJfaW5mbxgFIAEoCzIgLmdvb2dsZS5jbG91ZC5yZXRh", @@ -53,95 +53,109 @@ public static partial class SearchServiceReflection { "MS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuTGFiZWxz", "RW50cnkSXQoVc3BlbGxfY29ycmVjdGlvbl9zcGVjGCMgASgLMjkuZ29vZ2xl", "LmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1ZXN0LlNwZWxsQ29ycmVjdGlv", - "blNwZWNIAIgBARqRAwoJRmFjZXRTcGVjElAKCWZhY2V0X2tleRgBIAEoCzI4", - "Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5GYWNldFNw", - "ZWMuRmFjZXRLZXlCA+BBAhINCgVsaW1pdBgCIAEoBRIcChRleGNsdWRlZF9m", - "aWx0ZXJfa2V5cxgDIAMoCRIfChdlbmFibGVfZHluYW1pY19wb3NpdGlvbhgE", - "IAEoCBrjAQoIRmFjZXRLZXkSEAoDa2V5GAEgASgJQgPgQQISMwoJaW50ZXJ2", - "YWxzGAIgAygLMiAuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5JbnRlcnZhbBIZ", - "ChFyZXN0cmljdGVkX3ZhbHVlcxgDIAMoCRIQCghwcmVmaXhlcxgIIAMoCRIQ", - "Cghjb250YWlucxgJIAMoCRIYChBjYXNlX2luc2Vuc2l0aXZlGAogASgIEhAK", - "CG9yZGVyX2J5GAQgASgJEg0KBXF1ZXJ5GAUgASgJEhYKDnJldHVybl9taW5f", - "bWF4GAsgASgIGpYBChBEeW5hbWljRmFjZXRTcGVjEkkKBG1vZGUYASABKA4y", - "Oy5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuRHluYW1p", - "Y0ZhY2V0U3BlYy5Nb2RlIjcKBE1vZGUSFAoQTU9ERV9VTlNQRUNJRklFRBAA", - "EgwKCERJU0FCTEVEEAESCwoHRU5BQkxFRBACGu4BCglCb29zdFNwZWMSYQoV", - "Y29uZGl0aW9uX2Jvb3N0X3NwZWNzGAEgAygLMkIuZ29vZ2xlLmNsb3VkLnJl", - "dGFpbC52Mi5TZWFyY2hSZXF1ZXN0LkJvb3N0U3BlYy5Db25kaXRpb25Cb29z", - "dFNwZWMSJwoac2tpcF9ib29zdF9zcGVjX3ZhbGlkYXRpb24YAiABKAhIAIgB", - "ARo2ChJDb25kaXRpb25Cb29zdFNwZWMSEQoJY29uZGl0aW9uGAEgASgJEg0K", - "BWJvb3N0GAIgASgCQh0KG19za2lwX2Jvb3N0X3NwZWNfdmFsaWRhdGlvbhrL", - "AQoSUXVlcnlFeHBhbnNpb25TcGVjElUKCWNvbmRpdGlvbhgBIAEoDjJCLmdv", - "b2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5RdWVyeUV4cGFu", - "c2lvblNwZWMuQ29uZGl0aW9uEh4KFnBpbl91bmV4cGFuZGVkX3Jlc3VsdHMY", - "AiABKAgiPgoJQ29uZGl0aW9uEhkKFUNPTkRJVElPTl9VTlNQRUNJRklFRBAA", - "EgwKCERJU0FCTEVEEAESCAoEQVVUTxADGpkBChNQZXJzb25hbGl6YXRpb25T", - "cGVjEkwKBG1vZGUYASABKA4yPi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNl", - "YXJjaFJlcXVlc3QuUGVyc29uYWxpemF0aW9uU3BlYy5Nb2RlIjQKBE1vZGUS", - "FAoQTU9ERV9VTlNQRUNJRklFRBAAEggKBEFVVE8QARIMCghESVNBQkxFRBAC", - "GqABChNTcGVsbENvcnJlY3Rpb25TcGVjEkwKBG1vZGUYASABKA4yPi5nb29n", - "bGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuU3BlbGxDb3JyZWN0", - "aW9uU3BlYy5Nb2RlIjsKBE1vZGUSFAoQTU9ERV9VTlNQRUNJRklFRBAAEhMK", - "D1NVR0dFU1RJT05fT05MWRABEggKBEFVVE8QAhotCgtMYWJlbHNFbnRyeRIL", - "CgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIlsKClNlYXJjaE1vZGUS", - "GwoXU0VBUkNIX01PREVfVU5TUEVDSUZJRUQQABIXChNQUk9EVUNUX1NFQVJD", - "SF9PTkxZEAESFwoTRkFDRVRFRF9TRUFSQ0hfT05MWRACQhgKFl9zcGVsbF9j", - "b3JyZWN0aW9uX3NwZWMi2QoKDlNlYXJjaFJlc3BvbnNlEkQKB3Jlc3VsdHMY", - "ASADKAsyMy5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNl", - "LlNlYXJjaFJlc3VsdBI8CgZmYWNldHMYAiADKAsyLC5nb29nbGUuY2xvdWQu", - "cmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNlLkZhY2V0EhIKCnRvdGFsX3NpemUY", - "AyABKAUSFwoPY29ycmVjdGVkX3F1ZXJ5GAQgASgJEhkKEWF0dHJpYnV0aW9u", - "X3Rva2VuGAUgASgJEhcKD25leHRfcGFnZV90b2tlbhgGIAEoCRJXChRxdWVy", - "eV9leHBhbnNpb25faW5mbxgHIAEoCzI5Lmdvb2dsZS5jbG91ZC5yZXRhaWwu", - "djIuU2VhcmNoUmVzcG9uc2UuUXVlcnlFeHBhbnNpb25JbmZvEhQKDHJlZGly", - "ZWN0X3VyaRgKIAEoCRIYChBhcHBsaWVkX2NvbnRyb2xzGAwgAygJEmkKHWlu", - "dmFsaWRfY29uZGl0aW9uX2Jvb3N0X3NwZWNzGA4gAygLMkIuZ29vZ2xlLmNs", - "b3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1ZXN0LkJvb3N0U3BlYy5Db25kaXRp", - "b25Cb29zdFNwZWMakQQKDFNlYXJjaFJlc3VsdBIKCgJpZBgBIAEoCRIwCgdw", - "cm9kdWN0GAIgASgLMh8uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Qcm9kdWN0", - "Eh4KFm1hdGNoaW5nX3ZhcmlhbnRfY291bnQYAyABKAUSbwoXbWF0Y2hpbmdf", - "dmFyaWFudF9maWVsZHMYBCADKAsyTi5nb29nbGUuY2xvdWQucmV0YWlsLnYy", - "LlNlYXJjaFJlc3BvbnNlLlNlYXJjaFJlc3VsdC5NYXRjaGluZ1ZhcmlhbnRG", - "aWVsZHNFbnRyeRJrChV2YXJpYW50X3JvbGx1cF92YWx1ZXMYBSADKAsyTC5n", - "b29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNlLlNlYXJjaFJl", - "c3VsdC5WYXJpYW50Um9sbHVwVmFsdWVzRW50cnkSFwoPcGVyc29uYWxfbGFi", - "ZWxzGAcgAygJGlgKGk1hdGNoaW5nVmFyaWFudEZpZWxkc0VudHJ5EgsKA2tl", - "eRgBIAEoCRIpCgV2YWx1ZRgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVs", - "ZE1hc2s6AjgBGlIKGFZhcmlhbnRSb2xsdXBWYWx1ZXNFbnRyeRILCgNrZXkY", - "ASABKAkSJQoFdmFsdWUYAiABKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWU6", - "AjgBGo4CCgVGYWNldBILCgNrZXkYASABKAkSRwoGdmFsdWVzGAIgAygLMjcu", - "Z29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXNwb25zZS5GYWNldC5G", - "YWNldFZhbHVlEhUKDWR5bmFtaWNfZmFjZXQYAyABKAgalwEKCkZhY2V0VmFs", - "dWUSDwoFdmFsdWUYASABKAlIABI0CghpbnRlcnZhbBgCIAEoCzIgLmdvb2ds", - "ZS5jbG91ZC5yZXRhaWwudjIuSW50ZXJ2YWxIABINCgVjb3VudBgDIAEoAxIR", - "CgltaW5fdmFsdWUYBSABKAESEQoJbWF4X3ZhbHVlGAYgASgBQg0KC2ZhY2V0", - "X3ZhbHVlGkkKElF1ZXJ5RXhwYW5zaW9uSW5mbxIWCg5leHBhbmRlZF9xdWVy", - "eRgBIAEoCBIbChNwaW5uZWRfcmVzdWx0X2NvdW50GAIgASgDMtgCCg1TZWFy", - "Y2hTZXJ2aWNlEvsBCgZTZWFyY2gSJS5nb29nbGUuY2xvdWQucmV0YWlsLnYy", - "LlNlYXJjaFJlcXVlc3QaJi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJj", - "aFJlc3BvbnNlIqEBgtPkkwKaASJFL3YyL3twbGFjZW1lbnQ9cHJvamVjdHMv", - "Ki9sb2NhdGlvbnMvKi9jYXRhbG9ncy8qL3BsYWNlbWVudHMvKn06c2VhcmNo", - "OgEqWk4iSS92Mi97cGxhY2VtZW50PXByb2plY3RzLyovbG9jYXRpb25zLyov", - "Y2F0YWxvZ3MvKi9zZXJ2aW5nQ29uZmlncy8qfTpzZWFyY2g6ASoaScpBFXJl", - "dGFpbC5nb29nbGVhcGlzLmNvbdJBLmh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMu", - "Y29tL2F1dGgvY2xvdWQtcGxhdGZvcm1CvQEKGmNvbS5nb29nbGUuY2xvdWQu", - "cmV0YWlsLnYyQhJTZWFyY2hTZXJ2aWNlUHJvdG9QAVoyY2xvdWQuZ29vZ2xl", - "LmNvbS9nby9yZXRhaWwvYXBpdjIvcmV0YWlscGI7cmV0YWlscGKiAgZSRVRB", - "SUyqAhZHb29nbGUuQ2xvdWQuUmV0YWlsLlYyygIWR29vZ2xlXENsb3VkXFJl", - "dGFpbFxWMuoCGUdvb2dsZTo6Q2xvdWQ6OlJldGFpbDo6VjJiBnByb3RvMw==")); + "blNwZWNIAIgBARIOCgZlbnRpdHkYJiABKAkakQMKCUZhY2V0U3BlYxJQCglm", + "YWNldF9rZXkYASABKAsyOC5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJj", + "aFJlcXVlc3QuRmFjZXRTcGVjLkZhY2V0S2V5QgPgQQISDQoFbGltaXQYAiAB", + "KAUSHAoUZXhjbHVkZWRfZmlsdGVyX2tleXMYAyADKAkSHwoXZW5hYmxlX2R5", + "bmFtaWNfcG9zaXRpb24YBCABKAga4wEKCEZhY2V0S2V5EhAKA2tleRgBIAEo", + "CUID4EECEjMKCWludGVydmFscxgCIAMoCzIgLmdvb2dsZS5jbG91ZC5yZXRh", + "aWwudjIuSW50ZXJ2YWwSGQoRcmVzdHJpY3RlZF92YWx1ZXMYAyADKAkSEAoI", + "cHJlZml4ZXMYCCADKAkSEAoIY29udGFpbnMYCSADKAkSGAoQY2FzZV9pbnNl", + "bnNpdGl2ZRgKIAEoCBIQCghvcmRlcl9ieRgEIAEoCRINCgVxdWVyeRgFIAEo", + "CRIWCg5yZXR1cm5fbWluX21heBgLIAEoCBqWAQoQRHluYW1pY0ZhY2V0U3Bl", + "YxJJCgRtb2RlGAEgASgOMjsuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFy", + "Y2hSZXF1ZXN0LkR5bmFtaWNGYWNldFNwZWMuTW9kZSI3CgRNb2RlEhQKEE1P", + "REVfVU5TUEVDSUZJRUQQABIMCghESVNBQkxFRBABEgsKB0VOQUJMRUQQAhru", + "AQoJQm9vc3RTcGVjEmEKFWNvbmRpdGlvbl9ib29zdF9zcGVjcxgBIAMoCzJC", + "Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5Cb29zdFNw", + "ZWMuQ29uZGl0aW9uQm9vc3RTcGVjEicKGnNraXBfYm9vc3Rfc3BlY192YWxp", + "ZGF0aW9uGAIgASgISACIAQEaNgoSQ29uZGl0aW9uQm9vc3RTcGVjEhEKCWNv", + "bmRpdGlvbhgBIAEoCRINCgVib29zdBgCIAEoAkIdChtfc2tpcF9ib29zdF9z", + "cGVjX3ZhbGlkYXRpb24aywEKElF1ZXJ5RXhwYW5zaW9uU3BlYxJVCgljb25k", + "aXRpb24YASABKA4yQi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJl", + "cXVlc3QuUXVlcnlFeHBhbnNpb25TcGVjLkNvbmRpdGlvbhIeChZwaW5fdW5l", + "eHBhbmRlZF9yZXN1bHRzGAIgASgIIj4KCUNvbmRpdGlvbhIZChVDT05ESVRJ", + "T05fVU5TUEVDSUZJRUQQABIMCghESVNBQkxFRBABEggKBEFVVE8QAxqZAQoT", + "UGVyc29uYWxpemF0aW9uU3BlYxJMCgRtb2RlGAEgASgOMj4uZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1ZXN0LlBlcnNvbmFsaXphdGlvblNw", + "ZWMuTW9kZSI0CgRNb2RlEhQKEE1PREVfVU5TUEVDSUZJRUQQABIICgRBVVRP", + "EAESDAoIRElTQUJMRUQQAhqgAQoTU3BlbGxDb3JyZWN0aW9uU3BlYxJMCgRt", + "b2RlGAEgASgOMj4uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1", + "ZXN0LlNwZWxsQ29ycmVjdGlvblNwZWMuTW9kZSI7CgRNb2RlEhQKEE1PREVf", + "VU5TUEVDSUZJRUQQABITCg9TVUdHRVNUSU9OX09OTFkQARIICgRBVVRPEAIa", + "LQoLTGFiZWxzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4", + "ASJbCgpTZWFyY2hNb2RlEhsKF1NFQVJDSF9NT0RFX1VOU1BFQ0lGSUVEEAAS", + "FwoTUFJPRFVDVF9TRUFSQ0hfT05MWRABEhcKE0ZBQ0VURURfU0VBUkNIX09O", + "TFkQAkIYChZfc3BlbGxfY29ycmVjdGlvbl9zcGVjIpoLCg5TZWFyY2hSZXNw", + "b25zZRJECgdyZXN1bHRzGAEgAygLMjMuZ29vZ2xlLmNsb3VkLnJldGFpbC52", + "Mi5TZWFyY2hSZXNwb25zZS5TZWFyY2hSZXN1bHQSPAoGZmFjZXRzGAIgAygL", + "MiwuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXNwb25zZS5GYWNl", + "dBISCgp0b3RhbF9zaXplGAMgASgFEhcKD2NvcnJlY3RlZF9xdWVyeRgEIAEo", + "CRIZChFhdHRyaWJ1dGlvbl90b2tlbhgFIAEoCRIXCg9uZXh0X3BhZ2VfdG9r", + "ZW4YBiABKAkSVwoUcXVlcnlfZXhwYW5zaW9uX2luZm8YByABKAsyOS5nb29n", + "bGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNlLlF1ZXJ5RXhwYW5z", + "aW9uSW5mbxIUCgxyZWRpcmVjdF91cmkYCiABKAkSGAoQYXBwbGllZF9jb250", + "cm9scxgMIAMoCRJpCh1pbnZhbGlkX2NvbmRpdGlvbl9ib29zdF9zcGVjcxgO", + "IAMoCzJCLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5C", + "b29zdFNwZWMuQ29uZGl0aW9uQm9vc3RTcGVjEj8KD2V4cGVyaW1lbnRfaW5m", + "bxgRIAMoCzImLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuRXhwZXJpbWVudElu", + "Zm8akQQKDFNlYXJjaFJlc3VsdBIKCgJpZBgBIAEoCRIwCgdwcm9kdWN0GAIg", + "ASgLMh8uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Qcm9kdWN0Eh4KFm1hdGNo", + "aW5nX3ZhcmlhbnRfY291bnQYAyABKAUSbwoXbWF0Y2hpbmdfdmFyaWFudF9m", + "aWVsZHMYBCADKAsyTi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJl", + "c3BvbnNlLlNlYXJjaFJlc3VsdC5NYXRjaGluZ1ZhcmlhbnRGaWVsZHNFbnRy", + "eRJrChV2YXJpYW50X3JvbGx1cF92YWx1ZXMYBSADKAsyTC5nb29nbGUuY2xv", + "dWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNlLlNlYXJjaFJlc3VsdC5WYXJp", + "YW50Um9sbHVwVmFsdWVzRW50cnkSFwoPcGVyc29uYWxfbGFiZWxzGAcgAygJ", + "GlgKGk1hdGNoaW5nVmFyaWFudEZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIp", + "CgV2YWx1ZRgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2s6AjgB", + "GlIKGFZhcmlhbnRSb2xsdXBWYWx1ZXNFbnRyeRILCgNrZXkYASABKAkSJQoF", + "dmFsdWUYAiABKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWU6AjgBGo4CCgVG", + "YWNldBILCgNrZXkYASABKAkSRwoGdmFsdWVzGAIgAygLMjcuZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52Mi5TZWFyY2hSZXNwb25zZS5GYWNldC5GYWNldFZhbHVl", + "EhUKDWR5bmFtaWNfZmFjZXQYAyABKAgalwEKCkZhY2V0VmFsdWUSDwoFdmFs", + "dWUYASABKAlIABI0CghpbnRlcnZhbBgCIAEoCzIgLmdvb2dsZS5jbG91ZC5y", + "ZXRhaWwudjIuSW50ZXJ2YWxIABINCgVjb3VudBgDIAEoAxIRCgltaW5fdmFs", + "dWUYBSABKAESEQoJbWF4X3ZhbHVlGAYgASgBQg0KC2ZhY2V0X3ZhbHVlGkkK", + "ElF1ZXJ5RXhwYW5zaW9uSW5mbxIWCg5leHBhbmRlZF9xdWVyeRgBIAEoCBIb", + "ChNwaW5uZWRfcmVzdWx0X2NvdW50GAIgASgDIvsCCg5FeHBlcmltZW50SW5m", + "bxJjChlzZXJ2aW5nX2NvbmZpZ19leHBlcmltZW50GAIgASgLMj4uZ29vZ2xl", + "LmNsb3VkLnJldGFpbC52Mi5FeHBlcmltZW50SW5mby5TZXJ2aW5nQ29uZmln", + "RXhwZXJpbWVudEgAEjkKCmV4cGVyaW1lbnQYASABKAlCJfpBIgogcmV0YWls", + "Lmdvb2dsZWFwaXMuY29tL0V4cGVyaW1lbnQasQEKF1NlcnZpbmdDb25maWdF", + "eHBlcmltZW50EkkKF29yaWdpbmFsX3NlcnZpbmdfY29uZmlnGAEgASgJQij6", + "QSUKI3JldGFpbC5nb29nbGVhcGlzLmNvbS9TZXJ2aW5nQ29uZmlnEksKGWV4", + "cGVyaW1lbnRfc2VydmluZ19jb25maWcYAiABKAlCKPpBJQojcmV0YWlsLmdv", + "b2dsZWFwaXMuY29tL1NlcnZpbmdDb25maWdCFQoTZXhwZXJpbWVudF9tZXRh", + "ZGF0YTLYAgoNU2VhcmNoU2VydmljZRL7AQoGU2VhcmNoEiUuZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1ZXN0GiYuZ29vZ2xlLmNsb3VkLnJl", + "dGFpbC52Mi5TZWFyY2hSZXNwb25zZSKhAYLT5JMCmgEiRS92Mi97cGxhY2Vt", + "ZW50PXByb2plY3RzLyovbG9jYXRpb25zLyovY2F0YWxvZ3MvKi9wbGFjZW1l", + "bnRzLyp9OnNlYXJjaDoBKlpOIkkvdjIve3BsYWNlbWVudD1wcm9qZWN0cy8q", + "L2xvY2F0aW9ucy8qL2NhdGFsb2dzLyovc2VydmluZ0NvbmZpZ3MvKn06c2Vh", + "cmNoOgEqGknKQRVyZXRhaWwuZ29vZ2xlYXBpcy5jb23SQS5odHRwczovL3d3", + "dy5nb29nbGVhcGlzLmNvbS9hdXRoL2Nsb3VkLXBsYXRmb3JtQrcCChpjb20u", + "Z29vZ2xlLmNsb3VkLnJldGFpbC52MkISU2VhcmNoU2VydmljZVByb3RvUAFa", + "MmNsb3VkLmdvb2dsZS5jb20vZ28vcmV0YWlsL2FwaXYyL3JldGFpbHBiO3Jl", + "dGFpbHBiogIGUkVUQUlMqgIWR29vZ2xlLkNsb3VkLlJldGFpbC5WMsoCFkdv", + "b2dsZVxDbG91ZFxSZXRhaWxcVjLqAhlHb29nbGU6OkNsb3VkOjpSZXRhaWw6", + "OlYy6kF3CiByZXRhaWwuZ29vZ2xlYXBpcy5jb20vRXhwZXJpbWVudBJTcHJv", + "amVjdHMve3Byb2plY3R9L2xvY2F0aW9ucy97bG9jYXRpb259L2NhdGFsb2dz", + "L3tjYXRhbG9nfS9leHBlcmltZW50cy97ZXhwZXJpbWVudH1iBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.Retail.V2.CommonReflection.Descriptor, global::Google.Cloud.Retail.V2.ProductReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest), global::Google.Cloud.Retail.V2.SearchRequest.Parser, new[]{ "Placement", "Branch", "Query", "VisitorId", "UserInfo", "PageSize", "PageToken", "Offset", "Filter", "CanonicalFilter", "OrderBy", "FacetSpecs", "DynamicFacetSpec", "BoostSpec", "QueryExpansionSpec", "VariantRollupKeys", "PageCategories", "SearchMode", "PersonalizationSpec", "Labels", "SpellCorrectionSpec" }, new[]{ "SpellCorrectionSpec" }, new[]{ typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Parser, new[]{ "FacetKey", "Limit", "ExcludedFilterKeys", "EnableDynamicPosition" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey), global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey.Parser, new[]{ "Key", "Intervals", "RestrictedValues", "Prefixes", "Contains", "CaseInsensitive", "OrderBy", "Query", "ReturnMinMax" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest), global::Google.Cloud.Retail.V2.SearchRequest.Parser, new[]{ "Placement", "Branch", "Query", "VisitorId", "UserInfo", "PageSize", "PageToken", "Offset", "Filter", "CanonicalFilter", "OrderBy", "FacetSpecs", "DynamicFacetSpec", "BoostSpec", "QueryExpansionSpec", "VariantRollupKeys", "PageCategories", "SearchMode", "PersonalizationSpec", "Labels", "SpellCorrectionSpec", "Entity" }, new[]{ "SpellCorrectionSpec" }, new[]{ typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Parser, new[]{ "FacetKey", "Limit", "ExcludedFilterKeys", "EnableDynamicPosition" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey), global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey.Parser, new[]{ "Key", "Intervals", "RestrictedValues", "Prefixes", "Contains", "CaseInsensitive", "OrderBy", "Query", "ReturnMinMax" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Parser, new[]{ "Mode" }, null, new[]{ typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Parser, new[]{ "ConditionBoostSpecs", "SkipBoostSpecValidation" }, new[]{ "SkipBoostSpecValidation" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec.Parser, new[]{ "Condition", "Boost" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Parser, new[]{ "Condition", "PinUnexpandedResults" }, null, new[]{ typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Parser, new[]{ "Mode" }, null, new[]{ typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Parser, new[]{ "Mode" }, null, new[]{ typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode) }, null, null), null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse), global::Google.Cloud.Retail.V2.SearchResponse.Parser, new[]{ "Results", "Facets", "TotalSize", "CorrectedQuery", "AttributionToken", "NextPageToken", "QueryExpansionInfo", "RedirectUri", "AppliedControls", "InvalidConditionBoostSpecs" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult), global::Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult.Parser, new[]{ "Id", "Product", "MatchingVariantCount", "MatchingVariantFields", "VariantRollupValues", "PersonalLabels" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse), global::Google.Cloud.Retail.V2.SearchResponse.Parser, new[]{ "Results", "Facets", "TotalSize", "CorrectedQuery", "AttributionToken", "NextPageToken", "QueryExpansionInfo", "RedirectUri", "AppliedControls", "InvalidConditionBoostSpecs", "ExperimentInfo" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult), global::Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult.Parser, new[]{ "Id", "Product", "MatchingVariantCount", "MatchingVariantFields", "VariantRollupValues", "PersonalLabels" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet), global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Parser, new[]{ "Key", "Values", "DynamicFacet" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Types.FacetValue), global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Types.FacetValue.Parser, new[]{ "Value", "Interval", "Count", "MinValue", "MaxValue" }, new[]{ "FacetValue" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo), global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo.Parser, new[]{ "ExpandedQuery", "PinnedResultCount" }, null, null, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo), global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo.Parser, new[]{ "ExpandedQuery", "PinnedResultCount" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ExperimentInfo), global::Google.Cloud.Retail.V2.ExperimentInfo.Parser, new[]{ "ServingConfigExperiment", "Experiment" }, new[]{ "ExperimentMetadata" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment), global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment.Parser, new[]{ "OriginalServingConfig", "ExperimentServingConfig" }, null, null, null, null)}) })); } #endregion @@ -207,6 +221,7 @@ public sealed partial class SearchRequest : pb::IMessage personalizationSpec_ = other.personalizationSpec_ != null ? other.personalizationSpec_.Clone() : null; labels_ = other.labels_.Clone(); spellCorrectionSpec_ = other.spellCorrectionSpec_ != null ? other.spellCorrectionSpec_.Clone() : null; + entity_ = other.entity_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -453,7 +468,7 @@ public sealed partial class SearchRequest : pb::IMessage /// /// Facet specifications for faceted search. If empty, no facets are returned. /// - /// A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error + /// A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error /// is returned. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -717,6 +732,26 @@ public sealed partial class SearchRequest : pb::IMessage } } + /// Field number for the "entity" field. + public const int EntityFieldNumber = 38; + private string entity_ = ""; + /// + /// The entity for customers that may run multiple different entities, domains, + /// sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, + /// `google.com`, `youtube.com`, etc. + /// If this is set, it should be exactly matched with + /// [UserEvent.entity][google.cloud.retail.v2.UserEvent.entity] to get search + /// results boosted by entity. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Entity { + get { return entity_; } + set { + entity_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -753,6 +788,7 @@ public sealed partial class SearchRequest : pb::IMessage if (!object.Equals(PersonalizationSpec, other.PersonalizationSpec)) return false; if (!Labels.Equals(other.Labels)) return false; if (!object.Equals(SpellCorrectionSpec, other.SpellCorrectionSpec)) return false; + if (Entity != other.Entity) return false; return Equals(_unknownFields, other._unknownFields); } @@ -781,6 +817,7 @@ public sealed partial class SearchRequest : pb::IMessage if (personalizationSpec_ != null) hash ^= PersonalizationSpec.GetHashCode(); hash ^= Labels.GetHashCode(); if (spellCorrectionSpec_ != null) hash ^= SpellCorrectionSpec.GetHashCode(); + if (Entity.Length != 0) hash ^= Entity.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -871,6 +908,10 @@ public sealed partial class SearchRequest : pb::IMessage output.WriteRawTag(154, 2); output.WriteMessage(SpellCorrectionSpec); } + if (Entity.Length != 0) { + output.WriteRawTag(178, 2); + output.WriteString(Entity); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -953,6 +994,10 @@ public sealed partial class SearchRequest : pb::IMessage output.WriteRawTag(154, 2); output.WriteMessage(SpellCorrectionSpec); } + if (Entity.Length != 0) { + output.WriteRawTag(178, 2); + output.WriteString(Entity); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1018,6 +1063,9 @@ public sealed partial class SearchRequest : pb::IMessage if (spellCorrectionSpec_ != null) { size += 2 + pb::CodedOutputStream.ComputeMessageSize(SpellCorrectionSpec); } + if (Entity.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Entity); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1103,6 +1151,9 @@ public sealed partial class SearchRequest : pb::IMessage } SpellCorrectionSpec.MergeFrom(other.SpellCorrectionSpec); } + if (other.Entity.Length != 0) { + Entity = other.Entity; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1220,6 +1271,10 @@ public sealed partial class SearchRequest : pb::IMessage input.ReadMessage(SpellCorrectionSpec); break; } + case 306: { + Entity = input.ReadString(); + break; + } } } #endif @@ -1337,6 +1392,10 @@ public sealed partial class SearchRequest : pb::IMessage input.ReadMessage(SpellCorrectionSpec); break; } + case 306: { + Entity = input.ReadString(); + break; + } } } } @@ -1882,7 +1941,16 @@ public sealed partial class FacetKey : pb::IMessage /// /// Set only if values should be bucketized into intervals. Must be set /// for facets with numerical values. Must not be set for facet with text - /// values. Maximum number of intervals is 30. + /// values. Maximum number of intervals is 40. + /// + /// For all numerical facet keys that appear in the list of products from + /// the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are + /// computed from their distribution weekly. If the model assigns a high + /// score to a numerical facet key and its intervals are not specified in + /// the search request, these percentiles will become the bounds + /// for its intervals and will be returned in the response. If the + /// facet key intervals are specified in the request, then the specified + /// intervals will be returned instead. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -3874,6 +3942,7 @@ public sealed partial class SearchResponse : pb::IMessage redirectUri_ = other.redirectUri_; appliedControls_ = other.appliedControls_.Clone(); invalidConditionBoostSpecs_ = other.invalidConditionBoostSpecs_.Clone(); + experimentInfo_ = other.experimentInfo_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -4047,6 +4116,21 @@ public sealed partial class SearchResponse : pb::IMessage get { return invalidConditionBoostSpecs_; } } + /// Field number for the "experiment_info" field. + public const int ExperimentInfoFieldNumber = 17; + private static readonly pb::FieldCodec _repeated_experimentInfo_codec + = pb::FieldCodec.ForMessage(138, global::Google.Cloud.Retail.V2.ExperimentInfo.Parser); + private readonly pbc::RepeatedField experimentInfo_ = new pbc::RepeatedField(); + /// + /// Metadata related to A/B testing [Experiment][] associated with this + /// response. Only exists when an experiment is triggered. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ExperimentInfo { + get { return experimentInfo_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -4072,6 +4156,7 @@ public sealed partial class SearchResponse : pb::IMessage if (RedirectUri != other.RedirectUri) return false; if(!appliedControls_.Equals(other.appliedControls_)) return false; if(!invalidConditionBoostSpecs_.Equals(other.invalidConditionBoostSpecs_)) return false; + if(!experimentInfo_.Equals(other.experimentInfo_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4089,6 +4174,7 @@ public sealed partial class SearchResponse : pb::IMessage if (RedirectUri.Length != 0) hash ^= RedirectUri.GetHashCode(); hash ^= appliedControls_.GetHashCode(); hash ^= invalidConditionBoostSpecs_.GetHashCode(); + hash ^= experimentInfo_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4135,6 +4221,7 @@ public sealed partial class SearchResponse : pb::IMessage } appliedControls_.WriteTo(output, _repeated_appliedControls_codec); invalidConditionBoostSpecs_.WriteTo(output, _repeated_invalidConditionBoostSpecs_codec); + experimentInfo_.WriteTo(output, _repeated_experimentInfo_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -4173,6 +4260,7 @@ public sealed partial class SearchResponse : pb::IMessage } appliedControls_.WriteTo(ref output, _repeated_appliedControls_codec); invalidConditionBoostSpecs_.WriteTo(ref output, _repeated_invalidConditionBoostSpecs_codec); + experimentInfo_.WriteTo(ref output, _repeated_experimentInfo_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -4205,6 +4293,7 @@ public sealed partial class SearchResponse : pb::IMessage } size += appliedControls_.CalculateSize(_repeated_appliedControls_codec); size += invalidConditionBoostSpecs_.CalculateSize(_repeated_invalidConditionBoostSpecs_codec); + size += experimentInfo_.CalculateSize(_repeated_experimentInfo_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4242,6 +4331,7 @@ public sealed partial class SearchResponse : pb::IMessage } appliedControls_.Add(other.appliedControls_); invalidConditionBoostSpecs_.Add(other.invalidConditionBoostSpecs_); + experimentInfo_.Add(other.experimentInfo_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4300,6 +4390,10 @@ public sealed partial class SearchResponse : pb::IMessage invalidConditionBoostSpecs_.AddEntriesFrom(input, _repeated_invalidConditionBoostSpecs_codec); break; } + case 138: { + experimentInfo_.AddEntriesFrom(input, _repeated_experimentInfo_codec); + break; + } } } #endif @@ -4358,6 +4452,10 @@ public sealed partial class SearchResponse : pb::IMessage invalidConditionBoostSpecs_.AddEntriesFrom(ref input, _repeated_invalidConditionBoostSpecs_codec); break; } + case 138: { + experimentInfo_.AddEntriesFrom(ref input, _repeated_experimentInfo_codec); + break; + } } } } @@ -5733,6 +5831,536 @@ public sealed partial class QueryExpansionInfo : pb::IMessage + /// Metadata for active A/B testing [Experiments][]. + /// + public sealed partial class ExperimentInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExperimentInfo()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.SearchServiceReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExperimentInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExperimentInfo(ExperimentInfo other) : this() { + experiment_ = other.experiment_; + switch (other.ExperimentMetadataCase) { + case ExperimentMetadataOneofCase.ServingConfigExperiment: + ServingConfigExperiment = other.ServingConfigExperiment.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExperimentInfo Clone() { + return new ExperimentInfo(this); + } + + /// Field number for the "serving_config_experiment" field. + public const int ServingConfigExperimentFieldNumber = 2; + /// + /// A/B test between existing Cloud Retail Search + /// [ServingConfig][google.cloud.retail.v2.ServingConfig]s. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment ServingConfigExperiment { + get { return experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment ? (global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment) experimentMetadata_ : null; } + set { + experimentMetadata_ = value; + experimentMetadataCase_ = value == null ? ExperimentMetadataOneofCase.None : ExperimentMetadataOneofCase.ServingConfigExperiment; + } + } + + /// Field number for the "experiment" field. + public const int ExperimentFieldNumber = 1; + private string experiment_ = ""; + /// + /// The fully qualified resource name of the experiment that provides the + /// serving config under test, should an active experiment exist. For example: + /// `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Experiment { + get { return experiment_; } + set { + experiment_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + private object experimentMetadata_; + /// Enum of possible cases for the "experiment_metadata" oneof. + public enum ExperimentMetadataOneofCase { + None = 0, + ServingConfigExperiment = 2, + } + private ExperimentMetadataOneofCase experimentMetadataCase_ = ExperimentMetadataOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ExperimentMetadataOneofCase ExperimentMetadataCase { + get { return experimentMetadataCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearExperimentMetadata() { + experimentMetadataCase_ = ExperimentMetadataOneofCase.None; + experimentMetadata_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ExperimentInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ExperimentInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ServingConfigExperiment, other.ServingConfigExperiment)) return false; + if (Experiment != other.Experiment) return false; + if (ExperimentMetadataCase != other.ExperimentMetadataCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment) hash ^= ServingConfigExperiment.GetHashCode(); + if (Experiment.Length != 0) hash ^= Experiment.GetHashCode(); + hash ^= (int) experimentMetadataCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Experiment.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Experiment); + } + if (experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment) { + output.WriteRawTag(18); + output.WriteMessage(ServingConfigExperiment); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Experiment.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Experiment); + } + if (experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment) { + output.WriteRawTag(18); + output.WriteMessage(ServingConfigExperiment); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ServingConfigExperiment); + } + if (Experiment.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Experiment); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ExperimentInfo other) { + if (other == null) { + return; + } + if (other.Experiment.Length != 0) { + Experiment = other.Experiment; + } + switch (other.ExperimentMetadataCase) { + case ExperimentMetadataOneofCase.ServingConfigExperiment: + if (ServingConfigExperiment == null) { + ServingConfigExperiment = new global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment(); + } + ServingConfigExperiment.MergeFrom(other.ServingConfigExperiment); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Experiment = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment subBuilder = new global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment(); + if (experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment) { + subBuilder.MergeFrom(ServingConfigExperiment); + } + input.ReadMessage(subBuilder); + ServingConfigExperiment = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Experiment = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment subBuilder = new global::Google.Cloud.Retail.V2.ExperimentInfo.Types.ServingConfigExperiment(); + if (experimentMetadataCase_ == ExperimentMetadataOneofCase.ServingConfigExperiment) { + subBuilder.MergeFrom(ServingConfigExperiment); + } + input.ReadMessage(subBuilder); + ServingConfigExperiment = subBuilder; + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ExperimentInfo message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Metadata for active serving config A/B tests. + /// + public sealed partial class ServingConfigExperiment : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServingConfigExperiment()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.ExperimentInfo.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServingConfigExperiment() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServingConfigExperiment(ServingConfigExperiment other) : this() { + originalServingConfig_ = other.originalServingConfig_; + experimentServingConfig_ = other.experimentServingConfig_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ServingConfigExperiment Clone() { + return new ServingConfigExperiment(this); + } + + /// Field number for the "original_serving_config" field. + public const int OriginalServingConfigFieldNumber = 1; + private string originalServingConfig_ = ""; + /// + /// The fully qualified resource name of the original + /// [SearchRequest.placement][google.cloud.retail.v2.SearchRequest.placement] + /// in the search request prior to reassignment by experiment API. For + /// example: `projects/*/locations/*/catalogs/*/servingConfigs/*`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OriginalServingConfig { + get { return originalServingConfig_; } + set { + originalServingConfig_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "experiment_serving_config" field. + public const int ExperimentServingConfigFieldNumber = 2; + private string experimentServingConfig_ = ""; + /// + /// The fully qualified resource name of the serving config + /// [VariantArm.serving_config_id][] responsible for generating the search + /// response. For example: + /// `projects/*/locations/*/catalogs/*/servingConfigs/*`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ExperimentServingConfig { + get { return experimentServingConfig_; } + set { + experimentServingConfig_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ServingConfigExperiment); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ServingConfigExperiment other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (OriginalServingConfig != other.OriginalServingConfig) return false; + if (ExperimentServingConfig != other.ExperimentServingConfig) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (OriginalServingConfig.Length != 0) hash ^= OriginalServingConfig.GetHashCode(); + if (ExperimentServingConfig.Length != 0) hash ^= ExperimentServingConfig.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (OriginalServingConfig.Length != 0) { + output.WriteRawTag(10); + output.WriteString(OriginalServingConfig); + } + if (ExperimentServingConfig.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ExperimentServingConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (OriginalServingConfig.Length != 0) { + output.WriteRawTag(10); + output.WriteString(OriginalServingConfig); + } + if (ExperimentServingConfig.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ExperimentServingConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (OriginalServingConfig.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OriginalServingConfig); + } + if (ExperimentServingConfig.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ExperimentServingConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ServingConfigExperiment other) { + if (other == null) { + return; + } + if (other.OriginalServingConfig.Length != 0) { + OriginalServingConfig = other.OriginalServingConfig; + } + if (other.ExperimentServingConfig.Length != 0) { + ExperimentServingConfig = other.ExperimentServingConfig; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + OriginalServingConfig = input.ReadString(); + break; + } + case 18: { + ExperimentServingConfig = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + OriginalServingConfig = input.ReadString(); + break; + } + case 18: { + ExperimentServingConfig = input.ReadString(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + #endregion } diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchServiceResourceNames.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchServiceResourceNames.g.cs index 07a2a6166cdc..81acff31db65 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchServiceResourceNames.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/SearchServiceResourceNames.g.cs @@ -15,9 +15,269 @@ // Generated code. DO NOT EDIT! #pragma warning disable CS8981 +using gax = Google.Api.Gax; +using sys = System; namespace Google.Cloud.Retail.V2 { + /// Resource name for the Experiment resource. + public sealed partial class ExperimentName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}. + /// + ProjectLocationCatalogExperiment = 1, + } + + private static gax::PathTemplate s_projectLocationCatalogExperiment = new gax::PathTemplate("projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ExperimentName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ExperimentName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Experiment ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ExperimentName FromProjectLocationCatalogExperiment(string projectId, string locationId, string catalogId, string experimentId) => + new ExperimentName(ResourceNameType.ProjectLocationCatalogExperiment, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), catalogId: gax::GaxPreconditions.CheckNotNullOrEmpty(catalogId, nameof(catalogId)), experimentId: gax::GaxPreconditions.CheckNotNullOrEmpty(experimentId, nameof(experimentId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Experiment ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}. + /// + public static string Format(string projectId, string locationId, string catalogId, string experimentId) => + FormatProjectLocationCatalogExperiment(projectId, locationId, catalogId, experimentId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Experiment ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}. + /// + public static string FormatProjectLocationCatalogExperiment(string projectId, string locationId, string catalogId, string experimentId) => + s_projectLocationCatalogExperiment.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(catalogId, nameof(catalogId)), gax::GaxPreconditions.CheckNotNullOrEmpty(experimentId, nameof(experimentId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ExperimentName Parse(string experimentName) => Parse(experimentName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing + /// an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static ExperimentName Parse(string experimentName, bool allowUnparsed) => + TryParse(experimentName, allowUnparsed, out ExperimentName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string experimentName, out ExperimentName result) => + TryParse(experimentName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string experimentName, bool allowUnparsed, out ExperimentName result) + { + gax::GaxPreconditions.CheckNotNull(experimentName, nameof(experimentName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationCatalogExperiment.TryParseName(experimentName, out resourceName)) + { + result = FromProjectLocationCatalogExperiment(resourceName[0], resourceName[1], resourceName[2], resourceName[3]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(experimentName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ExperimentName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string catalogId = null, string experimentId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + CatalogId = catalogId; + ExperimentId = experimentId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Catalog ID. Must not be null or empty. + /// The Experiment ID. Must not be null or empty. + public ExperimentName(string projectId, string locationId, string catalogId, string experimentId) : this(ResourceNameType.ProjectLocationCatalogExperiment, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), catalogId: gax::GaxPreconditions.CheckNotNullOrEmpty(catalogId, nameof(catalogId)), experimentId: gax::GaxPreconditions.CheckNotNullOrEmpty(experimentId, nameof(experimentId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Catalog ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string CatalogId { get; } + + /// + /// The Experiment ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ExperimentId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationCatalogExperiment: return s_projectLocationCatalogExperiment.Expand(ProjectId, LocationId, CatalogId, ExperimentId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as ExperimentName); + + /// + public bool Equals(ExperimentName other) => ToString() == other?.ToString(); + + /// + public static bool operator ==(ExperimentName a, ExperimentName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// + public static bool operator !=(ExperimentName a, ExperimentName b) => !(a == b); + } + public partial class SearchRequest { /// -typed view over the resource name property. @@ -27,4 +287,16 @@ public BranchName BranchAsBranchName set => Branch = value?.ToString() ?? ""; } } + + public partial class ExperimentInfo + { + /// + /// -typed view over the resource name property. + /// + public ExperimentName ExperimentAsExperimentName + { + get => string.IsNullOrEmpty(Experiment) ? null : ExperimentName.Parse(Experiment, allowUnparsed: true); + set => Experiment = value?.ToString() ?? ""; + } + } } diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServiceCollectionExtensions.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServiceCollectionExtensions.g.cs index c271ccbfcb3e..8ffaa6641067 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServiceCollectionExtensions.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServiceCollectionExtensions.g.cs @@ -79,6 +79,22 @@ public static partial class ServiceCollectionExtensions return builder.Build(provider); }); + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddModelServiceClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcrv::ModelServiceClientBuilder builder = new gcrv::ModelServiceClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + /// /// Adds a singleton to . /// diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServingConfig.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServingConfig.g.cs index f41d9db3d5f0..5be828b1afa5 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServingConfig.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/ServingConfig.g.cs @@ -202,7 +202,7 @@ public sealed partial class ServingConfig : pb::IMessage /// Allowed values are: /// /// * `no-price-reranking` - /// * `low-price-raranking` + /// * `low-price-reranking` /// * `medium-price-reranking` /// * `high-price-reranking` /// @@ -476,8 +476,8 @@ public sealed partial class ServingConfig : pb::IMessage public const int DiversityTypeFieldNumber = 20; private global::Google.Cloud.Retail.V2.ServingConfig.Types.DiversityType diversityType_ = global::Google.Cloud.Retail.V2.ServingConfig.Types.DiversityType.Unspecified; /// - /// What kind of diversity to use - data driven or rule based. If unset, - /// the server behavior defaults to + /// What kind of diversity to use - data driven or rule based. If unset, the + /// server behavior defaults to /// [RULE_BASED_DIVERSITY][google.cloud.retail.v2.ServingConfig.DiversityType.RULE_BASED_DIVERSITY]. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEvent.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEvent.g.cs index 075b3a5f5507..ba176f9601c8 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEvent.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEvent.g.cs @@ -29,7 +29,7 @@ public static partial class UserEventReflection { "b3IucHJvdG8aI2dvb2dsZS9jbG91ZC9yZXRhaWwvdjIvY29tbW9uLnByb3Rv", "GiRnb29nbGUvY2xvdWQvcmV0YWlsL3YyL3Byb2R1Y3QucHJvdG8aH2dvb2ds", "ZS9wcm90b2J1Zi90aW1lc3RhbXAucHJvdG8aHmdvb2dsZS9wcm90b2J1Zi93", - "cmFwcGVycy5wcm90byKHBgoJVXNlckV2ZW50EhcKCmV2ZW50X3R5cGUYASAB", + "cmFwcGVycy5wcm90byKXBgoJVXNlckV2ZW50EhcKCmV2ZW50X3R5cGUYASAB", "KAlCA+BBAhIXCgp2aXNpdG9yX2lkGAIgASgJQgPgQQISEgoKc2Vzc2lvbl9p", "ZBgVIAEoCRIuCgpldmVudF90aW1lGAMgASgLMhouZ29vZ2xlLnByb3RvYnVm", "LlRpbWVzdGFtcBIWCg5leHBlcmltZW50X2lkcxgEIAMoCRIZChFhdHRyaWJ1", @@ -44,25 +44,25 @@ public static partial class UserEventReflection { "YnkYESABKAkSDgoGb2Zmc2V0GBIgASgFEhcKD3BhZ2VfY2F0ZWdvcmllcxgL", "IAMoCRIzCgl1c2VyX2luZm8YDCABKAsyIC5nb29nbGUuY2xvdWQucmV0YWls", "LnYyLlVzZXJJbmZvEgsKA3VyaRgNIAEoCRIUCgxyZWZlcnJlcl91cmkYDiAB", - "KAkSFAoMcGFnZV92aWV3X2lkGA8gASgJGloKD0F0dHJpYnV0ZXNFbnRyeRIL", - "CgNrZXkYASABKAkSNgoFdmFsdWUYAiABKAsyJy5nb29nbGUuY2xvdWQucmV0", - "YWlsLnYyLkN1c3RvbUF0dHJpYnV0ZToCOAEidQoNUHJvZHVjdERldGFpbBI1", - "Cgdwcm9kdWN0GAEgASgLMh8uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Qcm9k", - "dWN0QgPgQQISLQoIcXVhbnRpdHkYAiABKAsyGy5nb29nbGUucHJvdG9idWYu", - "SW50MzJWYWx1ZSJwChBDb21wbGV0aW9uRGV0YWlsEiQKHGNvbXBsZXRpb25f", - "YXR0cmlidXRpb25fdG9rZW4YASABKAkSGwoTc2VsZWN0ZWRfc3VnZ2VzdGlv", - "bhgCIAEoCRIZChFzZWxlY3RlZF9wb3NpdGlvbhgDIAEoBSJuChNQdXJjaGFz", - "ZVRyYW5zYWN0aW9uEgoKAmlkGAEgASgJEhQKB3JldmVudWUYAiABKAJCA+BB", - "AhILCgN0YXgYAyABKAISDAoEY29zdBgEIAEoAhIaCg1jdXJyZW5jeV9jb2Rl", - "GAUgASgJQgPgQQJCuQEKGmNvbS5nb29nbGUuY2xvdWQucmV0YWlsLnYyQg5V", - "c2VyRXZlbnRQcm90b1ABWjJjbG91ZC5nb29nbGUuY29tL2dvL3JldGFpbC9h", - "cGl2Mi9yZXRhaWxwYjtyZXRhaWxwYqICBlJFVEFJTKoCFkdvb2dsZS5DbG91", - "ZC5SZXRhaWwuVjLKAhZHb29nbGVcQ2xvdWRcUmV0YWlsXFYy6gIZR29vZ2xl", - "OjpDbG91ZDo6UmV0YWlsOjpWMmIGcHJvdG8z")); + "KAkSFAoMcGFnZV92aWV3X2lkGA8gASgJEg4KBmVudGl0eRgXIAEoCRpaCg9B", + "dHRyaWJ1dGVzRW50cnkSCwoDa2V5GAEgASgJEjYKBXZhbHVlGAIgASgLMicu", + "Z29vZ2xlLmNsb3VkLnJldGFpbC52Mi5DdXN0b21BdHRyaWJ1dGU6AjgBInUK", + "DVByb2R1Y3REZXRhaWwSNQoHcHJvZHVjdBgBIAEoCzIfLmdvb2dsZS5jbG91", + "ZC5yZXRhaWwudjIuUHJvZHVjdEID4EECEi0KCHF1YW50aXR5GAIgASgLMhsu", + "Z29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUicAoQQ29tcGxldGlvbkRldGFp", + "bBIkChxjb21wbGV0aW9uX2F0dHJpYnV0aW9uX3Rva2VuGAEgASgJEhsKE3Nl", + "bGVjdGVkX3N1Z2dlc3Rpb24YAiABKAkSGQoRc2VsZWN0ZWRfcG9zaXRpb24Y", + "AyABKAUibgoTUHVyY2hhc2VUcmFuc2FjdGlvbhIKCgJpZBgBIAEoCRIUCgdy", + "ZXZlbnVlGAIgASgCQgPgQQISCwoDdGF4GAMgASgCEgwKBGNvc3QYBCABKAIS", + "GgoNY3VycmVuY3lfY29kZRgFIAEoCUID4EECQrkBChpjb20uZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52MkIOVXNlckV2ZW50UHJvdG9QAVoyY2xvdWQuZ29vZ2xl", + "LmNvbS9nby9yZXRhaWwvYXBpdjIvcmV0YWlscGI7cmV0YWlscGKiAgZSRVRB", + "SUyqAhZHb29nbGUuQ2xvdWQuUmV0YWlsLlYyygIWR29vZ2xlXENsb3VkXFJl", + "dGFpbFxWMuoCGUdvb2dsZTo6Q2xvdWQ6OlJldGFpbDo6VjJiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Cloud.Retail.V2.CommonReflection.Descriptor, global::Google.Cloud.Retail.V2.ProductReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.UserEvent), global::Google.Cloud.Retail.V2.UserEvent.Parser, new[]{ "EventType", "VisitorId", "SessionId", "EventTime", "ExperimentIds", "AttributionToken", "ProductDetails", "CompletionDetail", "Attributes", "CartId", "PurchaseTransaction", "SearchQuery", "Filter", "OrderBy", "Offset", "PageCategories", "UserInfo", "Uri", "ReferrerUri", "PageViewId" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.UserEvent), global::Google.Cloud.Retail.V2.UserEvent.Parser, new[]{ "EventType", "VisitorId", "SessionId", "EventTime", "ExperimentIds", "AttributionToken", "ProductDetails", "CompletionDetail", "Attributes", "CartId", "PurchaseTransaction", "SearchQuery", "Filter", "OrderBy", "Offset", "PageCategories", "UserInfo", "Uri", "ReferrerUri", "PageViewId", "Entity" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ProductDetail), global::Google.Cloud.Retail.V2.ProductDetail.Parser, new[]{ "Product", "Quantity" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompletionDetail), global::Google.Cloud.Retail.V2.CompletionDetail.Parser, new[]{ "CompletionAttributionToken", "SelectedSuggestion", "SelectedPosition" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.PurchaseTransaction), global::Google.Cloud.Retail.V2.PurchaseTransaction.Parser, new[]{ "Id", "Revenue", "Tax", "Cost", "CurrencyCode" }, null, null, null, null) @@ -130,6 +130,7 @@ public sealed partial class UserEvent : pb::IMessage uri_ = other.uri_; referrerUri_ = other.referrerUri_; pageViewId_ = other.pageViewId_; + entity_ = other.entity_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -609,6 +610,25 @@ public sealed partial class UserEvent : pb::IMessage } } + /// Field number for the "entity" field. + public const int EntityFieldNumber = 23; + private string entity_ = ""; + /// + /// The entity for customers that may run multiple different entities, domains, + /// sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, + /// `google.com`, `youtube.com`, etc. + /// It is recommended to set this field to get better per-entity search, + /// completion and prediction results. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Entity { + get { return entity_; } + set { + entity_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -644,6 +664,7 @@ public sealed partial class UserEvent : pb::IMessage if (Uri != other.Uri) return false; if (ReferrerUri != other.ReferrerUri) return false; if (PageViewId != other.PageViewId) return false; + if (Entity != other.Entity) return false; return Equals(_unknownFields, other._unknownFields); } @@ -671,6 +692,7 @@ public sealed partial class UserEvent : pb::IMessage if (Uri.Length != 0) hash ^= Uri.GetHashCode(); if (ReferrerUri.Length != 0) hash ^= ReferrerUri.GetHashCode(); if (PageViewId.Length != 0) hash ^= PageViewId.GetHashCode(); + if (Entity.Length != 0) hash ^= Entity.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -757,6 +779,10 @@ public sealed partial class UserEvent : pb::IMessage output.WriteRawTag(178, 1); output.WriteMessage(CompletionDetail); } + if (Entity.Length != 0) { + output.WriteRawTag(186, 1); + output.WriteString(Entity); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -835,6 +861,10 @@ public sealed partial class UserEvent : pb::IMessage output.WriteRawTag(178, 1); output.WriteMessage(CompletionDetail); } + if (Entity.Length != 0) { + output.WriteRawTag(186, 1); + output.WriteString(Entity); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -897,6 +927,9 @@ public sealed partial class UserEvent : pb::IMessage if (PageViewId.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(PageViewId); } + if (Entity.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Entity); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -973,6 +1006,9 @@ public sealed partial class UserEvent : pb::IMessage if (other.PageViewId.Length != 0) { PageViewId = other.PageViewId; } + if (other.Entity.Length != 0) { + Entity = other.Entity; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1080,6 +1116,10 @@ public sealed partial class UserEvent : pb::IMessage input.ReadMessage(CompletionDetail); break; } + case 186: { + Entity = input.ReadString(); + break; + } } } #endif @@ -1187,6 +1227,10 @@ public sealed partial class UserEvent : pb::IMessage input.ReadMessage(CompletionDetail); break; } + case 186: { + Entity = input.ReadString(); + break; + } } } } diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEventService.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEventService.g.cs index da75c7c559f1..81cd3e8cfe4c 100644 --- a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEventService.g.cs +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/UserEventService.g.cs @@ -442,7 +442,7 @@ public sealed partial class CollectUserEventRequest : pb::IMessage /// The prebuilt rule name that can convert a specific type of raw_json. - /// For example: "default_schema/v1.0" + /// For example: "ga4_bq" rule for the GA4 user event schema. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] diff --git a/apis/Google.Cloud.Retail.V2/gapic_metadata.json b/apis/Google.Cloud.Retail.V2/gapic_metadata.json index 7f5cf9b79dc6..7850e9229002 100644 --- a/apis/Google.Cloud.Retail.V2/gapic_metadata.json +++ b/apis/Google.Cloud.Retail.V2/gapic_metadata.json @@ -140,6 +140,63 @@ } } }, + "ModelService": { + "clients": { + "grpc": { + "libraryClient": "ModelServiceClient", + "rpcs": { + "CreateModel": { + "methods": [ + "CreateModel", + "CreateModelAsync" + ] + }, + "DeleteModel": { + "methods": [ + "DeleteModel", + "DeleteModelAsync" + ] + }, + "GetModel": { + "methods": [ + "GetModel", + "GetModelAsync" + ] + }, + "ListModels": { + "methods": [ + "ListModels", + "ListModelsAsync" + ] + }, + "PauseModel": { + "methods": [ + "PauseModel", + "PauseModelAsync" + ] + }, + "ResumeModel": { + "methods": [ + "ResumeModel", + "ResumeModelAsync" + ] + }, + "TuneModel": { + "methods": [ + "TuneModel", + "TuneModelAsync" + ] + }, + "UpdateModel": { + "methods": [ + "UpdateModel", + "UpdateModelAsync" + ] + } + } + } + } + }, "PredictionService": { "clients": { "grpc": {