From df83180ce586294c17b53889a19c1257acfaf310 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 9 Oct 2024 06:22:49 +0000 Subject: [PATCH] feat: add conversational search feat: add tile navigation docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 683821686 Source-Link: https://github.com/googleapis/googleapis/commit/d01eb4689472766df6822cdfcdb4412bfb4c2789 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1db3459f3dfa9347a5811d72b12e1714da75ed93 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuUmV0YWlsLlYyLy5Pd2xCb3QueWFtbCIsImgiOiIxZGIzNDU5ZjNkZmE5MzQ3YTU4MTFkNzJiMTJlMTcxNGRhNzVlZDkzIn0= --- ...GenerativeQuestionConfigsAsyncSnippet.g.cs | 49 + ...stionConfigsRequestObjectAsyncSnippet.g.cs | 51 + ...veQuestionConfigsRequestObjectSnippet.g.cs | 50 + ...stionConfigsResourceNamesAsyncSnippet.g.cs | 49 + ...veQuestionConfigsResourceNamesSnippet.g.cs | 48 + ...pdateGenerativeQuestionConfigsSnippet.g.cs | 48 + ...iveQuestionsFeatureConfigAsyncSnippet.g.cs | 44 + ...eatureConfigRequestObjectAsyncSnippet.g.cs | 47 + ...ionsFeatureConfigRequestObjectSnippet.g.cs | 46 + ...eatureConfigResourceNamesAsyncSnippet.g.cs | 44 + ...ionsFeatureConfigResourceNamesSnippet.g.cs | 43 + ...nerativeQuestionsFeatureConfigSnippet.g.cs | 43 + ...GenerativeQuestionConfigsAsyncSnippet.g.cs | 44 + ...stionConfigsRequestObjectAsyncSnippet.g.cs | 47 + ...veQuestionConfigsRequestObjectSnippet.g.cs | 46 + ...stionConfigsResourceNamesAsyncSnippet.g.cs | 44 + ...veQuestionConfigsResourceNamesSnippet.g.cs | 43 + ....ListGenerativeQuestionConfigsSnippet.g.cs | 43 + ...eGenerativeQuestionConfigAsyncSnippet.g.cs | 46 + ...estionConfigRequestObjectAsyncSnippet.g.cs | 49 + ...iveQuestionConfigRequestObjectSnippet.g.cs | 48 + ...UpdateGenerativeQuestionConfigSnippet.g.cs | 45 + ...iveQuestionsFeatureConfigAsyncSnippet.g.cs | 46 + ...eatureConfigRequestObjectAsyncSnippet.g.cs | 49 + ...ionsFeatureConfigRequestObjectSnippet.g.cs | 48 + ...nerativeQuestionsFeatureConfigSnippet.g.cs | 45 + ...lient.SearchRequestObjectAsyncSnippet.g.cs | 2 + ...viceClient.SearchRequestObjectSnippet.g.cs | 2 + ...ippet_metadata_google.cloud.retail.v2.json | 1285 +- ...nerativeQuestionServiceClientSnippets.g.cs | 440 + .../SearchServiceClientSnippets.g.cs | 4 + .../Google.Cloud.Retail.V2/Common.g.cs | 2 +- .../CompletionService.g.cs | 285 +- .../GenerativeQuestion.g.cs | 765 ++ .../GenerativeQuestionService.g.cs | 1623 +++ .../GenerativeQuestionServiceClient.g.cs | 1063 ++ .../GenerativeQuestionServiceGrpc.g.cs | 511 + ...enerativeQuestionServiceResourceNames.g.cs | 56 + .../PackageApiMetadata.g.cs | 2 + .../Google.Cloud.Retail.V2/Product.g.cs | 12 +- .../Google.Cloud.Retail.V2/SearchService.g.cs | 11273 ++++++++++------ .../ServiceCollectionExtensions.g.cs | 36 + .../gapic_metadata.json | 39 + 43 files changed, 14512 insertions(+), 4093 deletions(-) create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigSnippet.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/GenerativeQuestionServiceClientSnippets.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestion.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionService.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceClient.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceGrpc.g.cs create mode 100644 apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceResourceNames.g.cs diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsyncSnippet.g.cs new file mode 100644 index 000000000000..c3574d1ac46e --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async_flattened] + using Google.Cloud.Retail.V2; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for BatchUpdateGenerativeQuestionConfigsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 BatchUpdateGenerativeQuestionConfigsAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync(parent, requests); + } + } + // [END retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..ebe5f09af7d7 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,51 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for BatchUpdateGenerativeQuestionConfigsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 BatchUpdateGenerativeQuestionConfigsRequestObjectAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + BatchUpdateGenerativeQuestionConfigsRequest request = new BatchUpdateGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Requests = + { + new UpdateGenerativeQuestionConfigRequest(), + }, + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..eb574d2252a3 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectSnippet.g.cs @@ -0,0 +1,50 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for BatchUpdateGenerativeQuestionConfigs + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 BatchUpdateGenerativeQuestionConfigsRequestObject() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + BatchUpdateGenerativeQuestionConfigsRequest request = new BatchUpdateGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Requests = + { + new UpdateGenerativeQuestionConfigRequest(), + }, + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..f19d7247b670 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Collections.Generic; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for BatchUpdateGenerativeQuestionConfigsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 BatchUpdateGenerativeQuestionConfigsResourceNamesAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync(parent, requests); + } + } + // [END retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..1b35f1c0b073 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Collections.Generic; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for BatchUpdateGenerativeQuestionConfigs + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 BatchUpdateGenerativeQuestionConfigsResourceNames() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs(parent, requests); + } + } + // [END retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsSnippet.g.cs new file mode 100644 index 000000000000..0347e9fe9ba2 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync_flattened] + using Google.Cloud.Retail.V2; + using System.Collections.Generic; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for BatchUpdateGenerativeQuestionConfigs + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 BatchUpdateGenerativeQuestionConfigs() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs(parent, requests); + } + } + // [END retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs new file mode 100644 index 000000000000..dcd88dad9f01 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async_flattened] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for GetGenerativeQuestionsFeatureConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 GetGenerativeQuestionsFeatureConfigAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync(catalog); + } + } + // [END retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..31f20f039f21 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for GetGenerativeQuestionsFeatureConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 GetGenerativeQuestionsFeatureConfigRequestObjectAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + GetGenerativeQuestionsFeatureConfigRequest request = new GetGenerativeQuestionsFeatureConfigRequest + { + CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..d5edd102dd27 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for GetGenerativeQuestionsFeatureConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 GetGenerativeQuestionsFeatureConfigRequestObject() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + GetGenerativeQuestionsFeatureConfigRequest request = new GetGenerativeQuestionsFeatureConfigRequest + { + CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..91df1c0f22d6 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for GetGenerativeQuestionsFeatureConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 GetGenerativeQuestionsFeatureConfigResourceNamesAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync(catalog); + } + } + // [END retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..24a0ec4866b0 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for GetGenerativeQuestionsFeatureConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 GetGenerativeQuestionsFeatureConfigResourceNames() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig(catalog); + } + } + // [END retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigSnippet.g.cs new file mode 100644 index 000000000000..3abe6e0183e3 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync_flattened] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for GetGenerativeQuestionsFeatureConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 GetGenerativeQuestionsFeatureConfig() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig(catalog); + } + } + // [END retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsyncSnippet.g.cs new file mode 100644 index 000000000000..1a7fd6e46c4d --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async_flattened] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for ListGenerativeQuestionConfigsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 ListGenerativeQuestionConfigsAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + ListGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync(parent); + } + } + // [END retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..2aa4c1ea5253 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for ListGenerativeQuestionConfigsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 ListGenerativeQuestionConfigsRequestObjectAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + ListGenerativeQuestionConfigsRequest request = new ListGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + ListGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..5614c53cc4a0 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for ListGenerativeQuestionConfigs + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 ListGenerativeQuestionConfigsRequestObject() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + ListGenerativeQuestionConfigsRequest request = new ListGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + ListGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.ListGenerativeQuestionConfigs(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..d88608241515 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async_flattened_resourceNames] + using Google.Cloud.Retail.V2; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for ListGenerativeQuestionConfigsAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 ListGenerativeQuestionConfigsResourceNamesAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + ListGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync(parent); + } + } + // [END retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..0961d268845f --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync_flattened_resourceNames] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for ListGenerativeQuestionConfigs + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 ListGenerativeQuestionConfigsResourceNames() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + ListGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.ListGenerativeQuestionConfigs(parent); + } + } + // [END retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsSnippet.g.cs new file mode 100644 index 000000000000..83b916ae296c --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync_flattened] + using Google.Cloud.Retail.V2; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for ListGenerativeQuestionConfigs + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 ListGenerativeQuestionConfigs() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + ListGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.ListGenerativeQuestionConfigs(parent); + } + } + // [END retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsyncSnippet.g.cs new file mode 100644 index 000000000000..4b782ee1ef58 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_async_flattened] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionConfigAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + GenerativeQuestionConfig generativeQuestionConfig = new GenerativeQuestionConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync(generativeQuestionConfig, updateMask); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..0d2fa4a9df0b --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_async] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionConfigRequestObjectAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateGenerativeQuestionConfigRequest request = new UpdateGenerativeQuestionConfigRequest + { + GenerativeQuestionConfig = new GenerativeQuestionConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..8d1d1f97213e --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_sync] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionConfigRequestObject() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + UpdateGenerativeQuestionConfigRequest request = new UpdateGenerativeQuestionConfigRequest + { + GenerativeQuestionConfig = new GenerativeQuestionConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionConfig(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigSnippet.g.cs new file mode 100644 index 000000000000..6f9c672427cc --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_sync_flattened] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionConfig() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + GenerativeQuestionConfig generativeQuestionConfig = new GenerativeQuestionConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionConfig(generativeQuestionConfig, updateMask); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_sync_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs new file mode 100644 index 000000000000..f36aa24d94df --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_async_flattened] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionsFeatureConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionsFeatureConfigAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync(generativeQuestionsFeatureConfig, updateMask); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_async_flattened] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..e5372d86843f --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_async] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Threading.Tasks; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionsFeatureConfigAsync + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionsFeatureConfigRequestObjectAsync() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateGenerativeQuestionsFeatureConfigRequest request = new UpdateGenerativeQuestionsFeatureConfigRequest + { + GenerativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_async] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..9731198b1342 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs @@ -0,0 +1,48 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_sync] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionsFeatureConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionsFeatureConfigRequestObject() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + UpdateGenerativeQuestionsFeatureConfigRequest request = new UpdateGenerativeQuestionsFeatureConfigRequest + { + GenerativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig(request); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_sync] +} diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigSnippet.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigSnippet.g.cs new file mode 100644 index 000000000000..1ea97e123586 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.GeneratedSnippets/GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + // [START retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_sync_flattened] + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + + public sealed partial class GeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionsFeatureConfig + /// + /// This snippet has been automatically generated and should be regarded as a code template only. + /// It will require modifications to work: + /// - It may require correct/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 UpdateGenerativeQuestionsFeatureConfig() + { + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig(generativeQuestionsFeatureConfig, updateMask); + } + } + // [END retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_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 e524f1742ad5..68a283ecfdbe 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 @@ -62,6 +62,8 @@ public async Task SearchRequestObjectAsync() Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), Entity = "", + ConversationalSearchSpec = new SearchRequest.Types.ConversationalSearchSpec(), + TileNavigationSpec = new SearchRequest.Types.TileNavigationSpec(), }; // 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 989412c5aabd..010b9b0eeb1c 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 @@ -60,6 +60,8 @@ public void SearchRequestObject() Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), Entity = "", + ConversationalSearchSpec = new SearchRequest.Types.ConversationalSearchSpec(), + TileNavigationSpec = new SearchRequest.Types.TileNavigationSpec(), }; // 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 ce7f91539579..d9d2d4e89286 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 @@ -4065,6 +4065,1283 @@ } ] }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_sync", + "title": "UpdateGenerativeQuestionsFeatureConfigRequestObject", + "description": "Snippet for UpdateGenerativeQuestionsFeatureConfig", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionsFeatureConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_async", + "title": "UpdateGenerativeQuestionsFeatureConfigRequestObjectAsync", + "description": "Snippet for UpdateGenerativeQuestionsFeatureConfigAsync", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionsFeatureConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_sync_flattened", + "title": "UpdateGenerativeQuestionsFeatureConfig", + "description": "Snippet for UpdateGenerativeQuestionsFeatureConfig", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionsFeatureConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "name": "generativeQuestionsFeatureConfig" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionsFeatureConfig_async_flattened", + "title": "UpdateGenerativeQuestionsFeatureConfigAsync", + "description": "Snippet for UpdateGenerativeQuestionsFeatureConfigAsync", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionsFeatureConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "name": "generativeQuestionsFeatureConfig" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync", + "title": "GetGenerativeQuestionsFeatureConfigRequestObject", + "description": "Snippet for GetGenerativeQuestionsFeatureConfig", + "file": "GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.GetGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async", + "title": "GetGenerativeQuestionsFeatureConfigRequestObjectAsync", + "description": "Snippet for GetGenerativeQuestionsFeatureConfigAsync", + "file": "GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetGenerativeQuestionsFeatureConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.GetGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync_flattened", + "title": "GetGenerativeQuestionsFeatureConfig", + "description": "Snippet for GetGenerativeQuestionsFeatureConfig", + "file": "GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig", + "parameters": [ + { + "type": "System.String", + "name": "catalog" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.GetGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async_flattened", + "title": "GetGenerativeQuestionsFeatureConfigAsync", + "description": "Snippet for GetGenerativeQuestionsFeatureConfigAsync", + "file": "GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetGenerativeQuestionsFeatureConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "catalog" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.GetGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_sync_flattened_resourceNames", + "title": "GetGenerativeQuestionsFeatureConfigResourceNames", + "description": "Snippet for GetGenerativeQuestionsFeatureConfig", + "file": "GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "catalog" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.GetGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_GetGenerativeQuestionsFeatureConfig_async_flattened_resourceNames", + "title": "GetGenerativeQuestionsFeatureConfigResourceNamesAsync", + "description": "Snippet for GetGenerativeQuestionsFeatureConfigAsync", + "file": "GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetGenerativeQuestionsFeatureConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "catalog" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "GetGenerativeQuestionsFeatureConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.GetGenerativeQuestionsFeatureConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync", + "title": "ListGenerativeQuestionConfigsRequestObject", + "description": "Snippet for ListGenerativeQuestionConfigs", + "file": "GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.ListGenerativeQuestionConfigs", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsResponse", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.ListGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async", + "title": "ListGenerativeQuestionConfigsRequestObjectAsync", + "description": "Snippet for ListGenerativeQuestionConfigsAsync", + "file": "GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListGenerativeQuestionConfigsAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.ListGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync_flattened", + "title": "ListGenerativeQuestionConfigs", + "description": "Snippet for ListGenerativeQuestionConfigs", + "file": "GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.ListGenerativeQuestionConfigs", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsResponse", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.ListGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async_flattened", + "title": "ListGenerativeQuestionConfigsAsync", + "description": "Snippet for ListGenerativeQuestionConfigsAsync", + "file": "GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListGenerativeQuestionConfigsAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.ListGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_sync_flattened_resourceNames", + "title": "ListGenerativeQuestionConfigsResourceNames", + "description": "Snippet for ListGenerativeQuestionConfigs", + "file": "GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.ListGenerativeQuestionConfigs", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsResponse", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.ListGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_ListGenerativeQuestionConfigs_async_flattened_resourceNames", + "title": "ListGenerativeQuestionConfigsResourceNamesAsync", + "description": "Snippet for ListGenerativeQuestionConfigsAsync", + "file": "GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListGenerativeQuestionConfigsAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "ListGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.ListGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_sync", + "title": "UpdateGenerativeQuestionConfigRequestObject", + "description": "Snippet for UpdateGenerativeQuestionConfig", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfig", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_async", + "title": "UpdateGenerativeQuestionConfigRequestObjectAsync", + "description": "Snippet for UpdateGenerativeQuestionConfigAsync", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_sync_flattened", + "title": "UpdateGenerativeQuestionConfig", + "description": "Snippet for UpdateGenerativeQuestionConfig", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionConfig", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfig", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GenerativeQuestionConfig", + "name": "generativeQuestionConfig" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.GenerativeQuestionConfig", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 35, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_UpdateGenerativeQuestionConfig_async_flattened", + "title": "UpdateGenerativeQuestionConfigAsync", + "description": "Snippet for UpdateGenerativeQuestionConfigAsync", + "file": "GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "UpdateGenerativeQuestionConfigAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.GenerativeQuestionConfig", + "name": "generativeQuestionConfig" + }, + { + "type": "Google.Protobuf.WellKnownTypes.FieldMask", + "name": "updateMask" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "UpdateGenerativeQuestionConfig", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.UpdateGenerativeQuestionConfig", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 36, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync", + "title": "BatchUpdateGenerativeQuestionConfigsRequestObject", + "description": "Snippet for BatchUpdateGenerativeQuestionConfigs", + "file": "GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsResponse", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.BatchUpdateGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 48, + "type": "FULL" + }, + { + "start": 34, + "end": 46, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async", + "title": "BatchUpdateGenerativeQuestionConfigsRequestObjectAsync", + "description": "Snippet for BatchUpdateGenerativeQuestionConfigsAsync", + "file": "GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchUpdateGenerativeQuestionConfigsAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.BatchUpdateGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + }, + { + "start": 35, + "end": 47, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync_flattened", + "title": "BatchUpdateGenerativeQuestionConfigs", + "description": "Snippet for BatchUpdateGenerativeQuestionConfigs", + "file": "GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "requests" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsResponse", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.BatchUpdateGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async_flattened", + "title": "BatchUpdateGenerativeQuestionConfigsAsync", + "description": "Snippet for BatchUpdateGenerativeQuestionConfigsAsync", + "file": "GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchUpdateGenerativeQuestionConfigsAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "requests" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.BatchUpdateGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_sync_flattened_resourceNames", + "title": "BatchUpdateGenerativeQuestionConfigsResourceNames", + "description": "Snippet for BatchUpdateGenerativeQuestionConfigs", + "file": "GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs", + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "requests" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsResponse", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.BatchUpdateGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + }, + { + "start": 35, + "end": 44, + "type": "SHORT" + } + ] + }, + { + "regionTag": "retail_v2_generated_GenerativeQuestionService_BatchUpdateGenerativeQuestionConfigs_async_flattened_resourceNames", + "title": "BatchUpdateGenerativeQuestionConfigsResourceNamesAsync", + "description": "Snippet for BatchUpdateGenerativeQuestionConfigsAsync", + "file": "GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "BatchUpdateGenerativeQuestionConfigsAsync", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.Retail.V2.CatalogName", + "name": "parent" + }, + { + "type": "System.Collections.Generic.IEnumerable", + "name": "requests" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "GenerativeQuestionServiceClient", + "fullName": "Google.Cloud.Retail.V2.GenerativeQuestionServiceClient" + }, + "method": { + "shortName": "BatchUpdateGenerativeQuestionConfigs", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService.BatchUpdateGenerativeQuestionConfigs", + "service": { + "shortName": "GenerativeQuestionService", + "fullName": "google.cloud.retail.v2.GenerativeQuestionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 47, + "type": "FULL" + }, + { + "start": 36, + "end": 45, + "type": "SHORT" + } + ] + }, { "regionTag": "retail_v2_generated_ModelService_CreateModel_sync", "title": "CreateModelRequestObject", @@ -9310,12 +10587,12 @@ "segments": [ { "start": 20, - "end": 99, + "end": 101, "type": "FULL" }, { "start": 36, - "end": 97, + "end": 99, "type": "SHORT" } ] @@ -9359,12 +10636,12 @@ "segments": [ { "start": 20, - "end": 101, + "end": 103, "type": "FULL" }, { "start": 38, - "end": 99, + "end": 101, "type": "SHORT" } ] diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/GenerativeQuestionServiceClientSnippets.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/GenerativeQuestionServiceClientSnippets.g.cs new file mode 100644 index 000000000000..e6b22a3ff733 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2.Snippets/GenerativeQuestionServiceClientSnippets.g.cs @@ -0,0 +1,440 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 GoogleCSharpSnippets +{ + using Google.Cloud.Retail.V2; + using Google.Protobuf.WellKnownTypes; + using System.Collections.Generic; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedGenerativeQuestionServiceClientSnippets + { + /// Snippet for UpdateGenerativeQuestionsFeatureConfig + public void UpdateGenerativeQuestionsFeatureConfigRequestObject() + { + // Snippet: UpdateGenerativeQuestionsFeatureConfig(UpdateGenerativeQuestionsFeatureConfigRequest, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + UpdateGenerativeQuestionsFeatureConfigRequest request = new UpdateGenerativeQuestionsFeatureConfigRequest + { + GenerativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig(request); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionsFeatureConfigAsync + public async Task UpdateGenerativeQuestionsFeatureConfigRequestObjectAsync() + { + // Snippet: UpdateGenerativeQuestionsFeatureConfigAsync(UpdateGenerativeQuestionsFeatureConfigRequest, CallSettings) + // Additional: UpdateGenerativeQuestionsFeatureConfigAsync(UpdateGenerativeQuestionsFeatureConfigRequest, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateGenerativeQuestionsFeatureConfigRequest request = new UpdateGenerativeQuestionsFeatureConfigRequest + { + GenerativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync(request); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionsFeatureConfig + public void UpdateGenerativeQuestionsFeatureConfig() + { + // Snippet: UpdateGenerativeQuestionsFeatureConfig(GenerativeQuestionsFeatureConfig, FieldMask, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig(generativeQuestionsFeatureConfig, updateMask); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionsFeatureConfigAsync + public async Task UpdateGenerativeQuestionsFeatureConfigAsync() + { + // Snippet: UpdateGenerativeQuestionsFeatureConfigAsync(GenerativeQuestionsFeatureConfig, FieldMask, CallSettings) + // Additional: UpdateGenerativeQuestionsFeatureConfigAsync(GenerativeQuestionsFeatureConfig, FieldMask, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig = new GenerativeQuestionsFeatureConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync(generativeQuestionsFeatureConfig, updateMask); + // End snippet + } + + /// Snippet for GetGenerativeQuestionsFeatureConfig + public void GetGenerativeQuestionsFeatureConfigRequestObject() + { + // Snippet: GetGenerativeQuestionsFeatureConfig(GetGenerativeQuestionsFeatureConfigRequest, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + GetGenerativeQuestionsFeatureConfigRequest request = new GetGenerativeQuestionsFeatureConfigRequest + { + CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig(request); + // End snippet + } + + /// Snippet for GetGenerativeQuestionsFeatureConfigAsync + public async Task GetGenerativeQuestionsFeatureConfigRequestObjectAsync() + { + // Snippet: GetGenerativeQuestionsFeatureConfigAsync(GetGenerativeQuestionsFeatureConfigRequest, CallSettings) + // Additional: GetGenerativeQuestionsFeatureConfigAsync(GetGenerativeQuestionsFeatureConfigRequest, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + GetGenerativeQuestionsFeatureConfigRequest request = new GetGenerativeQuestionsFeatureConfigRequest + { + CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync(request); + // End snippet + } + + /// Snippet for GetGenerativeQuestionsFeatureConfig + public void GetGenerativeQuestionsFeatureConfig() + { + // Snippet: GetGenerativeQuestionsFeatureConfig(string, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig(catalog); + // End snippet + } + + /// Snippet for GetGenerativeQuestionsFeatureConfigAsync + public async Task GetGenerativeQuestionsFeatureConfigAsync() + { + // Snippet: GetGenerativeQuestionsFeatureConfigAsync(string, CallSettings) + // Additional: GetGenerativeQuestionsFeatureConfigAsync(string, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync(catalog); + // End snippet + } + + /// Snippet for GetGenerativeQuestionsFeatureConfig + public void GetGenerativeQuestionsFeatureConfigResourceNames() + { + // Snippet: GetGenerativeQuestionsFeatureConfig(CatalogName, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + GenerativeQuestionsFeatureConfig response = generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig(catalog); + // End snippet + } + + /// Snippet for GetGenerativeQuestionsFeatureConfigAsync + public async Task GetGenerativeQuestionsFeatureConfigResourceNamesAsync() + { + // Snippet: GetGenerativeQuestionsFeatureConfigAsync(CatalogName, CallSettings) + // Additional: GetGenerativeQuestionsFeatureConfigAsync(CatalogName, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + GenerativeQuestionsFeatureConfig response = await generativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync(catalog); + // End snippet + } + + /// Snippet for ListGenerativeQuestionConfigs + public void ListGenerativeQuestionConfigsRequestObject() + { + // Snippet: ListGenerativeQuestionConfigs(ListGenerativeQuestionConfigsRequest, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + ListGenerativeQuestionConfigsRequest request = new ListGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + ListGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.ListGenerativeQuestionConfigs(request); + // End snippet + } + + /// Snippet for ListGenerativeQuestionConfigsAsync + public async Task ListGenerativeQuestionConfigsRequestObjectAsync() + { + // Snippet: ListGenerativeQuestionConfigsAsync(ListGenerativeQuestionConfigsRequest, CallSettings) + // Additional: ListGenerativeQuestionConfigsAsync(ListGenerativeQuestionConfigsRequest, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + ListGenerativeQuestionConfigsRequest request = new ListGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + }; + // Make the request + ListGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync(request); + // End snippet + } + + /// Snippet for ListGenerativeQuestionConfigs + public void ListGenerativeQuestionConfigs() + { + // Snippet: ListGenerativeQuestionConfigs(string, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + ListGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.ListGenerativeQuestionConfigs(parent); + // End snippet + } + + /// Snippet for ListGenerativeQuestionConfigsAsync + public async Task ListGenerativeQuestionConfigsAsync() + { + // Snippet: ListGenerativeQuestionConfigsAsync(string, CallSettings) + // Additional: ListGenerativeQuestionConfigsAsync(string, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + // Make the request + ListGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync(parent); + // End snippet + } + + /// Snippet for ListGenerativeQuestionConfigs + public void ListGenerativeQuestionConfigsResourceNames() + { + // Snippet: ListGenerativeQuestionConfigs(CatalogName, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + ListGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.ListGenerativeQuestionConfigs(parent); + // End snippet + } + + /// Snippet for ListGenerativeQuestionConfigsAsync + public async Task ListGenerativeQuestionConfigsResourceNamesAsync() + { + // Snippet: ListGenerativeQuestionConfigsAsync(CatalogName, CallSettings) + // Additional: ListGenerativeQuestionConfigsAsync(CatalogName, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + // Make the request + ListGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync(parent); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionConfig + public void UpdateGenerativeQuestionConfigRequestObject() + { + // Snippet: UpdateGenerativeQuestionConfig(UpdateGenerativeQuestionConfigRequest, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + UpdateGenerativeQuestionConfigRequest request = new UpdateGenerativeQuestionConfigRequest + { + GenerativeQuestionConfig = new GenerativeQuestionConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionConfig(request); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionConfigAsync + public async Task UpdateGenerativeQuestionConfigRequestObjectAsync() + { + // Snippet: UpdateGenerativeQuestionConfigAsync(UpdateGenerativeQuestionConfigRequest, CallSettings) + // Additional: UpdateGenerativeQuestionConfigAsync(UpdateGenerativeQuestionConfigRequest, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + UpdateGenerativeQuestionConfigRequest request = new UpdateGenerativeQuestionConfigRequest + { + GenerativeQuestionConfig = new GenerativeQuestionConfig(), + UpdateMask = new FieldMask(), + }; + // Make the request + GenerativeQuestionConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync(request); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionConfig + public void UpdateGenerativeQuestionConfig() + { + // Snippet: UpdateGenerativeQuestionConfig(GenerativeQuestionConfig, FieldMask, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + GenerativeQuestionConfig generativeQuestionConfig = new GenerativeQuestionConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionConfig response = generativeQuestionServiceClient.UpdateGenerativeQuestionConfig(generativeQuestionConfig, updateMask); + // End snippet + } + + /// Snippet for UpdateGenerativeQuestionConfigAsync + public async Task UpdateGenerativeQuestionConfigAsync() + { + // Snippet: UpdateGenerativeQuestionConfigAsync(GenerativeQuestionConfig, FieldMask, CallSettings) + // Additional: UpdateGenerativeQuestionConfigAsync(GenerativeQuestionConfig, FieldMask, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + GenerativeQuestionConfig generativeQuestionConfig = new GenerativeQuestionConfig(); + FieldMask updateMask = new FieldMask(); + // Make the request + GenerativeQuestionConfig response = await generativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync(generativeQuestionConfig, updateMask); + // End snippet + } + + /// Snippet for BatchUpdateGenerativeQuestionConfigs + public void BatchUpdateGenerativeQuestionConfigsRequestObject() + { + // Snippet: BatchUpdateGenerativeQuestionConfigs(BatchUpdateGenerativeQuestionConfigsRequest, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + BatchUpdateGenerativeQuestionConfigsRequest request = new BatchUpdateGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Requests = + { + new UpdateGenerativeQuestionConfigRequest(), + }, + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs(request); + // End snippet + } + + /// Snippet for BatchUpdateGenerativeQuestionConfigsAsync + public async Task BatchUpdateGenerativeQuestionConfigsRequestObjectAsync() + { + // Snippet: BatchUpdateGenerativeQuestionConfigsAsync(BatchUpdateGenerativeQuestionConfigsRequest, CallSettings) + // Additional: BatchUpdateGenerativeQuestionConfigsAsync(BatchUpdateGenerativeQuestionConfigsRequest, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + BatchUpdateGenerativeQuestionConfigsRequest request = new BatchUpdateGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"), + Requests = + { + new UpdateGenerativeQuestionConfigRequest(), + }, + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync(request); + // End snippet + } + + /// Snippet for BatchUpdateGenerativeQuestionConfigs + public void BatchUpdateGenerativeQuestionConfigs() + { + // Snippet: BatchUpdateGenerativeQuestionConfigs(string, IEnumerable, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs(parent, requests); + // End snippet + } + + /// Snippet for BatchUpdateGenerativeQuestionConfigsAsync + public async Task BatchUpdateGenerativeQuestionConfigsAsync() + { + // Snippet: BatchUpdateGenerativeQuestionConfigsAsync(string, IEnumerable, CallSettings) + // Additional: BatchUpdateGenerativeQuestionConfigsAsync(string, IEnumerable, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]"; + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync(parent, requests); + // End snippet + } + + /// Snippet for BatchUpdateGenerativeQuestionConfigs + public void BatchUpdateGenerativeQuestionConfigsResourceNames() + { + // Snippet: BatchUpdateGenerativeQuestionConfigs(CatalogName, IEnumerable, CallSettings) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = GenerativeQuestionServiceClient.Create(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs(parent, requests); + // End snippet + } + + /// Snippet for BatchUpdateGenerativeQuestionConfigsAsync + public async Task BatchUpdateGenerativeQuestionConfigsResourceNamesAsync() + { + // Snippet: BatchUpdateGenerativeQuestionConfigsAsync(CatalogName, IEnumerable, CallSettings) + // Additional: BatchUpdateGenerativeQuestionConfigsAsync(CatalogName, IEnumerable, CancellationToken) + // Create client + GenerativeQuestionServiceClient generativeQuestionServiceClient = await GenerativeQuestionServiceClient.CreateAsync(); + // Initialize request argument(s) + CatalogName parent = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"); + IEnumerable requests = new UpdateGenerativeQuestionConfigRequest[] + { + new UpdateGenerativeQuestionConfigRequest(), + }; + // Make the request + BatchUpdateGenerativeQuestionConfigsResponse response = await generativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync(parent, requests); + // 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 1afef09dc487..10772bd8739f 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 @@ -56,6 +56,8 @@ public void SearchRequestObject() Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), Entity = "", + ConversationalSearchSpec = new SearchRequest.Types.ConversationalSearchSpec(), + TileNavigationSpec = new SearchRequest.Types.TileNavigationSpec(), }; // Make the request PagedEnumerable response = searchServiceClient.Search(request); @@ -125,6 +127,8 @@ public async Task SearchRequestObjectAsync() Labels = { { "", "" }, }, SpellCorrectionSpec = new SearchRequest.Types.SpellCorrectionSpec(), Entity = "", + ConversationalSearchSpec = new SearchRequest.Types.ConversationalSearchSpec(), + TileNavigationSpec = new SearchRequest.Types.TileNavigationSpec(), }; // Make the request PagedAsyncEnumerable response = searchServiceClient.SearchAsync(request); 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 0ebfadab1ad3..aa3c541e046f 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 @@ -3708,7 +3708,7 @@ public ForceReturnFacetAction Clone() { private readonly pbc::RepeatedField facetPositionAdjustments_ = new pbc::RepeatedField(); /// /// Each instance corresponds to a force return attribute for the given - /// condition. There can't be more 3 instances here. + /// condition. There can't be more 15 instances here. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 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 ebef5955daf9..6270f2b9a233 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 @@ -36,42 +36,50 @@ static CompletionServiceReflection() { "QQISEgoKdmlzaXRvcl9pZBgHIAEoCRIWCg5sYW5ndWFnZV9jb2RlcxgDIAMo", "CRITCgtkZXZpY2VfdHlwZRgEIAEoCRIPCgdkYXRhc2V0GAYgASgJEhcKD21h", "eF9zdWdnZXN0aW9ucxgFIAEoBRIkChxlbmFibGVfYXR0cmlidXRlX3N1Z2dl", - "c3Rpb25zGAkgASgIEg4KBmVudGl0eRgKIAEoCSKNBAoVQ29tcGxldGVRdWVy", + "c3Rpb25zGAkgASgIEg4KBmVudGl0eRgKIAEoCSKNBgoVQ29tcGxldGVRdWVy", "eVJlc3BvbnNlEloKEmNvbXBsZXRpb25fcmVzdWx0cxgBIAMoCzI+Lmdvb2ds", "ZS5jbG91ZC5yZXRhaWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNlLkNvbXBs", "ZXRpb25SZXN1bHQSGQoRYXR0cmlidXRpb25fdG9rZW4YAiABKAkSYwoVcmVj", "ZW50X3NlYXJjaF9yZXN1bHRzGAMgAygLMkAuZ29vZ2xlLmNsb3VkLnJldGFp", "bC52Mi5Db21wbGV0ZVF1ZXJ5UmVzcG9uc2UuUmVjZW50U2VhcmNoUmVzdWx0", - "QgIYARrmAQoQQ29tcGxldGlvblJlc3VsdBISCgpzdWdnZXN0aW9uGAEgASgJ", - "EmIKCmF0dHJpYnV0ZXMYAiADKAsyTi5nb29nbGUuY2xvdWQucmV0YWlsLnYy", - "LkNvbXBsZXRlUXVlcnlSZXNwb25zZS5Db21wbGV0aW9uUmVzdWx0LkF0dHJp", - "YnV0ZXNFbnRyeRpaCg9BdHRyaWJ1dGVzRW50cnkSCwoDa2V5GAEgASgJEjYK", - "BXZhbHVlGAIgASgLMicuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5DdXN0b21B", - "dHRyaWJ1dGU6AjgBGi8KElJlY2VudFNlYXJjaFJlc3VsdBIVCg1yZWNlbnRf", - "c2VhcmNoGAEgASgJOgIYATKyBAoRQ29tcGxldGlvblNlcnZpY2USswEKDUNv", - "bXBsZXRlUXVlcnkSLC5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkNvbXBsZXRl", - "UXVlcnlSZXF1ZXN0Gi0uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Db21wbGV0", - "ZVF1ZXJ5UmVzcG9uc2UiRYLT5JMCPxI9L3YyL3tjYXRhbG9nPXByb2plY3Rz", - "LyovbG9jYXRpb25zLyovY2F0YWxvZ3MvKn06Y29tcGxldGVRdWVyeRKbAgoU", - "SW1wb3J0Q29tcGxldGlvbkRhdGESMy5nb29nbGUuY2xvdWQucmV0YWlsLnYy", - "LkltcG9ydENvbXBsZXRpb25EYXRhUmVxdWVzdBodLmdvb2dsZS5sb25ncnVu", - "bmluZy5PcGVyYXRpb24irgHKQVwKM2dvb2dsZS5jbG91ZC5yZXRhaWwudjIu", - "SW1wb3J0Q29tcGxldGlvbkRhdGFSZXNwb25zZRIlZ29vZ2xlLmNsb3VkLnJl", - "dGFpbC52Mi5JbXBvcnRNZXRhZGF0YYLT5JMCSSJEL3YyL3twYXJlbnQ9cHJv", - "amVjdHMvKi9sb2NhdGlvbnMvKi9jYXRhbG9ncy8qfS9jb21wbGV0aW9uRGF0", - "YTppbXBvcnQ6ASoaScpBFXJldGFpbC5nb29nbGVhcGlzLmNvbdJBLmh0dHBz", - "Oi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvY2xvdWQtcGxhdGZvcm1CwQEK", - "GmNvbS5nb29nbGUuY2xvdWQucmV0YWlsLnYyQhZDb21wbGV0aW9uU2Vydmlj", - "ZVByb3RvUAFaMmNsb3VkLmdvb2dsZS5jb20vZ28vcmV0YWlsL2FwaXYyL3Jl", - "dGFpbHBiO3JldGFpbHBiogIGUkVUQUlMqgIWR29vZ2xlLkNsb3VkLlJldGFp", - "bC5WMsoCFkdvb2dsZVxDbG91ZFxSZXRhaWxcVjLqAhlHb29nbGU6OkNsb3Vk", - "OjpSZXRhaWw6OlYyYgZwcm90bzM=")); + "QgIYARJeChFhdHRyaWJ1dGVfcmVzdWx0cxgEIAMoCzJDLmdvb2dsZS5jbG91", + "ZC5yZXRhaWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNlLkF0dHJpYnV0ZVJl", + "c3VsdHNFbnRyeRrmAQoQQ29tcGxldGlvblJlc3VsdBISCgpzdWdnZXN0aW9u", + "GAEgASgJEmIKCmF0dHJpYnV0ZXMYAiADKAsyTi5nb29nbGUuY2xvdWQucmV0", + "YWlsLnYyLkNvbXBsZXRlUXVlcnlSZXNwb25zZS5Db21wbGV0aW9uUmVzdWx0", + "LkF0dHJpYnV0ZXNFbnRyeRpaCg9BdHRyaWJ1dGVzRW50cnkSCwoDa2V5GAEg", + "ASgJEjYKBXZhbHVlGAIgASgLMicuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5D", + "dXN0b21BdHRyaWJ1dGU6AjgBGi8KElJlY2VudFNlYXJjaFJlc3VsdBIVCg1y", + "ZWNlbnRfc2VhcmNoGAEgASgJOgIYARomCg9BdHRyaWJ1dGVSZXN1bHQSEwoL", + "c3VnZ2VzdGlvbnMYASADKAkadgoVQXR0cmlidXRlUmVzdWx0c0VudHJ5EgsK", + "A2tleRgBIAEoCRJMCgV2YWx1ZRgCIAEoCzI9Lmdvb2dsZS5jbG91ZC5yZXRh", + "aWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNlLkF0dHJpYnV0ZVJlc3VsdDoC", + "OAEysgQKEUNvbXBsZXRpb25TZXJ2aWNlErMBCg1Db21wbGV0ZVF1ZXJ5Eiwu", + "Z29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Db21wbGV0ZVF1ZXJ5UmVxdWVzdBot", + "Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuQ29tcGxldGVRdWVyeVJlc3BvbnNl", + "IkWC0+STAj8SPS92Mi97Y2F0YWxvZz1wcm9qZWN0cy8qL2xvY2F0aW9ucy8q", + "L2NhdGFsb2dzLyp9OmNvbXBsZXRlUXVlcnkSmwIKFEltcG9ydENvbXBsZXRp", + "b25EYXRhEjMuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5JbXBvcnRDb21wbGV0", + "aW9uRGF0YVJlcXVlc3QaHS5nb29nbGUubG9uZ3J1bm5pbmcuT3BlcmF0aW9u", + "Iq4BykFcCjNnb29nbGUuY2xvdWQucmV0YWlsLnYyLkltcG9ydENvbXBsZXRp", + "b25EYXRhUmVzcG9uc2USJWdvb2dsZS5jbG91ZC5yZXRhaWwudjIuSW1wb3J0", + "TWV0YWRhdGGC0+STAkkiRC92Mi97cGFyZW50PXByb2plY3RzLyovbG9jYXRp", + "b25zLyovY2F0YWxvZ3MvKn0vY29tcGxldGlvbkRhdGE6aW1wb3J0OgEqGknK", + "QRVyZXRhaWwuZ29vZ2xlYXBpcy5jb23SQS5odHRwczovL3d3dy5nb29nbGVh", + "cGlzLmNvbS9hdXRoL2Nsb3VkLXBsYXRmb3JtQsEBChpjb20uZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52MkIWQ29tcGxldGlvblNlcnZpY2VQcm90b1ABWjJjbG91", + "ZC5nb29nbGUuY29tL2dvL3JldGFpbC9hcGl2Mi9yZXRhaWxwYjtyZXRhaWxw", + "YqICBlJFVEFJTKoCFkdvb2dsZS5DbG91ZC5SZXRhaWwuVjLKAhZHb29nbGVc", + "Q2xvdWRcUmV0YWlsXFYy6gIZR29vZ2xlOjpDbG91ZDo6UmV0YWlsOjpWMmIG", + "cHJvdG8z")); 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", "EnableAttributeSuggestions", "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)}) + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryResponse), global::Google.Cloud.Retail.V2.CompleteQueryResponse.Parser, new[]{ "CompletionResults", "AttributionToken", "RecentSearchResults", "AttributeResults" }, 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), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.AttributeResult), global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.AttributeResult.Parser, new[]{ "Suggestions" }, null, null, null, null), + null, }) })); } #endregion @@ -293,9 +301,9 @@ public int MaxSuggestions { public const int EnableAttributeSuggestionsFieldNumber = 9; private bool enableAttributeSuggestions_; /// - /// If true, attribute suggestions are enabled and provided in response. + /// If true, attribute suggestions are enabled and provided in the response. /// - /// This field is only available for "cloud-retail" dataset. + /// This field is only available for the "cloud-retail" dataset. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -682,6 +690,7 @@ public CompleteQueryResponse(CompleteQueryResponse other) : this() { completionResults_ = other.completionResults_.Clone(); attributionToken_ = other.attributionToken_; recentSearchResults_ = other.recentSearchResults_.Clone(); + attributeResults_ = other.attributeResults_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -759,6 +768,27 @@ public string AttributionToken { get { return recentSearchResults_; } } + /// Field number for the "attribute_results" field. + public const int AttributeResultsFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_attributeResults_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.CompleteQueryResponse.Types.AttributeResult.Parser), 34); + private readonly pbc::MapField attributeResults_ = new pbc::MapField(); + /// + /// A map of matched attribute suggestions. This field is only available for + /// "cloud-retail" dataset. + /// + /// Current supported keys: + /// + /// * `brands` + /// + /// * `categories` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField AttributeResults { + get { return attributeResults_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -777,6 +807,7 @@ public bool Equals(CompleteQueryResponse other) { if(!completionResults_.Equals(other.completionResults_)) return false; if (AttributionToken != other.AttributionToken) return false; if(!recentSearchResults_.Equals(other.recentSearchResults_)) return false; + if (!AttributeResults.Equals(other.AttributeResults)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -787,6 +818,7 @@ public override int GetHashCode() { hash ^= completionResults_.GetHashCode(); if (AttributionToken.Length != 0) hash ^= AttributionToken.GetHashCode(); hash ^= recentSearchResults_.GetHashCode(); + hash ^= AttributeResults.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -811,6 +843,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteString(AttributionToken); } recentSearchResults_.WriteTo(output, _repeated_recentSearchResults_codec); + attributeResults_.WriteTo(output, _map_attributeResults_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -827,6 +860,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteString(AttributionToken); } recentSearchResults_.WriteTo(ref output, _repeated_recentSearchResults_codec); + attributeResults_.WriteTo(ref output, _map_attributeResults_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -842,6 +876,7 @@ public int CalculateSize() { size += 1 + pb::CodedOutputStream.ComputeStringSize(AttributionToken); } size += recentSearchResults_.CalculateSize(_repeated_recentSearchResults_codec); + size += attributeResults_.CalculateSize(_map_attributeResults_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -859,6 +894,7 @@ public void MergeFrom(CompleteQueryResponse other) { AttributionToken = other.AttributionToken; } recentSearchResults_.Add(other.recentSearchResults_); + attributeResults_.MergeFrom(other.attributeResults_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -886,6 +922,10 @@ public void MergeFrom(pb::CodedInputStream input) { recentSearchResults_.AddEntriesFrom(input, _repeated_recentSearchResults_codec); break; } + case 34: { + attributeResults_.AddEntriesFrom(input, _map_attributeResults_codec); + break; + } } } #endif @@ -913,6 +953,10 @@ public void MergeFrom(pb::CodedInputStream input) { recentSearchResults_.AddEntriesFrom(ref input, _repeated_recentSearchResults_codec); break; } + case 34: { + attributeResults_.AddEntriesFrom(ref input, _map_attributeResults_codec); + break; + } } } } @@ -1353,6 +1397,189 @@ public void MergeFrom(pb::CodedInputStream input) { } + /// + /// Resource that represents attribute results. + /// The list of suggestions for the attribute. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AttributeResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AttributeResult()); + 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.CompleteQueryResponse.Descriptor.NestedTypes[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 AttributeResult() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AttributeResult(AttributeResult other) : this() { + suggestions_ = other.suggestions_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AttributeResult Clone() { + return new AttributeResult(this); + } + + /// Field number for the "suggestions" field. + public const int SuggestionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_suggestions_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField suggestions_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Suggestions { + get { return suggestions_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AttributeResult); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AttributeResult other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!suggestions_.Equals(other.suggestions_)) 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 ^= suggestions_.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 + suggestions_.WriteTo(output, _repeated_suggestions_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) { + suggestions_.WriteTo(ref output, _repeated_suggestions_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 += suggestions_.CalculateSize(_repeated_suggestions_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AttributeResult other) { + if (other == null) { + return; + } + suggestions_.Add(other.suggestions_); + _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: { + suggestions_.AddEntriesFrom(input, _repeated_suggestions_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: { + suggestions_.AddEntriesFrom(ref input, _repeated_suggestions_codec); + break; + } + } + } + } + #endif + + } + } #endregion diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestion.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestion.g.cs new file mode 100644 index 000000000000..a55fd985d32d --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestion.g.cs @@ -0,0 +1,765 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/generative_question.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/generative_question.proto + public static partial class GenerativeQuestionReflection { + + #region Descriptor + /// File descriptor for google/cloud/retail/v2/generative_question.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GenerativeQuestionReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjBnb29nbGUvY2xvdWQvcmV0YWlsL3YyL2dlbmVyYXRpdmVfcXVlc3Rpb24u", + "cHJvdG8SFmdvb2dsZS5jbG91ZC5yZXRhaWwudjIaH2dvb2dsZS9hcGkvZmll", + "bGRfYmVoYXZpb3IucHJvdG8idQogR2VuZXJhdGl2ZVF1ZXN0aW9uc0ZlYXR1", + "cmVDb25maWcSFAoHY2F0YWxvZxgBIAEoCUID4EECEhwKD2ZlYXR1cmVfZW5h", + "YmxlZBgCIAEoCEID4EEBEh0KEG1pbmltdW1fcHJvZHVjdHMYAyABKAVCA+BB", + "ASLdAQoYR2VuZXJhdGl2ZVF1ZXN0aW9uQ29uZmlnEhQKB2NhdGFsb2cYASAB", + "KAlCA+BBAhISCgVmYWNldBgCIAEoCUID4EECEh8KEmdlbmVyYXRlZF9xdWVz", + "dGlvbhgDIAEoCUID4EEDEhsKDmZpbmFsX3F1ZXN0aW9uGAQgASgJQgPgQQES", + "GwoOZXhhbXBsZV92YWx1ZXMYBSADKAlCA+BBAxIWCglmcmVxdWVuY3kYBiAB", + "KAJCA+BBAxIkChdhbGxvd2VkX2luX2NvbnZlcnNhdGlvbhgHIAEoCEID4EEB", + "QsIBChpjb20uZ29vZ2xlLmNsb3VkLnJldGFpbC52MkIXR2VuZXJhdGl2ZVF1", + "ZXN0aW9uUHJvdG9QAVoyY2xvdWQuZ29vZ2xlLmNvbS9nby9yZXRhaWwvYXBp", + "djIvcmV0YWlscGI7cmV0YWlscGKiAgZSRVRBSUyqAhZHb29nbGUuQ2xvdWQu", + "UmV0YWlsLlYyygIWR29vZ2xlXENsb3VkXFJldGFpbFxWMuoCGUdvb2dsZTo6", + "Q2xvdWQ6OlJldGFpbDo6VjJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig), global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig.Parser, new[]{ "Catalog", "FeatureEnabled", "MinimumProducts" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.GenerativeQuestionConfig), global::Google.Cloud.Retail.V2.GenerativeQuestionConfig.Parser, new[]{ "Catalog", "Facet", "GeneratedQuestion", "FinalQuestion", "ExampleValues", "Frequency", "AllowedInConversation" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration for overall generative question feature state. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GenerativeQuestionsFeatureConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GenerativeQuestionsFeatureConfig()); + 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.GenerativeQuestionReflection.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 GenerativeQuestionsFeatureConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenerativeQuestionsFeatureConfig(GenerativeQuestionsFeatureConfig other) : this() { + catalog_ = other.catalog_; + featureEnabled_ = other.featureEnabled_; + minimumProducts_ = other.minimumProducts_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenerativeQuestionsFeatureConfig Clone() { + return new GenerativeQuestionsFeatureConfig(this); + } + + /// Field number for the "catalog" field. + public const int CatalogFieldNumber = 1; + private string catalog_ = ""; + /// + /// Required. Resource name of the affected catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Catalog { + get { return catalog_; } + set { + catalog_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "feature_enabled" field. + public const int FeatureEnabledFieldNumber = 2; + private bool featureEnabled_; + /// + /// Optional. Determines whether questions will be used at serving time. + /// Note: This feature cannot be enabled until initial data requirements are + /// satisfied. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FeatureEnabled { + get { return featureEnabled_; } + set { + featureEnabled_ = value; + } + } + + /// Field number for the "minimum_products" field. + public const int MinimumProductsFieldNumber = 3; + private int minimumProducts_; + /// + /// Optional. Minimum number of products in the response to trigger follow-up + /// questions. Value must be 0 or positive. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MinimumProducts { + get { return minimumProducts_; } + set { + minimumProducts_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GenerativeQuestionsFeatureConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GenerativeQuestionsFeatureConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Catalog != other.Catalog) return false; + if (FeatureEnabled != other.FeatureEnabled) return false; + if (MinimumProducts != other.MinimumProducts) 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 (Catalog.Length != 0) hash ^= Catalog.GetHashCode(); + if (FeatureEnabled != false) hash ^= FeatureEnabled.GetHashCode(); + if (MinimumProducts != 0) hash ^= MinimumProducts.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 (Catalog.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Catalog); + } + if (FeatureEnabled != false) { + output.WriteRawTag(16); + output.WriteBool(FeatureEnabled); + } + if (MinimumProducts != 0) { + output.WriteRawTag(24); + output.WriteInt32(MinimumProducts); + } + 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 (Catalog.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Catalog); + } + if (FeatureEnabled != false) { + output.WriteRawTag(16); + output.WriteBool(FeatureEnabled); + } + if (MinimumProducts != 0) { + output.WriteRawTag(24); + output.WriteInt32(MinimumProducts); + } + 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 (Catalog.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Catalog); + } + if (FeatureEnabled != false) { + size += 1 + 1; + } + if (MinimumProducts != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinimumProducts); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GenerativeQuestionsFeatureConfig other) { + if (other == null) { + return; + } + if (other.Catalog.Length != 0) { + Catalog = other.Catalog; + } + if (other.FeatureEnabled != false) { + FeatureEnabled = other.FeatureEnabled; + } + if (other.MinimumProducts != 0) { + MinimumProducts = other.MinimumProducts; + } + _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: { + Catalog = input.ReadString(); + break; + } + case 16: { + FeatureEnabled = input.ReadBool(); + break; + } + case 24: { + MinimumProducts = input.ReadInt32(); + 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: { + Catalog = input.ReadString(); + break; + } + case 16: { + FeatureEnabled = input.ReadBool(); + break; + } + case 24: { + MinimumProducts = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// Configuration for a single generated question. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GenerativeQuestionConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GenerativeQuestionConfig()); + 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.GenerativeQuestionReflection.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 GenerativeQuestionConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenerativeQuestionConfig(GenerativeQuestionConfig other) : this() { + catalog_ = other.catalog_; + facet_ = other.facet_; + generatedQuestion_ = other.generatedQuestion_; + finalQuestion_ = other.finalQuestion_; + exampleValues_ = other.exampleValues_.Clone(); + frequency_ = other.frequency_; + allowedInConversation_ = other.allowedInConversation_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenerativeQuestionConfig Clone() { + return new GenerativeQuestionConfig(this); + } + + /// Field number for the "catalog" field. + public const int CatalogFieldNumber = 1; + private string catalog_ = ""; + /// + /// Required. Resource name of the catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Catalog { + get { return catalog_; } + set { + catalog_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "facet" field. + public const int FacetFieldNumber = 2; + private string facet_ = ""; + /// + /// Required. The facet to which the question is associated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Facet { + get { return facet_; } + set { + facet_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "generated_question" field. + public const int GeneratedQuestionFieldNumber = 3; + private string generatedQuestion_ = ""; + /// + /// Output only. The LLM generated question. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GeneratedQuestion { + get { return generatedQuestion_; } + set { + generatedQuestion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "final_question" field. + public const int FinalQuestionFieldNumber = 4; + private string finalQuestion_ = ""; + /// + /// Optional. The question that will be used at serving time. + /// Question can have a max length of 300 bytes. + /// When not populated, generated_question should be used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FinalQuestion { + get { return finalQuestion_; } + set { + finalQuestion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "example_values" field. + public const int ExampleValuesFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_exampleValues_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField exampleValues_ = new pbc::RepeatedField(); + /// + /// Output only. Values that can be used to answer the question. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ExampleValues { + get { return exampleValues_; } + } + + /// Field number for the "frequency" field. + public const int FrequencyFieldNumber = 6; + private float frequency_; + /// + /// Output only. The ratio of how often a question was asked. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Frequency { + get { return frequency_; } + set { + frequency_ = value; + } + } + + /// Field number for the "allowed_in_conversation" field. + public const int AllowedInConversationFieldNumber = 7; + private bool allowedInConversation_; + /// + /// Optional. Whether the question is asked at serving time. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AllowedInConversation { + get { return allowedInConversation_; } + set { + allowedInConversation_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GenerativeQuestionConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GenerativeQuestionConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Catalog != other.Catalog) return false; + if (Facet != other.Facet) return false; + if (GeneratedQuestion != other.GeneratedQuestion) return false; + if (FinalQuestion != other.FinalQuestion) return false; + if(!exampleValues_.Equals(other.exampleValues_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Frequency, other.Frequency)) return false; + if (AllowedInConversation != other.AllowedInConversation) 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 (Catalog.Length != 0) hash ^= Catalog.GetHashCode(); + if (Facet.Length != 0) hash ^= Facet.GetHashCode(); + if (GeneratedQuestion.Length != 0) hash ^= GeneratedQuestion.GetHashCode(); + if (FinalQuestion.Length != 0) hash ^= FinalQuestion.GetHashCode(); + hash ^= exampleValues_.GetHashCode(); + if (Frequency != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Frequency); + if (AllowedInConversation != false) hash ^= AllowedInConversation.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 (Catalog.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Catalog); + } + if (Facet.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Facet); + } + if (GeneratedQuestion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(GeneratedQuestion); + } + if (FinalQuestion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(FinalQuestion); + } + exampleValues_.WriteTo(output, _repeated_exampleValues_codec); + if (Frequency != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Frequency); + } + if (AllowedInConversation != false) { + output.WriteRawTag(56); + output.WriteBool(AllowedInConversation); + } + 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 (Catalog.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Catalog); + } + if (Facet.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Facet); + } + if (GeneratedQuestion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(GeneratedQuestion); + } + if (FinalQuestion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(FinalQuestion); + } + exampleValues_.WriteTo(ref output, _repeated_exampleValues_codec); + if (Frequency != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Frequency); + } + if (AllowedInConversation != false) { + output.WriteRawTag(56); + output.WriteBool(AllowedInConversation); + } + 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 (Catalog.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Catalog); + } + if (Facet.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Facet); + } + if (GeneratedQuestion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GeneratedQuestion); + } + if (FinalQuestion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FinalQuestion); + } + size += exampleValues_.CalculateSize(_repeated_exampleValues_codec); + if (Frequency != 0F) { + size += 1 + 4; + } + if (AllowedInConversation != 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(GenerativeQuestionConfig other) { + if (other == null) { + return; + } + if (other.Catalog.Length != 0) { + Catalog = other.Catalog; + } + if (other.Facet.Length != 0) { + Facet = other.Facet; + } + if (other.GeneratedQuestion.Length != 0) { + GeneratedQuestion = other.GeneratedQuestion; + } + if (other.FinalQuestion.Length != 0) { + FinalQuestion = other.FinalQuestion; + } + exampleValues_.Add(other.exampleValues_); + if (other.Frequency != 0F) { + Frequency = other.Frequency; + } + if (other.AllowedInConversation != false) { + AllowedInConversation = other.AllowedInConversation; + } + _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: { + Catalog = input.ReadString(); + break; + } + case 18: { + Facet = input.ReadString(); + break; + } + case 26: { + GeneratedQuestion = input.ReadString(); + break; + } + case 34: { + FinalQuestion = input.ReadString(); + break; + } + case 42: { + exampleValues_.AddEntriesFrom(input, _repeated_exampleValues_codec); + break; + } + case 53: { + Frequency = input.ReadFloat(); + break; + } + case 56: { + AllowedInConversation = 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: { + Catalog = input.ReadString(); + break; + } + case 18: { + Facet = input.ReadString(); + break; + } + case 26: { + GeneratedQuestion = input.ReadString(); + break; + } + case 34: { + FinalQuestion = input.ReadString(); + break; + } + case 42: { + exampleValues_.AddEntriesFrom(ref input, _repeated_exampleValues_codec); + break; + } + case 53: { + Frequency = input.ReadFloat(); + break; + } + case 56: { + AllowedInConversation = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionService.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionService.g.cs new file mode 100644 index 000000000000..b8c7e89fc25b --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionService.g.cs @@ -0,0 +1,1623 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/generative_question_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/generative_question_service.proto + public static partial class GenerativeQuestionServiceReflection { + + #region Descriptor + /// File descriptor for google/cloud/retail/v2/generative_question_service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GenerativeQuestionServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cjhnb29nbGUvY2xvdWQvcmV0YWlsL3YyL2dlbmVyYXRpdmVfcXVlc3Rpb25f", + "c2VydmljZS5wcm90bxIWZ29vZ2xlLmNsb3VkLnJldGFpbC52MhocZ29vZ2xl", + "L2FwaS9hbm5vdGF0aW9ucy5wcm90bxoXZ29vZ2xlL2FwaS9jbGllbnQucHJv", + "dG8aH2dvb2dsZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdvb2dsZS9h", + "cGkvcmVzb3VyY2UucHJvdG8aMGdvb2dsZS9jbG91ZC9yZXRhaWwvdjIvZ2Vu", + "ZXJhdGl2ZV9xdWVzdGlvbi5wcm90bxogZ29vZ2xlL3Byb3RvYnVmL2ZpZWxk", + "X21hc2sucHJvdG8i0QEKLVVwZGF0ZUdlbmVyYXRpdmVRdWVzdGlvbnNGZWF0", + "dXJlQ29uZmlnUmVxdWVzdBJqCiNnZW5lcmF0aXZlX3F1ZXN0aW9uc19mZWF0", + "dXJlX2NvbmZpZxgCIAEoCzI4Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuR2Vu", + "ZXJhdGl2ZVF1ZXN0aW9uc0ZlYXR1cmVDb25maWdCA+BBAhI0Cgt1cGRhdGVf", + "bWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tCA+BBASJk", + "CipHZXRHZW5lcmF0aXZlUXVlc3Rpb25zRmVhdHVyZUNvbmZpZ1JlcXVlc3QS", + "NgoHY2F0YWxvZxgBIAEoCUIl4EEC+kEfCh1yZXRhaWwuZ29vZ2xlYXBpcy5j", + "b20vQ2F0YWxvZyJdCiRMaXN0R2VuZXJhdGl2ZVF1ZXN0aW9uQ29uZmlnc1Jl", + "cXVlc3QSNQoGcGFyZW50GAEgASgJQiXgQQL6QR8KHXJldGFpbC5nb29nbGVh", + "cGlzLmNvbS9DYXRhbG9nIn4KJUxpc3RHZW5lcmF0aXZlUXVlc3Rpb25Db25m", + "aWdzUmVzcG9uc2USVQobZ2VuZXJhdGl2ZV9xdWVzdGlvbl9jb25maWdzGAEg", + "AygLMjAuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5HZW5lcmF0aXZlUXVlc3Rp", + "b25Db25maWciuAEKJVVwZGF0ZUdlbmVyYXRpdmVRdWVzdGlvbkNvbmZpZ1Jl", + "cXVlc3QSWQoaZ2VuZXJhdGl2ZV9xdWVzdGlvbl9jb25maWcYAyABKAsyMC5n", + "b29nbGUuY2xvdWQucmV0YWlsLnYyLkdlbmVyYXRpdmVRdWVzdGlvbkNvbmZp", + "Z0ID4EECEjQKC3VwZGF0ZV9tYXNrGAQgASgLMhouZ29vZ2xlLnByb3RvYnVm", + "LkZpZWxkTWFza0ID4EEBIroBCitCYXRjaFVwZGF0ZUdlbmVyYXRpdmVRdWVz", + "dGlvbkNvbmZpZ3NSZXF1ZXN0EjUKBnBhcmVudBgBIAEoCUIl4EEB+kEfCh1y", + "ZXRhaWwuZ29vZ2xlYXBpcy5jb20vQ2F0YWxvZxJUCghyZXF1ZXN0cxgCIAMo", + "CzI9Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuVXBkYXRlR2VuZXJhdGl2ZVF1", + "ZXN0aW9uQ29uZmlnUmVxdWVzdEID4EECIooBCixCYXRjaFVwZGF0ZUdlbmVy", + "YXRpdmVRdWVzdGlvbkNvbmZpZ3NSZXNwb25zZRJaChtnZW5lcmF0aXZlX3F1", + "ZXN0aW9uX2NvbmZpZ3MYASADKAsyMC5nb29nbGUuY2xvdWQucmV0YWlsLnYy", + "LkdlbmVyYXRpdmVRdWVzdGlvbkNvbmZpZ0ID4EEBMroMChlHZW5lcmF0aXZl", + "UXVlc3Rpb25TZXJ2aWNlEvkCCiZVcGRhdGVHZW5lcmF0aXZlUXVlc3Rpb25z", + "RmVhdHVyZUNvbmZpZxJFLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuVXBkYXRl", + "R2VuZXJhdGl2ZVF1ZXN0aW9uc0ZlYXR1cmVDb25maWdSZXF1ZXN0GjguZ29v", + "Z2xlLmNsb3VkLnJldGFpbC52Mi5HZW5lcmF0aXZlUXVlc3Rpb25zRmVhdHVy", + "ZUNvbmZpZyLNAdpBL2dlbmVyYXRpdmVfcXVlc3Rpb25zX2ZlYXR1cmVfY29u", + "ZmlnLHVwZGF0ZV9tYXNrgtPkkwKUATJtL3YyL3tnZW5lcmF0aXZlX3F1ZXN0", + "aW9uc19mZWF0dXJlX2NvbmZpZy5jYXRhbG9nPXByb2plY3RzLyovbG9jYXRp", + "b25zLyovY2F0YWxvZ3MvKn0vZ2VuZXJhdGl2ZVF1ZXN0aW9uRmVhdHVyZToj", + "Z2VuZXJhdGl2ZV9xdWVzdGlvbnNfZmVhdHVyZV9jb25maWcSgAIKI0dldEdl", + "bmVyYXRpdmVRdWVzdGlvbnNGZWF0dXJlQ29uZmlnEkIuZ29vZ2xlLmNsb3Vk", + "LnJldGFpbC52Mi5HZXRHZW5lcmF0aXZlUXVlc3Rpb25zRmVhdHVyZUNvbmZp", + "Z1JlcXVlc3QaOC5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkdlbmVyYXRpdmVR", + "dWVzdGlvbnNGZWF0dXJlQ29uZmlnIlvaQQdjYXRhbG9ngtPkkwJLEkkvdjIv", + "e2NhdGFsb2c9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9jYXRhbG9ncy8qfS9n", + "ZW5lcmF0aXZlUXVlc3Rpb25GZWF0dXJlEvEBCh1MaXN0R2VuZXJhdGl2ZVF1", + "ZXN0aW9uQ29uZmlncxI8Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuTGlzdEdl", + "bmVyYXRpdmVRdWVzdGlvbkNvbmZpZ3NSZXF1ZXN0Gj0uZ29vZ2xlLmNsb3Vk", + "LnJldGFpbC52Mi5MaXN0R2VuZXJhdGl2ZVF1ZXN0aW9uQ29uZmlnc1Jlc3Bv", + "bnNlIlPaQQZwYXJlbnSC0+STAkQSQi92Mi97cGFyZW50PXByb2plY3RzLyov", + "bG9jYXRpb25zLyovY2F0YWxvZ3MvKn0vZ2VuZXJhdGl2ZVF1ZXN0aW9ucxK+", + "AgoeVXBkYXRlR2VuZXJhdGl2ZVF1ZXN0aW9uQ29uZmlnEj0uZ29vZ2xlLmNs", + "b3VkLnJldGFpbC52Mi5VcGRhdGVHZW5lcmF0aXZlUXVlc3Rpb25Db25maWdS", + "ZXF1ZXN0GjAuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5HZW5lcmF0aXZlUXVl", + "c3Rpb25Db25maWciqgHaQSZnZW5lcmF0aXZlX3F1ZXN0aW9uX2NvbmZpZyx1", + "cGRhdGVfbWFza4LT5JMCezJdL3YyL3tnZW5lcmF0aXZlX3F1ZXN0aW9uX2Nv", + "bmZpZy5jYXRhbG9nPXByb2plY3RzLyovbG9jYXRpb25zLyovY2F0YWxvZ3Mv", + "Kn0vZ2VuZXJhdGl2ZVF1ZXN0aW9uOhpnZW5lcmF0aXZlX3F1ZXN0aW9uX2Nv", + "bmZpZxKdAgokQmF0Y2hVcGRhdGVHZW5lcmF0aXZlUXVlc3Rpb25Db25maWdz", + "EkMuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5CYXRjaFVwZGF0ZUdlbmVyYXRp", + "dmVRdWVzdGlvbkNvbmZpZ3NSZXF1ZXN0GkQuZ29vZ2xlLmNsb3VkLnJldGFp", + "bC52Mi5CYXRjaFVwZGF0ZUdlbmVyYXRpdmVRdWVzdGlvbkNvbmZpZ3NSZXNw", + "b25zZSJq2kEPcGFyZW50LHJlcXVlc3RzgtPkkwJSIk0vdjIve3BhcmVudD1w", + "cm9qZWN0cy8qL2xvY2F0aW9ucy8qL2NhdGFsb2dzLyp9L2dlbmVyYXRpdmVR", + "dWVzdGlvbjpiYXRjaFVwZGF0ZToBKhpJykEVcmV0YWlsLmdvb2dsZWFwaXMu", + "Y29t0kEuaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9jbG91ZC1w", + "bGF0Zm9ybULJAQoaY29tLmdvb2dsZS5jbG91ZC5yZXRhaWwudjJCHkdlbmVy", + "YXRpdmVRdWVzdGlvblNlcnZpY2VQcm90b1ABWjJjbG91ZC5nb29nbGUuY29t", + "L2dvL3JldGFpbC9hcGl2Mi9yZXRhaWxwYjtyZXRhaWxwYqICBlJFVEFJTKoC", + "Fkdvb2dsZS5DbG91ZC5SZXRhaWwuVjLKAhZHb29nbGVcQ2xvdWRcUmV0YWls", + "XFYy6gIZR29vZ2xlOjpDbG91ZDo6UmV0YWlsOjpWMmIGcHJvdG8z")); + 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.GenerativeQuestionReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest), global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest.Parser, new[]{ "GenerativeQuestionsFeatureConfig", "UpdateMask" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest), global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest.Parser, new[]{ "Catalog" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest), global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest.Parser, new[]{ "Parent" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsResponse), global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsResponse.Parser, new[]{ "GenerativeQuestionConfigs" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest), global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest.Parser, new[]{ "GenerativeQuestionConfig", "UpdateMask" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest), global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest.Parser, new[]{ "Parent", "Requests" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsResponse), global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsResponse.Parser, new[]{ "GenerativeQuestionConfigs" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Request for UpdateGenerativeQuestionsFeatureConfig method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateGenerativeQuestionsFeatureConfigRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateGenerativeQuestionsFeatureConfigRequest()); + 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.GenerativeQuestionServiceReflection.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 UpdateGenerativeQuestionsFeatureConfigRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateGenerativeQuestionsFeatureConfigRequest(UpdateGenerativeQuestionsFeatureConfigRequest other) : this() { + generativeQuestionsFeatureConfig_ = other.generativeQuestionsFeatureConfig_ != null ? other.generativeQuestionsFeatureConfig_.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 UpdateGenerativeQuestionsFeatureConfigRequest Clone() { + return new UpdateGenerativeQuestionsFeatureConfigRequest(this); + } + + /// Field number for the "generative_questions_feature_config" field. + public const int GenerativeQuestionsFeatureConfigFieldNumber = 2; + private global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig_; + /// + /// Required. The configuration managing the feature state. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig GenerativeQuestionsFeatureConfig { + get { return generativeQuestionsFeatureConfig_; } + set { + generativeQuestionsFeatureConfig_ = value; + } + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionsFeatureConfig][google.cloud.retail.v2.GenerativeQuestionsFeatureConfig] + /// to update. If not set or empty, all supported fields are updated. + /// + [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 UpdateGenerativeQuestionsFeatureConfigRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateGenerativeQuestionsFeatureConfigRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(GenerativeQuestionsFeatureConfig, other.GenerativeQuestionsFeatureConfig)) 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 (generativeQuestionsFeatureConfig_ != null) hash ^= GenerativeQuestionsFeatureConfig.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 (generativeQuestionsFeatureConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(GenerativeQuestionsFeatureConfig); + } + if (updateMask_ != null) { + output.WriteRawTag(34); + 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 (generativeQuestionsFeatureConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(GenerativeQuestionsFeatureConfig); + } + if (updateMask_ != null) { + output.WriteRawTag(34); + 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 (generativeQuestionsFeatureConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GenerativeQuestionsFeatureConfig); + } + 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(UpdateGenerativeQuestionsFeatureConfigRequest other) { + if (other == null) { + return; + } + if (other.generativeQuestionsFeatureConfig_ != null) { + if (generativeQuestionsFeatureConfig_ == null) { + GenerativeQuestionsFeatureConfig = new global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig(); + } + GenerativeQuestionsFeatureConfig.MergeFrom(other.GenerativeQuestionsFeatureConfig); + } + 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 18: { + if (generativeQuestionsFeatureConfig_ == null) { + GenerativeQuestionsFeatureConfig = new global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig(); + } + input.ReadMessage(GenerativeQuestionsFeatureConfig); + break; + } + case 34: { + 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 18: { + if (generativeQuestionsFeatureConfig_ == null) { + GenerativeQuestionsFeatureConfig = new global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig(); + } + input.ReadMessage(GenerativeQuestionsFeatureConfig); + break; + } + case 34: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + } + } + } + #endif + + } + + /// + /// Request for GetGenerativeQuestionsFeatureConfig method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetGenerativeQuestionsFeatureConfigRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetGenerativeQuestionsFeatureConfigRequest()); + 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.GenerativeQuestionServiceReflection.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 GetGenerativeQuestionsFeatureConfigRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetGenerativeQuestionsFeatureConfigRequest(GetGenerativeQuestionsFeatureConfigRequest other) : this() { + catalog_ = other.catalog_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetGenerativeQuestionsFeatureConfigRequest Clone() { + return new GetGenerativeQuestionsFeatureConfigRequest(this); + } + + /// Field number for the "catalog" field. + public const int CatalogFieldNumber = 1; + private string catalog_ = ""; + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Catalog { + get { return catalog_; } + set { + catalog_ = 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 GetGenerativeQuestionsFeatureConfigRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetGenerativeQuestionsFeatureConfigRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Catalog != other.Catalog) 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 (Catalog.Length != 0) hash ^= Catalog.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 (Catalog.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Catalog); + } + 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 (Catalog.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Catalog); + } + 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 (Catalog.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Catalog); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetGenerativeQuestionsFeatureConfigRequest other) { + if (other == null) { + return; + } + if (other.Catalog.Length != 0) { + Catalog = other.Catalog; + } + _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: { + Catalog = 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: { + Catalog = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request for ListQuestions method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListGenerativeQuestionConfigsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListGenerativeQuestionConfigsRequest()); + 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.GenerativeQuestionServiceReflection.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 ListGenerativeQuestionConfigsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListGenerativeQuestionConfigsRequest(ListGenerativeQuestionConfigsRequest other) : this() { + parent_ = other.parent_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListGenerativeQuestionConfigsRequest Clone() { + return new ListGenerativeQuestionConfigsRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = 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 ListGenerativeQuestionConfigsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListGenerativeQuestionConfigsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) 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 (_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 (_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 (_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 (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListGenerativeQuestionConfigsRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + _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; + } + } + } + #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; + } + } + } + } + #endif + + } + + /// + /// Response for ListQuestions method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListGenerativeQuestionConfigsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListGenerativeQuestionConfigsResponse()); + 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.GenerativeQuestionServiceReflection.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 ListGenerativeQuestionConfigsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListGenerativeQuestionConfigsResponse(ListGenerativeQuestionConfigsResponse other) : this() { + generativeQuestionConfigs_ = other.generativeQuestionConfigs_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListGenerativeQuestionConfigsResponse Clone() { + return new ListGenerativeQuestionConfigsResponse(this); + } + + /// Field number for the "generative_question_configs" field. + public const int GenerativeQuestionConfigsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_generativeQuestionConfigs_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.GenerativeQuestionConfig.Parser); + private readonly pbc::RepeatedField generativeQuestionConfigs_ = new pbc::RepeatedField(); + /// + /// All the questions for a given catalog. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField GenerativeQuestionConfigs { + get { return generativeQuestionConfigs_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListGenerativeQuestionConfigsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListGenerativeQuestionConfigsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!generativeQuestionConfigs_.Equals(other.generativeQuestionConfigs_)) 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 ^= generativeQuestionConfigs_.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 + generativeQuestionConfigs_.WriteTo(output, _repeated_generativeQuestionConfigs_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) { + generativeQuestionConfigs_.WriteTo(ref output, _repeated_generativeQuestionConfigs_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 += generativeQuestionConfigs_.CalculateSize(_repeated_generativeQuestionConfigs_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListGenerativeQuestionConfigsResponse other) { + if (other == null) { + return; + } + generativeQuestionConfigs_.Add(other.generativeQuestionConfigs_); + _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: { + generativeQuestionConfigs_.AddEntriesFrom(input, _repeated_generativeQuestionConfigs_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: { + generativeQuestionConfigs_.AddEntriesFrom(ref input, _repeated_generativeQuestionConfigs_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Request for UpdateGenerativeQuestionConfig method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateGenerativeQuestionConfigRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateGenerativeQuestionConfigRequest()); + 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.GenerativeQuestionServiceReflection.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 UpdateGenerativeQuestionConfigRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateGenerativeQuestionConfigRequest(UpdateGenerativeQuestionConfigRequest other) : this() { + generativeQuestionConfig_ = other.generativeQuestionConfig_ != null ? other.generativeQuestionConfig_.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 UpdateGenerativeQuestionConfigRequest Clone() { + return new UpdateGenerativeQuestionConfigRequest(this); + } + + /// Field number for the "generative_question_config" field. + public const int GenerativeQuestionConfigFieldNumber = 3; + private global::Google.Cloud.Retail.V2.GenerativeQuestionConfig generativeQuestionConfig_; + /// + /// Required. The question to update. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.GenerativeQuestionConfig GenerativeQuestionConfig { + get { return generativeQuestionConfig_; } + set { + generativeQuestionConfig_ = value; + } + } + + /// Field number for the "update_mask" field. + public const int UpdateMaskFieldNumber = 4; + private global::Google.Protobuf.WellKnownTypes.FieldMask updateMask_; + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionConfig][google.cloud.retail.v2.GenerativeQuestionConfig] + /// to update. The following are NOT supported: + /// + /// * [GenerativeQuestionConfig.frequency][google.cloud.retail.v2.GenerativeQuestionConfig.frequency] + /// + /// If not set or empty, all supported fields are updated. + /// + [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 UpdateGenerativeQuestionConfigRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateGenerativeQuestionConfigRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(GenerativeQuestionConfig, other.GenerativeQuestionConfig)) 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 (generativeQuestionConfig_ != null) hash ^= GenerativeQuestionConfig.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 (generativeQuestionConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(GenerativeQuestionConfig); + } + if (updateMask_ != null) { + output.WriteRawTag(34); + 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 (generativeQuestionConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(GenerativeQuestionConfig); + } + if (updateMask_ != null) { + output.WriteRawTag(34); + 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 (generativeQuestionConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GenerativeQuestionConfig); + } + 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(UpdateGenerativeQuestionConfigRequest other) { + if (other == null) { + return; + } + if (other.generativeQuestionConfig_ != null) { + if (generativeQuestionConfig_ == null) { + GenerativeQuestionConfig = new global::Google.Cloud.Retail.V2.GenerativeQuestionConfig(); + } + GenerativeQuestionConfig.MergeFrom(other.GenerativeQuestionConfig); + } + 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 26: { + if (generativeQuestionConfig_ == null) { + GenerativeQuestionConfig = new global::Google.Cloud.Retail.V2.GenerativeQuestionConfig(); + } + input.ReadMessage(GenerativeQuestionConfig); + break; + } + case 34: { + 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 26: { + if (generativeQuestionConfig_ == null) { + GenerativeQuestionConfig = new global::Google.Cloud.Retail.V2.GenerativeQuestionConfig(); + } + input.ReadMessage(GenerativeQuestionConfig); + break; + } + case 34: { + if (updateMask_ == null) { + UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask(); + } + input.ReadMessage(UpdateMask); + break; + } + } + } + } + #endif + + } + + /// + /// Request for BatchUpdateGenerativeQuestionConfig method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BatchUpdateGenerativeQuestionConfigsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchUpdateGenerativeQuestionConfigsRequest()); + 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.GenerativeQuestionServiceReflection.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 BatchUpdateGenerativeQuestionConfigsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchUpdateGenerativeQuestionConfigsRequest(BatchUpdateGenerativeQuestionConfigsRequest other) : this() { + parent_ = other.parent_; + requests_ = other.requests_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchUpdateGenerativeQuestionConfigsRequest Clone() { + return new BatchUpdateGenerativeQuestionConfigsRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + [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 "requests" field. + public const int RequestsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_requests_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest.Parser); + private readonly pbc::RepeatedField requests_ = new pbc::RepeatedField(); + /// + /// Required. The updates question configs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Requests { + get { return requests_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BatchUpdateGenerativeQuestionConfigsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BatchUpdateGenerativeQuestionConfigsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if(!requests_.Equals(other.requests_)) 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(); + hash ^= requests_.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); + } + requests_.WriteTo(output, _repeated_requests_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 (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + requests_.WriteTo(ref output, _repeated_requests_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 (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + size += requests_.CalculateSize(_repeated_requests_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BatchUpdateGenerativeQuestionConfigsRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + requests_.Add(other.requests_); + _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: { + requests_.AddEntriesFrom(input, _repeated_requests_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: { + Parent = input.ReadString(); + break; + } + case 18: { + requests_.AddEntriesFrom(ref input, _repeated_requests_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Aggregated response for UpdateGenerativeQuestionConfig method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BatchUpdateGenerativeQuestionConfigsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchUpdateGenerativeQuestionConfigsResponse()); + 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.GenerativeQuestionServiceReflection.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 BatchUpdateGenerativeQuestionConfigsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchUpdateGenerativeQuestionConfigsResponse(BatchUpdateGenerativeQuestionConfigsResponse other) : this() { + generativeQuestionConfigs_ = other.generativeQuestionConfigs_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BatchUpdateGenerativeQuestionConfigsResponse Clone() { + return new BatchUpdateGenerativeQuestionConfigsResponse(this); + } + + /// Field number for the "generative_question_configs" field. + public const int GenerativeQuestionConfigsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_generativeQuestionConfigs_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.GenerativeQuestionConfig.Parser); + private readonly pbc::RepeatedField generativeQuestionConfigs_ = new pbc::RepeatedField(); + /// + /// Optional. The updates question configs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField GenerativeQuestionConfigs { + get { return generativeQuestionConfigs_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BatchUpdateGenerativeQuestionConfigsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BatchUpdateGenerativeQuestionConfigsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!generativeQuestionConfigs_.Equals(other.generativeQuestionConfigs_)) 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 ^= generativeQuestionConfigs_.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 + generativeQuestionConfigs_.WriteTo(output, _repeated_generativeQuestionConfigs_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) { + generativeQuestionConfigs_.WriteTo(ref output, _repeated_generativeQuestionConfigs_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 += generativeQuestionConfigs_.CalculateSize(_repeated_generativeQuestionConfigs_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BatchUpdateGenerativeQuestionConfigsResponse other) { + if (other == null) { + return; + } + generativeQuestionConfigs_.Add(other.generativeQuestionConfigs_); + _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: { + generativeQuestionConfigs_.AddEntriesFrom(input, _repeated_generativeQuestionConfigs_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: { + generativeQuestionConfigs_.AddEntriesFrom(ref input, _repeated_generativeQuestionConfigs_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceClient.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceClient.g.cs new file mode 100644 index 000000000000..f9f6339785a6 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceClient.g.cs @@ -0,0 +1,1063 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; +using wkt = Google.Protobuf.WellKnownTypes; + +namespace Google.Cloud.Retail.V2 +{ + /// Settings for instances. + public sealed partial class GenerativeQuestionServiceSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static GenerativeQuestionServiceSettings GetDefault() => new GenerativeQuestionServiceSettings(); + + /// + /// Constructs a new object with default settings. + /// + public GenerativeQuestionServiceSettings() + { + } + + private GenerativeQuestionServiceSettings(GenerativeQuestionServiceSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + UpdateGenerativeQuestionsFeatureConfigSettings = existing.UpdateGenerativeQuestionsFeatureConfigSettings; + GetGenerativeQuestionsFeatureConfigSettings = existing.GetGenerativeQuestionsFeatureConfigSettings; + ListGenerativeQuestionConfigsSettings = existing.ListGenerativeQuestionConfigsSettings; + UpdateGenerativeQuestionConfigSettings = existing.UpdateGenerativeQuestionConfigSettings; + BatchUpdateGenerativeQuestionConfigsSettings = existing.BatchUpdateGenerativeQuestionConfigsSettings; + LocationsSettings = existing.LocationsSettings; + OnCopy(existing); + } + + partial void OnCopy(GenerativeQuestionServiceSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfig and + /// GenerativeQuestionServiceClient.UpdateGenerativeQuestionsFeatureConfigAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings UpdateGenerativeQuestionsFeatureConfigSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfig and + /// GenerativeQuestionServiceClient.GetGenerativeQuestionsFeatureConfigAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings GetGenerativeQuestionsFeatureConfigSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// GenerativeQuestionServiceClient.ListGenerativeQuestionConfigs and + /// GenerativeQuestionServiceClient.ListGenerativeQuestionConfigsAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings ListGenerativeQuestionConfigsSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfig and + /// GenerativeQuestionServiceClient.UpdateGenerativeQuestionConfigAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings UpdateGenerativeQuestionConfigSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// for synchronous and asynchronous calls to + /// GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigs and + /// GenerativeQuestionServiceClient.BatchUpdateGenerativeQuestionConfigsAsync. + /// + /// + /// + /// This call will not be retried. + /// No timeout is applied. + /// + /// + public gaxgrpc::CallSettings BatchUpdateGenerativeQuestionConfigsSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.None); + + /// + /// 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 GenerativeQuestionServiceSettings Clone() => new GenerativeQuestionServiceSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, + /// endpoint etc. + /// + public sealed partial class GenerativeQuestionServiceClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public GenerativeQuestionServiceSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public GenerativeQuestionServiceClientBuilder() : base(GenerativeQuestionServiceClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref GenerativeQuestionServiceClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override GenerativeQuestionServiceClient Build() + { + GenerativeQuestionServiceClient 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 GenerativeQuestionServiceClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return GenerativeQuestionServiceClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return GenerativeQuestionServiceClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => GenerativeQuestionServiceClient.ChannelPool; + } + + /// GenerativeQuestionService client wrapper, for convenient use. + /// + /// Service for managing LLM generated questions in search serving. + /// + public abstract partial class GenerativeQuestionServiceClient + { + /// + /// The default endpoint for the GenerativeQuestionService 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 GenerativeQuestionService scopes. + /// + /// The default GenerativeQuestionService 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(GenerativeQuestionService.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 GenerativeQuestionServiceClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, + /// endpoint and settings. To specify custom credentials or other settings, use + /// . + /// + /// The created . + public static GenerativeQuestionServiceClient Create() => new GenerativeQuestionServiceClientBuilder().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 GenerativeQuestionServiceClient Create(grpccore::CallInvoker callInvoker, GenerativeQuestionServiceSettings 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); + } + GenerativeQuestionService.GenerativeQuestionServiceClient grpcClient = new GenerativeQuestionService.GenerativeQuestionServiceClient(callInvoker); + return new GenerativeQuestionServiceClientImpl(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 GenerativeQuestionService client + public virtual GenerativeQuestionService.GenerativeQuestionServiceClient GrpcClient => throw new sys::NotImplementedException(); + + /// The associated with this client. + public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException(); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GenerativeQuestionsFeatureConfig UpdateGenerativeQuestionsFeatureConfig(UpdateGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 UpdateGenerativeQuestionsFeatureConfigAsync(UpdateGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 UpdateGenerativeQuestionsFeatureConfigAsync(UpdateGenerativeQuestionsFeatureConfigRequest request, st::CancellationToken cancellationToken) => + UpdateGenerativeQuestionsFeatureConfigAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. The configuration managing the feature state. + /// + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionsFeatureConfig][google.cloud.retail.v2.GenerativeQuestionsFeatureConfig] + /// to update. If not set or empty, all supported fields are updated. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual GenerativeQuestionsFeatureConfig UpdateGenerativeQuestionsFeatureConfig(GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateGenerativeQuestionsFeatureConfig(new UpdateGenerativeQuestionsFeatureConfigRequest + { + GenerativeQuestionsFeatureConfig = gax::GaxPreconditions.CheckNotNull(generativeQuestionsFeatureConfig, nameof(generativeQuestionsFeatureConfig)), + UpdateMask = updateMask, + }, callSettings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. The configuration managing the feature state. + /// + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionsFeatureConfig][google.cloud.retail.v2.GenerativeQuestionsFeatureConfig] + /// to update. If not set or empty, all supported fields are updated. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateGenerativeQuestionsFeatureConfigAsync(GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateGenerativeQuestionsFeatureConfigAsync(new UpdateGenerativeQuestionsFeatureConfigRequest + { + GenerativeQuestionsFeatureConfig = gax::GaxPreconditions.CheckNotNull(generativeQuestionsFeatureConfig, nameof(generativeQuestionsFeatureConfig)), + UpdateMask = updateMask, + }, callSettings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. The configuration managing the feature state. + /// + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionsFeatureConfig][google.cloud.retail.v2.GenerativeQuestionsFeatureConfig] + /// to update. If not set or empty, all supported fields are updated. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateGenerativeQuestionsFeatureConfigAsync(GenerativeQuestionsFeatureConfig generativeQuestionsFeatureConfig, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateGenerativeQuestionsFeatureConfigAsync(generativeQuestionsFeatureConfig, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GenerativeQuestionsFeatureConfig GetGenerativeQuestionsFeatureConfig(GetGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GetGenerativeQuestionsFeatureConfigAsync(GetGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GetGenerativeQuestionsFeatureConfigAsync(GetGenerativeQuestionsFeatureConfigRequest request, st::CancellationToken cancellationToken) => + GetGenerativeQuestionsFeatureConfigAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual GenerativeQuestionsFeatureConfig GetGenerativeQuestionsFeatureConfig(string catalog, gaxgrpc::CallSettings callSettings = null) => + GetGenerativeQuestionsFeatureConfig(new GetGenerativeQuestionsFeatureConfigRequest + { + Catalog = gax::GaxPreconditions.CheckNotNullOrEmpty(catalog, nameof(catalog)), + }, callSettings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetGenerativeQuestionsFeatureConfigAsync(string catalog, gaxgrpc::CallSettings callSettings = null) => + GetGenerativeQuestionsFeatureConfigAsync(new GetGenerativeQuestionsFeatureConfigRequest + { + Catalog = gax::GaxPreconditions.CheckNotNullOrEmpty(catalog, nameof(catalog)), + }, callSettings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetGenerativeQuestionsFeatureConfigAsync(string catalog, st::CancellationToken cancellationToken) => + GetGenerativeQuestionsFeatureConfigAsync(catalog, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual GenerativeQuestionsFeatureConfig GetGenerativeQuestionsFeatureConfig(CatalogName catalog, gaxgrpc::CallSettings callSettings = null) => + GetGenerativeQuestionsFeatureConfig(new GetGenerativeQuestionsFeatureConfigRequest + { + CatalogAsCatalogName = gax::GaxPreconditions.CheckNotNull(catalog, nameof(catalog)), + }, callSettings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetGenerativeQuestionsFeatureConfigAsync(CatalogName catalog, gaxgrpc::CallSettings callSettings = null) => + GetGenerativeQuestionsFeatureConfigAsync(new GetGenerativeQuestionsFeatureConfigRequest + { + CatalogAsCatalogName = gax::GaxPreconditions.CheckNotNull(catalog, nameof(catalog)), + }, callSettings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetGenerativeQuestionsFeatureConfigAsync(CatalogName catalog, st::CancellationToken cancellationToken) => + GetGenerativeQuestionsFeatureConfigAsync(catalog, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsResponse ListGenerativeQuestionConfigs(ListGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsAsync(ListGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsAsync(ListGenerativeQuestionConfigsRequest request, st::CancellationToken cancellationToken) => + ListGenerativeQuestionConfigsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Returns all questions for a given catalog. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ListGenerativeQuestionConfigsResponse ListGenerativeQuestionConfigs(string parent, gaxgrpc::CallSettings callSettings = null) => + ListGenerativeQuestionConfigs(new ListGenerativeQuestionConfigsRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }, callSettings); + + /// + /// Returns all questions for a given catalog. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ListGenerativeQuestionConfigsAsync(string parent, gaxgrpc::CallSettings callSettings = null) => + ListGenerativeQuestionConfigsAsync(new ListGenerativeQuestionConfigsRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }, callSettings); + + /// + /// Returns all questions for a given catalog. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ListGenerativeQuestionConfigsAsync(string parent, st::CancellationToken cancellationToken) => + ListGenerativeQuestionConfigsAsync(parent, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Returns all questions for a given catalog. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ListGenerativeQuestionConfigsResponse ListGenerativeQuestionConfigs(CatalogName parent, gaxgrpc::CallSettings callSettings = null) => + ListGenerativeQuestionConfigs(new ListGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }, callSettings); + + /// + /// Returns all questions for a given catalog. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ListGenerativeQuestionConfigsAsync(CatalogName parent, gaxgrpc::CallSettings callSettings = null) => + ListGenerativeQuestionConfigsAsync(new ListGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }, callSettings); + + /// + /// Returns all questions for a given catalog. + /// + /// + /// Required. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ListGenerativeQuestionConfigsAsync(CatalogName parent, st::CancellationToken cancellationToken) => + ListGenerativeQuestionConfigsAsync(parent, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Allows management of individual questions. + /// + /// 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 GenerativeQuestionConfig UpdateGenerativeQuestionConfig(UpdateGenerativeQuestionConfigRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Allows management of individual questions. + /// + /// 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 UpdateGenerativeQuestionConfigAsync(UpdateGenerativeQuestionConfigRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Allows management of individual questions. + /// + /// 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 UpdateGenerativeQuestionConfigAsync(UpdateGenerativeQuestionConfigRequest request, st::CancellationToken cancellationToken) => + UpdateGenerativeQuestionConfigAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Allows management of individual questions. + /// + /// + /// Required. The question to update. + /// + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionConfig][google.cloud.retail.v2.GenerativeQuestionConfig] + /// to update. The following are NOT supported: + /// + /// * [GenerativeQuestionConfig.frequency][google.cloud.retail.v2.GenerativeQuestionConfig.frequency] + /// + /// If not set or empty, all supported fields are updated. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual GenerativeQuestionConfig UpdateGenerativeQuestionConfig(GenerativeQuestionConfig generativeQuestionConfig, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateGenerativeQuestionConfig(new UpdateGenerativeQuestionConfigRequest + { + GenerativeQuestionConfig = gax::GaxPreconditions.CheckNotNull(generativeQuestionConfig, nameof(generativeQuestionConfig)), + UpdateMask = updateMask, + }, callSettings); + + /// + /// Allows management of individual questions. + /// + /// + /// Required. The question to update. + /// + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionConfig][google.cloud.retail.v2.GenerativeQuestionConfig] + /// to update. The following are NOT supported: + /// + /// * [GenerativeQuestionConfig.frequency][google.cloud.retail.v2.GenerativeQuestionConfig.frequency] + /// + /// If not set or empty, all supported fields are updated. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task UpdateGenerativeQuestionConfigAsync(GenerativeQuestionConfig generativeQuestionConfig, wkt::FieldMask updateMask, gaxgrpc::CallSettings callSettings = null) => + UpdateGenerativeQuestionConfigAsync(new UpdateGenerativeQuestionConfigRequest + { + GenerativeQuestionConfig = gax::GaxPreconditions.CheckNotNull(generativeQuestionConfig, nameof(generativeQuestionConfig)), + UpdateMask = updateMask, + }, callSettings); + + /// + /// Allows management of individual questions. + /// + /// + /// Required. The question to update. + /// + /// + /// Optional. Indicates which fields in the provided + /// [GenerativeQuestionConfig][google.cloud.retail.v2.GenerativeQuestionConfig] + /// to update. The following are NOT supported: + /// + /// * [GenerativeQuestionConfig.frequency][google.cloud.retail.v2.GenerativeQuestionConfig.frequency] + /// + /// If not set or empty, all supported fields are updated. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task UpdateGenerativeQuestionConfigAsync(GenerativeQuestionConfig generativeQuestionConfig, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) => + UpdateGenerativeQuestionConfigAsync(generativeQuestionConfig, updateMask, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsResponse BatchUpdateGenerativeQuestionConfigs(BatchUpdateGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsAsync(BatchUpdateGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsAsync(BatchUpdateGenerativeQuestionConfigsRequest request, st::CancellationToken cancellationToken) => + BatchUpdateGenerativeQuestionConfigsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Allows management of multiple questions. + /// + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// + /// Required. The updates question configs. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual BatchUpdateGenerativeQuestionConfigsResponse BatchUpdateGenerativeQuestionConfigs(string parent, scg::IEnumerable requests, gaxgrpc::CallSettings callSettings = null) => + BatchUpdateGenerativeQuestionConfigs(new BatchUpdateGenerativeQuestionConfigsRequest + { + Parent = parent ?? "", + Requests = + { + gax::GaxPreconditions.CheckNotNull(requests, nameof(requests)), + }, + }, callSettings); + + /// + /// Allows management of multiple questions. + /// + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// + /// Required. The updates question configs. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BatchUpdateGenerativeQuestionConfigsAsync(string parent, scg::IEnumerable requests, gaxgrpc::CallSettings callSettings = null) => + BatchUpdateGenerativeQuestionConfigsAsync(new BatchUpdateGenerativeQuestionConfigsRequest + { + Parent = parent ?? "", + Requests = + { + gax::GaxPreconditions.CheckNotNull(requests, nameof(requests)), + }, + }, callSettings); + + /// + /// Allows management of multiple questions. + /// + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// + /// Required. The updates question configs. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BatchUpdateGenerativeQuestionConfigsAsync(string parent, scg::IEnumerable requests, st::CancellationToken cancellationToken) => + BatchUpdateGenerativeQuestionConfigsAsync(parent, requests, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Allows management of multiple questions. + /// + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// + /// Required. The updates question configs. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual BatchUpdateGenerativeQuestionConfigsResponse BatchUpdateGenerativeQuestionConfigs(CatalogName parent, scg::IEnumerable requests, gaxgrpc::CallSettings callSettings = null) => + BatchUpdateGenerativeQuestionConfigs(new BatchUpdateGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = parent, + Requests = + { + gax::GaxPreconditions.CheckNotNull(requests, nameof(requests)), + }, + }, callSettings); + + /// + /// Allows management of multiple questions. + /// + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// + /// Required. The updates question configs. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task BatchUpdateGenerativeQuestionConfigsAsync(CatalogName parent, scg::IEnumerable requests, gaxgrpc::CallSettings callSettings = null) => + BatchUpdateGenerativeQuestionConfigsAsync(new BatchUpdateGenerativeQuestionConfigsRequest + { + ParentAsCatalogName = parent, + Requests = + { + gax::GaxPreconditions.CheckNotNull(requests, nameof(requests)), + }, + }, callSettings); + + /// + /// Allows management of multiple questions. + /// + /// + /// Optional. Resource name of the parent catalog. + /// Format: projects/{project}/locations/{location}/catalogs/{catalog} + /// + /// + /// Required. The updates question configs. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task BatchUpdateGenerativeQuestionConfigsAsync(CatalogName parent, scg::IEnumerable requests, st::CancellationToken cancellationToken) => + BatchUpdateGenerativeQuestionConfigsAsync(parent, requests, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + } + + /// GenerativeQuestionService client wrapper implementation, for convenient use. + /// + /// Service for managing LLM generated questions in search serving. + /// + public sealed partial class GenerativeQuestionServiceClientImpl : GenerativeQuestionServiceClient + { + private readonly gaxgrpc::ApiCall _callUpdateGenerativeQuestionsFeatureConfig; + + private readonly gaxgrpc::ApiCall _callGetGenerativeQuestionsFeatureConfig; + + private readonly gaxgrpc::ApiCall _callListGenerativeQuestionConfigs; + + private readonly gaxgrpc::ApiCall _callUpdateGenerativeQuestionConfig; + + private readonly gaxgrpc::ApiCall _callBatchUpdateGenerativeQuestionConfigs; + + /// + /// Constructs a client wrapper for the GenerativeQuestionService 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 GenerativeQuestionServiceClientImpl(GenerativeQuestionService.GenerativeQuestionServiceClient grpcClient, GenerativeQuestionServiceSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + GenerativeQuestionServiceSettings effectiveSettings = settings ?? GenerativeQuestionServiceSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger); + _callUpdateGenerativeQuestionsFeatureConfig = clientHelper.BuildApiCall("UpdateGenerativeQuestionsFeatureConfig", grpcClient.UpdateGenerativeQuestionsFeatureConfigAsync, grpcClient.UpdateGenerativeQuestionsFeatureConfig, effectiveSettings.UpdateGenerativeQuestionsFeatureConfigSettings).WithGoogleRequestParam("generative_questions_feature_config.catalog", request => request.GenerativeQuestionsFeatureConfig?.Catalog); + Modify_ApiCall(ref _callUpdateGenerativeQuestionsFeatureConfig); + Modify_UpdateGenerativeQuestionsFeatureConfigApiCall(ref _callUpdateGenerativeQuestionsFeatureConfig); + _callGetGenerativeQuestionsFeatureConfig = clientHelper.BuildApiCall("GetGenerativeQuestionsFeatureConfig", grpcClient.GetGenerativeQuestionsFeatureConfigAsync, grpcClient.GetGenerativeQuestionsFeatureConfig, effectiveSettings.GetGenerativeQuestionsFeatureConfigSettings).WithGoogleRequestParam("catalog", request => request.Catalog); + Modify_ApiCall(ref _callGetGenerativeQuestionsFeatureConfig); + Modify_GetGenerativeQuestionsFeatureConfigApiCall(ref _callGetGenerativeQuestionsFeatureConfig); + _callListGenerativeQuestionConfigs = clientHelper.BuildApiCall("ListGenerativeQuestionConfigs", grpcClient.ListGenerativeQuestionConfigsAsync, grpcClient.ListGenerativeQuestionConfigs, effectiveSettings.ListGenerativeQuestionConfigsSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListGenerativeQuestionConfigs); + Modify_ListGenerativeQuestionConfigsApiCall(ref _callListGenerativeQuestionConfigs); + _callUpdateGenerativeQuestionConfig = clientHelper.BuildApiCall("UpdateGenerativeQuestionConfig", grpcClient.UpdateGenerativeQuestionConfigAsync, grpcClient.UpdateGenerativeQuestionConfig, effectiveSettings.UpdateGenerativeQuestionConfigSettings).WithGoogleRequestParam("generative_question_config.catalog", request => request.GenerativeQuestionConfig?.Catalog); + Modify_ApiCall(ref _callUpdateGenerativeQuestionConfig); + Modify_UpdateGenerativeQuestionConfigApiCall(ref _callUpdateGenerativeQuestionConfig); + _callBatchUpdateGenerativeQuestionConfigs = clientHelper.BuildApiCall("BatchUpdateGenerativeQuestionConfigs", grpcClient.BatchUpdateGenerativeQuestionConfigsAsync, grpcClient.BatchUpdateGenerativeQuestionConfigs, effectiveSettings.BatchUpdateGenerativeQuestionConfigsSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callBatchUpdateGenerativeQuestionConfigs); + Modify_BatchUpdateGenerativeQuestionConfigsApiCall(ref _callBatchUpdateGenerativeQuestionConfigs); + 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_UpdateGenerativeQuestionsFeatureConfigApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetGenerativeQuestionsFeatureConfigApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListGenerativeQuestionConfigsApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_UpdateGenerativeQuestionConfigApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_BatchUpdateGenerativeQuestionConfigsApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(GenerativeQuestionService.GenerativeQuestionServiceClient grpcClient, GenerativeQuestionServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC GenerativeQuestionService client + public override GenerativeQuestionService.GenerativeQuestionServiceClient GrpcClient { get; } + + /// The associated with this client. + public override gcl::LocationsClient LocationsClient { get; } + + partial void Modify_UpdateGenerativeQuestionsFeatureConfigRequest(ref UpdateGenerativeQuestionsFeatureConfigRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetGenerativeQuestionsFeatureConfigRequest(ref GetGenerativeQuestionsFeatureConfigRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListGenerativeQuestionConfigsRequest(ref ListGenerativeQuestionConfigsRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_UpdateGenerativeQuestionConfigRequest(ref UpdateGenerativeQuestionConfigRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_BatchUpdateGenerativeQuestionConfigsRequest(ref BatchUpdateGenerativeQuestionConfigsRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GenerativeQuestionsFeatureConfig UpdateGenerativeQuestionsFeatureConfig(UpdateGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateGenerativeQuestionsFeatureConfigRequest(ref request, ref callSettings); + return _callUpdateGenerativeQuestionsFeatureConfig.Sync(request, callSettings); + } + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 UpdateGenerativeQuestionsFeatureConfigAsync(UpdateGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateGenerativeQuestionsFeatureConfigRequest(ref request, ref callSettings); + return _callUpdateGenerativeQuestionsFeatureConfig.Async(request, callSettings); + } + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GenerativeQuestionsFeatureConfig GetGenerativeQuestionsFeatureConfig(GetGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetGenerativeQuestionsFeatureConfigRequest(ref request, ref callSettings); + return _callGetGenerativeQuestionsFeatureConfig.Sync(request, callSettings); + } + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GetGenerativeQuestionsFeatureConfigAsync(GetGenerativeQuestionsFeatureConfigRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetGenerativeQuestionsFeatureConfigRequest(ref request, ref callSettings); + return _callGetGenerativeQuestionsFeatureConfig.Async(request, callSettings); + } + + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsResponse ListGenerativeQuestionConfigs(ListGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListGenerativeQuestionConfigsRequest(ref request, ref callSettings); + return _callListGenerativeQuestionConfigs.Sync(request, callSettings); + } + + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsAsync(ListGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListGenerativeQuestionConfigsRequest(ref request, ref callSettings); + return _callListGenerativeQuestionConfigs.Async(request, callSettings); + } + + /// + /// Allows management of individual questions. + /// + /// 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 GenerativeQuestionConfig UpdateGenerativeQuestionConfig(UpdateGenerativeQuestionConfigRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateGenerativeQuestionConfigRequest(ref request, ref callSettings); + return _callUpdateGenerativeQuestionConfig.Sync(request, callSettings); + } + + /// + /// Allows management of individual questions. + /// + /// 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 UpdateGenerativeQuestionConfigAsync(UpdateGenerativeQuestionConfigRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_UpdateGenerativeQuestionConfigRequest(ref request, ref callSettings); + return _callUpdateGenerativeQuestionConfig.Async(request, callSettings); + } + + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsResponse BatchUpdateGenerativeQuestionConfigs(BatchUpdateGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BatchUpdateGenerativeQuestionConfigsRequest(ref request, ref callSettings); + return _callBatchUpdateGenerativeQuestionConfigs.Sync(request, callSettings); + } + + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsAsync(BatchUpdateGenerativeQuestionConfigsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_BatchUpdateGenerativeQuestionConfigsRequest(ref request, ref callSettings); + return _callBatchUpdateGenerativeQuestionConfigs.Async(request, callSettings); + } + } + + public static partial class GenerativeQuestionService + { + public partial class GenerativeQuestionServiceClient + { + /// + /// 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/GenerativeQuestionServiceGrpc.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceGrpc.g.cs new file mode 100644 index 000000000000..c52ed799d953 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceGrpc.g.cs @@ -0,0 +1,511 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2/generative_question_service.proto +// +// Original file comments: +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.Retail.V2 { + /// + /// Service for managing LLM generated questions in search serving. + /// + public static partial class GenerativeQuestionService + { + static readonly string __ServiceName = "google.cloud.retail.v2.GenerativeQuestionService"; + + [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_UpdateGenerativeQuestionsFeatureConfigRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_GenerativeQuestionsFeatureConfig = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.GenerativeQuestionsFeatureConfig.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_GetGenerativeQuestionsFeatureConfigRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_ListGenerativeQuestionConfigsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_ListGenerativeQuestionConfigsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_UpdateGenerativeQuestionConfigRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_GenerativeQuestionConfig = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.GenerativeQuestionConfig.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_BatchUpdateGenerativeQuestionConfigsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_retail_v2_BatchUpdateGenerativeQuestionConfigsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateGenerativeQuestionsFeatureConfig = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateGenerativeQuestionsFeatureConfig", + __Marshaller_google_cloud_retail_v2_UpdateGenerativeQuestionsFeatureConfigRequest, + __Marshaller_google_cloud_retail_v2_GenerativeQuestionsFeatureConfig); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetGenerativeQuestionsFeatureConfig = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetGenerativeQuestionsFeatureConfig", + __Marshaller_google_cloud_retail_v2_GetGenerativeQuestionsFeatureConfigRequest, + __Marshaller_google_cloud_retail_v2_GenerativeQuestionsFeatureConfig); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListGenerativeQuestionConfigs = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListGenerativeQuestionConfigs", + __Marshaller_google_cloud_retail_v2_ListGenerativeQuestionConfigsRequest, + __Marshaller_google_cloud_retail_v2_ListGenerativeQuestionConfigsResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_UpdateGenerativeQuestionConfig = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UpdateGenerativeQuestionConfig", + __Marshaller_google_cloud_retail_v2_UpdateGenerativeQuestionConfigRequest, + __Marshaller_google_cloud_retail_v2_GenerativeQuestionConfig); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_BatchUpdateGenerativeQuestionConfigs = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "BatchUpdateGenerativeQuestionConfigs", + __Marshaller_google_cloud_retail_v2_BatchUpdateGenerativeQuestionConfigsRequest, + __Marshaller_google_cloud_retail_v2_BatchUpdateGenerativeQuestionConfigsResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.Retail.V2.GenerativeQuestionServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of GenerativeQuestionService + [grpc::BindServiceMethod(typeof(GenerativeQuestionService), "BindService")] + public abstract partial class GenerativeQuestionServiceBase + { + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 UpdateGenerativeQuestionsFeatureConfig(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GetGenerativeQuestionsFeatureConfig(global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigs(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Allows management of individual questions. + /// + /// 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 UpdateGenerativeQuestionConfig(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigs(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for GenerativeQuestionService + public partial class GenerativeQuestionServiceClient : grpc::ClientBase + { + /// Creates a new client for GenerativeQuestionService + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public GenerativeQuestionServiceClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for GenerativeQuestionService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public GenerativeQuestionServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected GenerativeQuestionServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected GenerativeQuestionServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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.GenerativeQuestionsFeatureConfig UpdateGenerativeQuestionsFeatureConfig(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateGenerativeQuestionsFeatureConfig(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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.GenerativeQuestionsFeatureConfig UpdateGenerativeQuestionsFeatureConfig(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateGenerativeQuestionsFeatureConfig, null, options, request); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 UpdateGenerativeQuestionsFeatureConfigAsync(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateGenerativeQuestionsFeatureConfigAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 UpdateGenerativeQuestionsFeatureConfigAsync(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionsFeatureConfigRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateGenerativeQuestionsFeatureConfig, null, options, request); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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.GenerativeQuestionsFeatureConfig GetGenerativeQuestionsFeatureConfig(global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetGenerativeQuestionsFeatureConfig(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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.GenerativeQuestionsFeatureConfig GetGenerativeQuestionsFeatureConfig(global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetGenerativeQuestionsFeatureConfig, null, options, request); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GetGenerativeQuestionsFeatureConfigAsync(global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetGenerativeQuestionsFeatureConfigAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Manages overal generative question feature state -- enables toggling + /// feature on and off. + /// + /// 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 GetGenerativeQuestionsFeatureConfigAsync(global::Google.Cloud.Retail.V2.GetGenerativeQuestionsFeatureConfigRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetGenerativeQuestionsFeatureConfig, null, options, request); + } + /// + /// Returns all questions for a given catalog. + /// + /// 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.ListGenerativeQuestionConfigsResponse ListGenerativeQuestionConfigs(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListGenerativeQuestionConfigs(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Returns all questions for a given catalog. + /// + /// 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.ListGenerativeQuestionConfigsResponse ListGenerativeQuestionConfigs(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListGenerativeQuestionConfigs, null, options, request); + } + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsAsync(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListGenerativeQuestionConfigsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Returns all questions for a given catalog. + /// + /// 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 ListGenerativeQuestionConfigsAsync(global::Google.Cloud.Retail.V2.ListGenerativeQuestionConfigsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListGenerativeQuestionConfigs, null, options, request); + } + /// + /// Allows management of individual questions. + /// + /// 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.GenerativeQuestionConfig UpdateGenerativeQuestionConfig(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateGenerativeQuestionConfig(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Allows management of individual questions. + /// + /// 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.GenerativeQuestionConfig UpdateGenerativeQuestionConfig(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UpdateGenerativeQuestionConfig, null, options, request); + } + /// + /// Allows management of individual questions. + /// + /// 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 UpdateGenerativeQuestionConfigAsync(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UpdateGenerativeQuestionConfigAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Allows management of individual questions. + /// + /// 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 UpdateGenerativeQuestionConfigAsync(global::Google.Cloud.Retail.V2.UpdateGenerativeQuestionConfigRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UpdateGenerativeQuestionConfig, null, options, request); + } + /// + /// Allows management of multiple questions. + /// + /// 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.BatchUpdateGenerativeQuestionConfigsResponse BatchUpdateGenerativeQuestionConfigs(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BatchUpdateGenerativeQuestionConfigs(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Allows management of multiple questions. + /// + /// 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.BatchUpdateGenerativeQuestionConfigsResponse BatchUpdateGenerativeQuestionConfigs(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_BatchUpdateGenerativeQuestionConfigs, null, options, request); + } + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsAsync(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return BatchUpdateGenerativeQuestionConfigsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Allows management of multiple questions. + /// + /// 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 BatchUpdateGenerativeQuestionConfigsAsync(global::Google.Cloud.Retail.V2.BatchUpdateGenerativeQuestionConfigsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_BatchUpdateGenerativeQuestionConfigs, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override GenerativeQuestionServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new GenerativeQuestionServiceClient(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(GenerativeQuestionServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_UpdateGenerativeQuestionsFeatureConfig, serviceImpl.UpdateGenerativeQuestionsFeatureConfig) + .AddMethod(__Method_GetGenerativeQuestionsFeatureConfig, serviceImpl.GetGenerativeQuestionsFeatureConfig) + .AddMethod(__Method_ListGenerativeQuestionConfigs, serviceImpl.ListGenerativeQuestionConfigs) + .AddMethod(__Method_UpdateGenerativeQuestionConfig, serviceImpl.UpdateGenerativeQuestionConfig) + .AddMethod(__Method_BatchUpdateGenerativeQuestionConfigs, serviceImpl.BatchUpdateGenerativeQuestionConfigs).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, GenerativeQuestionServiceBase serviceImpl) + { + serviceBinder.AddMethod(__Method_UpdateGenerativeQuestionsFeatureConfig, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateGenerativeQuestionsFeatureConfig)); + serviceBinder.AddMethod(__Method_GetGenerativeQuestionsFeatureConfig, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetGenerativeQuestionsFeatureConfig)); + serviceBinder.AddMethod(__Method_ListGenerativeQuestionConfigs, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListGenerativeQuestionConfigs)); + serviceBinder.AddMethod(__Method_UpdateGenerativeQuestionConfig, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UpdateGenerativeQuestionConfig)); + serviceBinder.AddMethod(__Method_BatchUpdateGenerativeQuestionConfigs, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.BatchUpdateGenerativeQuestionConfigs)); + } + + } +} +#endregion diff --git a/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceResourceNames.g.cs b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceResourceNames.g.cs new file mode 100644 index 000000000000..6a7227d7e1b1 --- /dev/null +++ b/apis/Google.Cloud.Retail.V2/Google.Cloud.Retail.V2/GenerativeQuestionServiceResourceNames.g.cs @@ -0,0 +1,56 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 + +namespace Google.Cloud.Retail.V2 +{ + public partial class GetGenerativeQuestionsFeatureConfigRequest + { + /// + /// -typed view over the resource name property. + /// + public CatalogName CatalogAsCatalogName + { + get => string.IsNullOrEmpty(Catalog) ? null : CatalogName.Parse(Catalog, allowUnparsed: true); + set => Catalog = value?.ToString() ?? ""; + } + } + + public partial class ListGenerativeQuestionConfigsRequest + { + /// + /// -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 BatchUpdateGenerativeQuestionConfigsRequest + { + /// + /// -typed view over the resource name property. + /// + public CatalogName ParentAsCatalogName + { + get => string.IsNullOrEmpty(Parent) ? null : CatalogName.Parse(Parent, allowUnparsed: true); + set => Parent = 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 4749c83dc11a..5be3540ac9cc 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 @@ -55,6 +55,8 @@ internal static class PackageApiMetadata yield return ControlReflection.Descriptor; yield return ControlServiceReflection.Descriptor; yield return ExportConfigReflection.Descriptor; + yield return GenerativeQuestionReflection.Descriptor; + yield return GenerativeQuestionServiceReflection.Descriptor; yield return ImportConfigReflection.Descriptor; yield return ModelReflection.Descriptor; yield return ModelServiceReflection.Descriptor; 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 5b3458862985..011646700fdc 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 @@ -666,6 +666,15 @@ public string LanguageCode { /// Default to /// [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK]. /// + /// For primary products with variants set the availability of the primary as + /// [Availability.OUT_OF_STOCK][google.cloud.retail.v2.Product.Availability.OUT_OF_STOCK] + /// and set the true availability at the variant level. This way the primary + /// product will be considered "in stock" as long as it has at least one + /// variant in stock. + /// + /// For primary products with no variants set the true availability at the + /// primary level. + /// /// Corresponding properties: Google Merchant Center property /// [availability](https://support.google.com/merchants/answer/6324448). /// Schema.org property [Offer.availability](https://schema.org/availability). @@ -990,9 +999,6 @@ public string Uri { /// * [name][google.cloud.retail.v2.Product.name] /// * [color_info][google.cloud.retail.v2.Product.color_info] /// - /// The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is - /// returned. - /// /// Note: Returning more fields in /// [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase /// response payload size and serving latency. 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 e73bd5b11d6c..9e7c0b46834c 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,130 +31,186 @@ static SearchServiceReflection() { "cm90bxojZ29vZ2xlL2Nsb3VkL3JldGFpbC92Mi9jb21tb24ucHJvdG8aJGdv", "b2dsZS9jbG91ZC9yZXRhaWwvdjIvcHJvZHVjdC5wcm90bxogZ29vZ2xlL3By", "b3RvYnVmL2ZpZWxkX21hc2sucHJvdG8aHGdvb2dsZS9wcm90b2J1Zi9zdHJ1", - "Y3QucHJvdG8ivhMKDVNlYXJjaFJlcXVlc3QSFgoJcGxhY2VtZW50GAEgASgJ", - "QgPgQQISMQoGYnJhbmNoGAIgASgJQiH6QR4KHHJldGFpbC5nb29nbGVhcGlz", - "LmNvbS9CcmFuY2gSDQoFcXVlcnkYAyABKAkSFwoKdmlzaXRvcl9pZBgEIAEo", - "CUID4EECEjMKCXVzZXJfaW5mbxgFIAEoCzIgLmdvb2dsZS5jbG91ZC5yZXRh", - "aWwudjIuVXNlckluZm8SEQoJcGFnZV9zaXplGAcgASgFEhIKCnBhZ2VfdG9r", - "ZW4YCCABKAkSDgoGb2Zmc2V0GAkgASgFEg4KBmZpbHRlchgKIAEoCRIYChBj", - "YW5vbmljYWxfZmlsdGVyGBwgASgJEhAKCG9yZGVyX2J5GAsgASgJEkQKC2Zh", - "Y2V0X3NwZWNzGAwgAygLMi8uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFy", - "Y2hSZXF1ZXN0LkZhY2V0U3BlYxJWChJkeW5hbWljX2ZhY2V0X3NwZWMYFSAB", - "KAsyNi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuRHlu", - "YW1pY0ZhY2V0U3BlY0ICGAESQwoKYm9vc3Rfc3BlYxgNIAEoCzIvLmdvb2ds", - "ZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5Cb29zdFNwZWMSVgoU", - "cXVlcnlfZXhwYW5zaW9uX3NwZWMYDiABKAsyOC5nb29nbGUuY2xvdWQucmV0", - "YWlsLnYyLlNlYXJjaFJlcXVlc3QuUXVlcnlFeHBhbnNpb25TcGVjEhsKE3Zh", - "cmlhbnRfcm9sbHVwX2tleXMYESADKAkSFwoPcGFnZV9jYXRlZ29yaWVzGBcg", - "AygJEkUKC3NlYXJjaF9tb2RlGB8gASgOMjAuZ29vZ2xlLmNsb3VkLnJldGFp", - "bC52Mi5TZWFyY2hSZXF1ZXN0LlNlYXJjaE1vZGUSVwoUcGVyc29uYWxpemF0", - "aW9uX3NwZWMYICABKAsyOS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJj", - "aFJlcXVlc3QuUGVyc29uYWxpemF0aW9uU3BlYxJBCgZsYWJlbHMYIiADKAsy", - "MS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuTGFiZWxz", - "RW50cnkSXQoVc3BlbGxfY29ycmVjdGlvbl9zcGVjGCMgASgLMjkuZ29vZ2xl", - "LmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1ZXN0LlNwZWxsQ29ycmVjdGlv", - "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==")); + "Y3QucHJvdG8iNAoVUHJvZHVjdEF0dHJpYnV0ZVZhbHVlEgwKBG5hbWUYASAB", + "KAkSDQoFdmFsdWUYAiABKAkiXAoYUHJvZHVjdEF0dHJpYnV0ZUludGVydmFs", + "EgwKBG5hbWUYASABKAkSMgoIaW50ZXJ2YWwYAiABKAsyIC5nb29nbGUuY2xv", + "dWQucmV0YWlsLnYyLkludGVydmFsIugBCgRUaWxlElAKF3Byb2R1Y3RfYXR0", + "cmlidXRlX3ZhbHVlGAEgASgLMi0uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Q", + "cm9kdWN0QXR0cmlidXRlVmFsdWVIABJWChpwcm9kdWN0X2F0dHJpYnV0ZV9p", + "bnRlcnZhbBgCIAEoCzIwLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuUHJvZHVj", + "dEF0dHJpYnV0ZUludGVydmFsSAASIQoZcmVwcmVzZW50YXRpdmVfcHJvZHVj", + "dF9pZBgDIAEoCUITChFwcm9kdWN0X2F0dHJpYnV0ZSKMGgoNU2VhcmNoUmVx", + "dWVzdBIWCglwbGFjZW1lbnQYASABKAlCA+BBAhIxCgZicmFuY2gYAiABKAlC", + "IfpBHgoccmV0YWlsLmdvb2dsZWFwaXMuY29tL0JyYW5jaBINCgVxdWVyeRgD", + "IAEoCRIXCgp2aXNpdG9yX2lkGAQgASgJQgPgQQISMwoJdXNlcl9pbmZvGAUg", + "ASgLMiAuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5Vc2VySW5mbxIRCglwYWdl", + "X3NpemUYByABKAUSEgoKcGFnZV90b2tlbhgIIAEoCRIOCgZvZmZzZXQYCSAB", + "KAUSDgoGZmlsdGVyGAogASgJEhgKEGNhbm9uaWNhbF9maWx0ZXIYHCABKAkS", + "EAoIb3JkZXJfYnkYCyABKAkSRAoLZmFjZXRfc3BlY3MYDCADKAsyLy5nb29n", + "bGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuRmFjZXRTcGVjElYK", + "EmR5bmFtaWNfZmFjZXRfc3BlYxgVIAEoCzI2Lmdvb2dsZS5jbG91ZC5yZXRh", + "aWwudjIuU2VhcmNoUmVxdWVzdC5EeW5hbWljRmFjZXRTcGVjQgIYARJDCgpi", + "b29zdF9zcGVjGA0gASgLMi8uZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFy", + "Y2hSZXF1ZXN0LkJvb3N0U3BlYxJWChRxdWVyeV9leHBhbnNpb25fc3BlYxgO", + "IAEoCzI4Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5R", + "dWVyeUV4cGFuc2lvblNwZWMSGwoTdmFyaWFudF9yb2xsdXBfa2V5cxgRIAMo", + "CRIXCg9wYWdlX2NhdGVnb3JpZXMYFyADKAkSRQoLc2VhcmNoX21vZGUYHyAB", + "KA4yMC5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuU2Vh", + "cmNoTW9kZRJXChRwZXJzb25hbGl6YXRpb25fc3BlYxggIAEoCzI5Lmdvb2ds", + "ZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5QZXJzb25hbGl6YXRp", + "b25TcGVjEkEKBmxhYmVscxgiIAMoCzIxLmdvb2dsZS5jbG91ZC5yZXRhaWwu", + "djIuU2VhcmNoUmVxdWVzdC5MYWJlbHNFbnRyeRJdChVzcGVsbF9jb3JyZWN0", + "aW9uX3NwZWMYIyABKAsyOS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJj", + "aFJlcXVlc3QuU3BlbGxDb3JyZWN0aW9uU3BlY0gAiAEBEg4KBmVudGl0eRgm", + "IAEoCRJnChpjb252ZXJzYXRpb25hbF9zZWFyY2hfc3BlYxgoIAEoCzI+Lmdv", + "b2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5Db252ZXJzYXRp", + "b25hbFNlYXJjaFNwZWNCA+BBARJbChR0aWxlX25hdmlnYXRpb25fc3BlYxgp", + "IAEoCzI4Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVzdC5U", + "aWxlTmF2aWdhdGlvblNwZWNCA+BBARqRAwoJRmFjZXRTcGVjElAKCWZhY2V0", + "X2tleRgBIAEoCzI4Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVx", + "dWVzdC5GYWNldFNwZWMuRmFjZXRLZXlCA+BBAhINCgVsaW1pdBgCIAEoBRIc", + "ChRleGNsdWRlZF9maWx0ZXJfa2V5cxgDIAMoCRIfChdlbmFibGVfZHluYW1p", + "Y19wb3NpdGlvbhgEIAEoCBrjAQoIRmFjZXRLZXkSEAoDa2V5GAEgASgJQgPg", + "QQISMwoJaW50ZXJ2YWxzGAIgAygLMiAuZ29vZ2xlLmNsb3VkLnJldGFpbC52", + "Mi5JbnRlcnZhbBIZChFyZXN0cmljdGVkX3ZhbHVlcxgDIAMoCRIQCghwcmVm", + "aXhlcxgIIAMoCRIQCghjb250YWlucxgJIAMoCRIYChBjYXNlX2luc2Vuc2l0", + "aXZlGAogASgIEhAKCG9yZGVyX2J5GAQgASgJEg0KBXF1ZXJ5GAUgASgJEhYK", + "DnJldHVybl9taW5fbWF4GAsgASgIGpYBChBEeW5hbWljRmFjZXRTcGVjEkkK", + "BG1vZGUYASABKA4yOy5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJl", + "cXVlc3QuRHluYW1pY0ZhY2V0U3BlYy5Nb2RlIjcKBE1vZGUSFAoQTU9ERV9V", + "TlNQRUNJRklFRBAAEgwKCERJU0FCTEVEEAESCwoHRU5BQkxFRBACGu4BCglC", + "b29zdFNwZWMSYQoVY29uZGl0aW9uX2Jvb3N0X3NwZWNzGAEgAygLMkIuZ29v", + "Z2xlLmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXF1ZXN0LkJvb3N0U3BlYy5D", + "b25kaXRpb25Cb29zdFNwZWMSJwoac2tpcF9ib29zdF9zcGVjX3ZhbGlkYXRp", + "b24YAiABKAhIAIgBARo2ChJDb25kaXRpb25Cb29zdFNwZWMSEQoJY29uZGl0", + "aW9uGAEgASgJEg0KBWJvb3N0GAIgASgCQh0KG19za2lwX2Jvb3N0X3NwZWNf", + "dmFsaWRhdGlvbhrLAQoSUXVlcnlFeHBhbnNpb25TcGVjElUKCWNvbmRpdGlv", + "bhgBIAEoDjJCLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVxdWVz", + "dC5RdWVyeUV4cGFuc2lvblNwZWMuQ29uZGl0aW9uEh4KFnBpbl91bmV4cGFu", + "ZGVkX3Jlc3VsdHMYAiABKAgiPgoJQ29uZGl0aW9uEhkKFUNPTkRJVElPTl9V", + "TlNQRUNJRklFRBAAEgwKCERJU0FCTEVEEAESCAoEQVVUTxADGpkBChNQZXJz", + "b25hbGl6YXRpb25TcGVjEkwKBG1vZGUYASABKA4yPi5nb29nbGUuY2xvdWQu", + "cmV0YWlsLnYyLlNlYXJjaFJlcXVlc3QuUGVyc29uYWxpemF0aW9uU3BlYy5N", + "b2RlIjQKBE1vZGUSFAoQTU9ERV9VTlNQRUNJRklFRBAAEggKBEFVVE8QARIM", + "CghESVNBQkxFRBACGqABChNTcGVsbENvcnJlY3Rpb25TcGVjEkwKBG1vZGUY", + "ASABKA4yPi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlcXVlc3Qu", + "U3BlbGxDb3JyZWN0aW9uU3BlYy5Nb2RlIjsKBE1vZGUSFAoQTU9ERV9VTlNQ", + "RUNJRklFRBAAEhMKD1NVR0dFU1RJT05fT05MWRABEggKBEFVVE8QAhqXBAoY", + "Q29udmVyc2F0aW9uYWxTZWFyY2hTcGVjEicKH2ZvbGxvd3VwX2NvbnZlcnNh", + "dGlvbl9yZXF1ZXN0ZWQYASABKAgSFwoPY29udmVyc2F0aW9uX2lkGAIgASgJ", + "El4KC3VzZXJfYW5zd2VyGAMgASgLMkkuZ29vZ2xlLmNsb3VkLnJldGFpbC52", + "Mi5TZWFyY2hSZXF1ZXN0LkNvbnZlcnNhdGlvbmFsU2VhcmNoU3BlYy5Vc2Vy", + "QW5zd2VyGtgCCgpVc2VyQW5zd2VyEhUKC3RleHRfYW5zd2VyGAEgASgJSAAS", + "cwoPc2VsZWN0ZWRfYW5zd2VyGAIgASgLMlguZ29vZ2xlLmNsb3VkLnJldGFp", + "bC52Mi5TZWFyY2hSZXF1ZXN0LkNvbnZlcnNhdGlvbmFsU2VhcmNoU3BlYy5V", + "c2VyQW5zd2VyLlNlbGVjdGVkQW5zd2VySAAatQEKDlNlbGVjdGVkQW5zd2Vy", + "ElMKGHByb2R1Y3RfYXR0cmlidXRlX3ZhbHVlcxgBIAMoCzItLmdvb2dsZS5j", + "bG91ZC5yZXRhaWwudjIuUHJvZHVjdEF0dHJpYnV0ZVZhbHVlQgIYARJOChdw", + "cm9kdWN0X2F0dHJpYnV0ZV92YWx1ZRgCIAEoCzItLmdvb2dsZS5jbG91ZC5y", + "ZXRhaWwudjIuUHJvZHVjdEF0dHJpYnV0ZVZhbHVlQgYKBHR5cGUabAoSVGls", + "ZU5hdmlnYXRpb25TcGVjEiEKGXRpbGVfbmF2aWdhdGlvbl9yZXF1ZXN0ZWQY", + "ASABKAgSMwoNYXBwbGllZF90aWxlcxgCIAMoCzIcLmdvb2dsZS5jbG91ZC5y", + "ZXRhaWwudjIuVGlsZRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoF", + "dmFsdWUYAiABKAk6AjgBIlsKClNlYXJjaE1vZGUSGwoXU0VBUkNIX01PREVf", + "VU5TUEVDSUZJRUQQABIXChNQUk9EVUNUX1NFQVJDSF9PTkxZEAESFwoTRkFD", + "RVRFRF9TRUFSQ0hfT05MWRACQhgKFl9zcGVsbF9jb3JyZWN0aW9uX3NwZWMi", + "pxIKDlNlYXJjaFJlc3BvbnNlEkQKB3Jlc3VsdHMYASADKAsyMy5nb29nbGUu", + "Y2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNlLlNlYXJjaFJlc3VsdBI8", + "CgZmYWNldHMYAiADKAsyLC5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJj", + "aFJlc3BvbnNlLkZhY2V0EhIKCnRvdGFsX3NpemUYAyABKAUSFwoPY29ycmVj", + "dGVkX3F1ZXJ5GAQgASgJEhkKEWF0dHJpYnV0aW9uX3Rva2VuGAUgASgJEhcK", + "D25leHRfcGFnZV90b2tlbhgGIAEoCRJXChRxdWVyeV9leHBhbnNpb25faW5m", + "bxgHIAEoCzI5Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVzcG9u", + "c2UuUXVlcnlFeHBhbnNpb25JbmZvEhQKDHJlZGlyZWN0X3VyaRgKIAEoCRIY", + "ChBhcHBsaWVkX2NvbnRyb2xzGAwgAygJEmkKHWludmFsaWRfY29uZGl0aW9u", + "X2Jvb3N0X3NwZWNzGA4gAygLMkIuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5T", + "ZWFyY2hSZXF1ZXN0LkJvb3N0U3BlYy5Db25kaXRpb25Cb29zdFNwZWMSPwoP", + "ZXhwZXJpbWVudF9pbmZvGBEgAygLMiYuZ29vZ2xlLmNsb3VkLnJldGFpbC52", + "Mi5FeHBlcmltZW50SW5mbxJnChxjb252ZXJzYXRpb25hbF9zZWFyY2hfcmVz", + "dWx0GBIgASgLMkEuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5TZWFyY2hSZXNw", + "b25zZS5Db252ZXJzYXRpb25hbFNlYXJjaFJlc3VsdBJbChZ0aWxlX25hdmln", + "YXRpb25fcmVzdWx0GBMgASgLMjsuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5T", + "ZWFyY2hSZXNwb25zZS5UaWxlTmF2aWdhdGlvblJlc3VsdBqRBAoMU2VhcmNo", + "UmVzdWx0EgoKAmlkGAEgASgJEjAKB3Byb2R1Y3QYAiABKAsyHy5nb29nbGUu", + "Y2xvdWQucmV0YWlsLnYyLlByb2R1Y3QSHgoWbWF0Y2hpbmdfdmFyaWFudF9j", + "b3VudBgDIAEoBRJvChdtYXRjaGluZ192YXJpYW50X2ZpZWxkcxgEIAMoCzJO", + "Lmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNoUmVzcG9uc2UuU2VhcmNo", + "UmVzdWx0Lk1hdGNoaW5nVmFyaWFudEZpZWxkc0VudHJ5EmsKFXZhcmlhbnRf", + "cm9sbHVwX3ZhbHVlcxgFIAMoCzJMLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIu", + "U2VhcmNoUmVzcG9uc2UuU2VhcmNoUmVzdWx0LlZhcmlhbnRSb2xsdXBWYWx1", + "ZXNFbnRyeRIXCg9wZXJzb25hbF9sYWJlbHMYByADKAkaWAoaTWF0Y2hpbmdW", + "YXJpYW50RmllbGRzRW50cnkSCwoDa2V5GAEgASgJEikKBXZhbHVlGAIgASgL", + "MhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzazoCOAEaUgoYVmFyaWFudFJv", + "bGx1cFZhbHVlc0VudHJ5EgsKA2tleRgBIAEoCRIlCgV2YWx1ZRgCIAEoCzIW", + "Lmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToCOAEajgIKBUZhY2V0EgsKA2tleRgB", + "IAEoCRJHCgZ2YWx1ZXMYAiADKAsyNy5nb29nbGUuY2xvdWQucmV0YWlsLnYy", + "LlNlYXJjaFJlc3BvbnNlLkZhY2V0LkZhY2V0VmFsdWUSFQoNZHluYW1pY19m", + "YWNldBgDIAEoCBqXAQoKRmFjZXRWYWx1ZRIPCgV2YWx1ZRgBIAEoCUgAEjQK", + "CGludGVydmFsGAIgASgLMiAuZ29vZ2xlLmNsb3VkLnJldGFpbC52Mi5JbnRl", + "cnZhbEgAEg0KBWNvdW50GAMgASgDEhEKCW1pbl92YWx1ZRgFIAEoARIRCglt", + "YXhfdmFsdWUYBiABKAFCDQoLZmFjZXRfdmFsdWUaSQoSUXVlcnlFeHBhbnNp", + "b25JbmZvEhYKDmV4cGFuZGVkX3F1ZXJ5GAEgASgIEhsKE3Bpbm5lZF9yZXN1", + "bHRfY291bnQYAiABKAMa/wQKGkNvbnZlcnNhdGlvbmFsU2VhcmNoUmVzdWx0", + "EhcKD2NvbnZlcnNhdGlvbl9pZBgBIAEoCRIVCg1yZWZpbmVkX3F1ZXJ5GAIg", + "ASgJEnIKEmFkZGl0aW9uYWxfZmlsdGVycxgDIAMoCzJSLmdvb2dsZS5jbG91", + "ZC5yZXRhaWwudjIuU2VhcmNoUmVzcG9uc2UuQ29udmVyc2F0aW9uYWxTZWFy", + "Y2hSZXN1bHQuQWRkaXRpb25hbEZpbHRlckICGAESGQoRZm9sbG93dXBfcXVl", + "c3Rpb24YBCABKAkSbAoRc3VnZ2VzdGVkX2Fuc3dlcnMYBSADKAsyUS5nb29n", + "bGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNlLkNvbnZlcnNhdGlv", + "bmFsU2VhcmNoUmVzdWx0LlN1Z2dlc3RlZEFuc3dlchJtChFhZGRpdGlvbmFs", + "X2ZpbHRlchgGIAEoCzJSLmdvb2dsZS5jbG91ZC5yZXRhaWwudjIuU2VhcmNo", + "UmVzcG9uc2UuQ29udmVyc2F0aW9uYWxTZWFyY2hSZXN1bHQuQWRkaXRpb25h", + "bEZpbHRlchphCg9TdWdnZXN0ZWRBbnN3ZXISTgoXcHJvZHVjdF9hdHRyaWJ1", + "dGVfdmFsdWUYASABKAsyLS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlByb2R1", + "Y3RBdHRyaWJ1dGVWYWx1ZRpiChBBZGRpdGlvbmFsRmlsdGVyEk4KF3Byb2R1", + "Y3RfYXR0cmlidXRlX3ZhbHVlGAEgASgLMi0uZ29vZ2xlLmNsb3VkLnJldGFp", + "bC52Mi5Qcm9kdWN0QXR0cmlidXRlVmFsdWUaQwoUVGlsZU5hdmlnYXRpb25S", + "ZXN1bHQSKwoFdGlsZXMYASADKAsyHC5nb29nbGUuY2xvdWQucmV0YWlsLnYy", + "LlRpbGUi+wIKDkV4cGVyaW1lbnRJbmZvEmMKGXNlcnZpbmdfY29uZmlnX2V4", + "cGVyaW1lbnQYAiABKAsyPi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLkV4cGVy", + "aW1lbnRJbmZvLlNlcnZpbmdDb25maWdFeHBlcmltZW50SAASOQoKZXhwZXJp", + "bWVudBgBIAEoCUIl+kEiCiByZXRhaWwuZ29vZ2xlYXBpcy5jb20vRXhwZXJp", + "bWVudBqxAQoXU2VydmluZ0NvbmZpZ0V4cGVyaW1lbnQSSQoXb3JpZ2luYWxf", + "c2VydmluZ19jb25maWcYASABKAlCKPpBJQojcmV0YWlsLmdvb2dsZWFwaXMu", + "Y29tL1NlcnZpbmdDb25maWcSSwoZZXhwZXJpbWVudF9zZXJ2aW5nX2NvbmZp", + "ZxgCIAEoCUIo+kElCiNyZXRhaWwuZ29vZ2xlYXBpcy5jb20vU2VydmluZ0Nv", + "bmZpZ0IVChNleHBlcmltZW50X21ldGFkYXRhMtgCCg1TZWFyY2hTZXJ2aWNl", + "EvsBCgZTZWFyY2gSJS5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJl", + "cXVlc3QaJi5nb29nbGUuY2xvdWQucmV0YWlsLnYyLlNlYXJjaFJlc3BvbnNl", + "IqEBgtPkkwKaASJFL3YyL3twbGFjZW1lbnQ9cHJvamVjdHMvKi9sb2NhdGlv", + "bnMvKi9jYXRhbG9ncy8qL3BsYWNlbWVudHMvKn06c2VhcmNoOgEqWk4iSS92", + "Mi97cGxhY2VtZW50PXByb2plY3RzLyovbG9jYXRpb25zLyovY2F0YWxvZ3Mv", + "Ki9zZXJ2aW5nQ29uZmlncy8qfTpzZWFyY2g6ASoaScpBFXJldGFpbC5nb29n", + "bGVhcGlzLmNvbdJBLmh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgv", + "Y2xvdWQtcGxhdGZvcm1CtwIKGmNvbS5nb29nbGUuY2xvdWQucmV0YWlsLnYy", + "QhJTZWFyY2hTZXJ2aWNlUHJvdG9QAVoyY2xvdWQuZ29vZ2xlLmNvbS9nby9y", + "ZXRhaWwvYXBpdjIvcmV0YWlscGI7cmV0YWlscGKiAgZSRVRBSUyqAhZHb29n", + "bGUuQ2xvdWQuUmV0YWlsLlYyygIWR29vZ2xlXENsb3VkXFJldGFpbFxWMuoC", + "GUdvb2dsZTo6Q2xvdWQ6OlJldGFpbDo6VjLqQXcKIHJldGFpbC5nb29nbGVh", + "cGlzLmNvbS9FeHBlcmltZW50ElNwcm9qZWN0cy97cHJvamVjdH0vbG9jYXRp", + "b25zL3tsb2NhdGlvbn0vY2F0YWxvZ3Mve2NhdGFsb2d9L2V4cGVyaW1lbnRz", + "L3tleHBlcmltZW50fWIGcHJvdG8z")); 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", "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.ProductAttributeValue), global::Google.Cloud.Retail.V2.ProductAttributeValue.Parser, new[]{ "Name", "Value" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.ProductAttributeInterval), global::Google.Cloud.Retail.V2.ProductAttributeInterval.Parser, new[]{ "Name", "Interval" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.Tile), global::Google.Cloud.Retail.V2.Tile.Parser, new[]{ "ProductAttributeValue", "ProductAttributeInterval", "RepresentativeProductId" }, new[]{ "ProductAttribute" }, 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", "ConversationalSearchSpec", "TileNavigationSpec" }, 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), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Parser, new[]{ "FollowupConversationRequested", "ConversationId", "UserAnswer" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer), global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Parser, new[]{ "TextAnswer", "SelectedAnswer" }, new[]{ "Type" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer), global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer.Parser, new[]{ "ProductAttributeValues", "ProductAttributeValue" }, null, null, null, null)})}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec), global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec.Parser, new[]{ "TileNavigationRequested", "AppliedTiles" }, null, null, 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", "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), global::Google.Cloud.Retail.V2.SearchResponse.Parser, new[]{ "Results", "Facets", "TotalSize", "CorrectedQuery", "AttributionToken", "NextPageToken", "QueryExpansionInfo", "RedirectUri", "AppliedControls", "InvalidConditionBoostSpecs", "ExperimentInfo", "ConversationalSearchResult", "TileNavigationResult" }, 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.SearchResponse.Types.ConversationalSearchResult), global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Parser, new[]{ "ConversationId", "RefinedQuery", "AdditionalFilters", "FollowupQuestion", "SuggestedAnswers", "AdditionalFilter" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.SuggestedAnswer), global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.SuggestedAnswer.Parser, new[]{ "ProductAttributeValue" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter), global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter.Parser, new[]{ "ProductAttributeValue" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult), global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult.Parser, new[]{ "Tiles" }, 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)}) })); } @@ -163,20 +219,21 @@ static SearchServiceReflection() { } #region Messages /// - /// Request message for - /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] method. + /// Product attribute which structured by an attribute name and value. This + /// structure is used in conversational search filters and answers. For example, + /// if we have `name=color` and `value=red`, this means that the color is `red`. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class SearchRequest : pb::IMessage + public sealed partial class ProductAttributeValue : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SearchRequest()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ProductAttributeValue()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -192,7 +249,7 @@ public sealed partial class SearchRequest : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchRequest() { + public ProductAttributeValue() { OnConstruction(); } @@ -200,596 +257,301 @@ public SearchRequest() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchRequest(SearchRequest other) : this() { - placement_ = other.placement_; - branch_ = other.branch_; - query_ = other.query_; - visitorId_ = other.visitorId_; - userInfo_ = other.userInfo_ != null ? other.userInfo_.Clone() : null; - pageSize_ = other.pageSize_; - pageToken_ = other.pageToken_; - offset_ = other.offset_; - filter_ = other.filter_; - canonicalFilter_ = other.canonicalFilter_; - orderBy_ = other.orderBy_; - facetSpecs_ = other.facetSpecs_.Clone(); - dynamicFacetSpec_ = other.dynamicFacetSpec_ != null ? other.dynamicFacetSpec_.Clone() : null; - boostSpec_ = other.boostSpec_ != null ? other.boostSpec_.Clone() : null; - queryExpansionSpec_ = other.queryExpansionSpec_ != null ? other.queryExpansionSpec_.Clone() : null; - variantRollupKeys_ = other.variantRollupKeys_.Clone(); - pageCategories_ = other.pageCategories_.Clone(); - searchMode_ = other.searchMode_; - personalizationSpec_ = other.personalizationSpec_ != null ? other.personalizationSpec_.Clone() : null; - labels_ = other.labels_.Clone(); - spellCorrectionSpec_ = other.spellCorrectionSpec_ != null ? other.spellCorrectionSpec_.Clone() : null; - entity_ = other.entity_; + public ProductAttributeValue(ProductAttributeValue other) : this() { + name_ = other.name_; + value_ = other.value_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchRequest Clone() { - return new SearchRequest(this); + public ProductAttributeValue Clone() { + return new ProductAttributeValue(this); } - /// Field number for the "placement" field. - public const int PlacementFieldNumber = 1; - private string placement_ = ""; + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; /// - /// Required. The resource name of the Retail Search serving config, such as - /// `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` - /// or the name of the legacy placement resource, such as - /// `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. - /// This field is used to identify the serving config name and the set - /// of models that are used to make the search. + /// The attribute name. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Placement { - get { return placement_; } + public string Name { + get { return name_; } set { - placement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "branch" field. - public const int BranchFieldNumber = 2; - private string branch_ = ""; + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private string value_ = ""; /// - /// The branch resource name, such as - /// `projects/*/locations/global/catalogs/default_catalog/branches/0`. - /// - /// Use "default_branch" as the branch ID or leave this field empty, to search - /// products under the default branch. + /// The attribute value. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Branch { - get { return branch_; } + public string Value { + get { return value_; } set { - branch_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "query" field. - public const int QueryFieldNumber = 3; - private string query_ = ""; - /// - /// Raw search query. - /// - /// If this field is empty, the request is considered a category browsing - /// request and returned results are based on - /// [filter][google.cloud.retail.v2.SearchRequest.filter] and - /// [page_categories][google.cloud.retail.v2.SearchRequest.page_categories]. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Query { - get { return query_; } - set { - query_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + public override bool Equals(object other) { + return Equals(other as ProductAttributeValue); } - /// Field number for the "visitor_id" field. - public const int VisitorIdFieldNumber = 4; - private string visitorId_ = ""; - /// - /// Required. A unique identifier for tracking visitors. For example, this - /// could be implemented with an HTTP cookie, which should be able to uniquely - /// identify a visitor on a single device. This unique identifier should not - /// change if the visitor logs in or out of the website. - /// - /// This should be the same identifier as - /// [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id]. - /// - /// The field must be a UTF-8 encoded string with a length limit of 128 - /// characters. Otherwise, an INVALID_ARGUMENT error is returned. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string VisitorId { - get { return visitorId_; } - set { - visitorId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + public bool Equals(ProductAttributeValue other) { + if (ReferenceEquals(other, null)) { + return false; } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); } - /// Field number for the "user_info" field. - public const int UserInfoFieldNumber = 5; - private global::Google.Cloud.Retail.V2.UserInfo userInfo_; - /// - /// User information. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.UserInfo UserInfo { - get { return userInfo_; } - set { - userInfo_ = value; + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } + return hash; } - /// Field number for the "page_size" field. - public const int PageSizeFieldNumber = 7; - private int pageSize_; - /// - /// Maximum number of [Product][google.cloud.retail.v2.Product]s to return. If - /// unspecified, defaults to a reasonable value. The maximum allowed value is - /// 120. Values above 120 will be coerced to 120. - /// - /// If this field is negative, an INVALID_ARGUMENT is returned. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int PageSize { - get { return pageSize_; } - set { - pageSize_ = value; - } + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); } - /// Field number for the "page_token" field. - public const int PageTokenFieldNumber = 8; - private string pageToken_ = ""; - /// - /// A page token - /// [SearchResponse.next_page_token][google.cloud.retail.v2.SearchResponse.next_page_token], - /// received from a previous - /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] call. - /// Provide this to retrieve the subsequent page. - /// - /// When paginating, all other parameters provided to - /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] must - /// match the call that provided the page token. Otherwise, an INVALID_ARGUMENT - /// error is returned. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string PageToken { - get { return pageToken_; } - set { - pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + 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 (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif } - /// Field number for the "offset" field. - public const int OffsetFieldNumber = 9; - private int offset_; - /// - /// A 0-indexed integer that specifies the current offset (that is, starting - /// result location, amongst the [Product][google.cloud.retail.v2.Product]s - /// deemed by the API as relevant) in search results. This field is only - /// considered if [page_token][google.cloud.retail.v2.SearchRequest.page_token] - /// is unset. - /// - /// If this field is negative, an INVALID_ARGUMENT is returned. - /// + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Offset { - get { return offset_; } - set { - offset_ = value; + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } } + #endif - /// Field number for the "filter" field. - public const int FilterFieldNumber = 10; - private string filter_ = ""; - /// - /// The filter syntax consists of an expression language for constructing a - /// predicate from one or more fields of the products being filtered. Filter - /// expression is case-sensitive. For more information, see - /// [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). - /// - /// If this field is unrecognizable, an INVALID_ARGUMENT is returned. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Filter { - get { return filter_; } - set { - filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; } - /// Field number for the "canonical_filter" field. - public const int CanonicalFilterFieldNumber = 28; - private string canonicalFilter_ = ""; - /// - /// The default filter that is applied when a user performs a search without - /// checking any filters on the search page. - /// - /// The filter applied to every search request when quality improvement such as - /// query expansion is needed. In the case a query does not have a sufficient - /// amount of results this filter will be used to determine whether or not to - /// enable the query expansion flow. The original filter will still be used for - /// the query expanded search. - /// This field is strongly recommended to achieve high search quality. - /// - /// For more information about filter syntax, see - /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string CanonicalFilter { - get { return canonicalFilter_; } - set { - canonicalFilter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + public void MergeFrom(ProductAttributeValue other) { + if (other == null) { + return; } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } - /// Field number for the "order_by" field. - public const int OrderByFieldNumber = 11; - private string orderBy_ = ""; - /// - /// The order in which products are returned. Products can be ordered by - /// a field in an [Product][google.cloud.retail.v2.Product] object. Leave it - /// unset if ordered by relevance. OrderBy expression is case-sensitive. For - /// more information, see - /// [Order](https://cloud.google.com/retail/docs/filter-and-order#order). - /// - /// If this field is unrecognizable, an INVALID_ARGUMENT is returned. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string OrderBy { - get { return orderBy_; } - set { - orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "facet_specs" field. - public const int FacetSpecsFieldNumber = 12; - private static readonly pb::FieldCodec _repeated_facetSpecs_codec - = pb::FieldCodec.ForMessage(98, global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Parser); - private readonly pbc::RepeatedField facetSpecs_ = new pbc::RepeatedField(); - /// - /// Facet specifications for faceted search. If empty, no facets are returned. - /// - /// A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error - /// is returned. - /// + 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: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField FacetSpecs { - get { return facetSpecs_; } + 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: { + Value = input.ReadString(); + break; + } + } + } } + #endif - /// Field number for the "dynamic_facet_spec" field. - public const int DynamicFacetSpecFieldNumber = 21; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec dynamicFacetSpec_; - /// - /// Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic - /// to enable dynamic facets. Do not set this field. - /// - /// The specification for dynamically generated facets. Notice that only - /// textual facets can be dynamically generated. - /// - [global::System.ObsoleteAttribute] + } + + /// + /// Product attribute name and numeric interval. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ProductAttributeInterval : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ProductAttributeInterval()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec DynamicFacetSpec { - get { return dynamicFacetSpec_; } - set { - dynamicFacetSpec_ = value; - } + 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[1]; } } - /// Field number for the "boost_spec" field. - public const int BoostSpecFieldNumber = 13; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec boostSpec_; - /// - /// Boost specification to boost certain products. For more information, see - /// [Boost results](https://cloud.google.com/retail/docs/boosting). - /// - /// Notice that if both - /// [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids] - /// and - /// [SearchRequest.boost_spec][google.cloud.retail.v2.SearchRequest.boost_spec] - /// are set, the boost conditions from both places are evaluated. If a search - /// request matches multiple boost conditions, the final boost score is equal - /// to the sum of the boost scores from all matched boost conditions. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec BoostSpec { - get { return boostSpec_; } - set { - boostSpec_ = value; - } + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "query_expansion_spec" field. - public const int QueryExpansionSpecFieldNumber = 14; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec queryExpansionSpec_; - /// - /// The query expansion specification that specifies the conditions under which - /// query expansion occurs. For more information, see [Query - /// expansion](https://cloud.google.com/retail/docs/result-size#query_expansion). - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec QueryExpansionSpec { - get { return queryExpansionSpec_; } - set { - queryExpansionSpec_ = value; - } + public ProductAttributeInterval() { + OnConstruction(); } - /// Field number for the "variant_rollup_keys" field. - public const int VariantRollupKeysFieldNumber = 17; - private static readonly pb::FieldCodec _repeated_variantRollupKeys_codec - = pb::FieldCodec.ForString(138); - private readonly pbc::RepeatedField variantRollupKeys_ = new pbc::RepeatedField(); - /// - /// The keys to fetch and rollup the matching - /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] - /// [Product][google.cloud.retail.v2.Product]s attributes, - /// [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo] or - /// [LocalInventory][google.cloud.retail.v2.LocalInventory]s attributes. The - /// attributes from all the matching - /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] - /// [Product][google.cloud.retail.v2.Product]s or - /// [LocalInventory][google.cloud.retail.v2.LocalInventory]s are merged and - /// de-duplicated. Notice that rollup attributes will lead to extra query - /// latency. Maximum number of keys is 30. - /// - /// For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], a - /// fulfillment type and a fulfillment ID must be provided in the format of - /// "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123", - /// "pickupInStore" is fulfillment type and "store123" is the store ID. - /// - /// Supported keys are: - /// - /// * colorFamilies - /// * price - /// * originalPrice - /// * discount - /// * variantId - /// * inventory(place_id,price) - /// * inventory(place_id,original_price) - /// * inventory(place_id,attributes.key), where key is any key in the - /// [Product.local_inventories.attributes][google.cloud.retail.v2.LocalInventory.attributes] - /// map. - /// * attributes.key, where key is any key in the - /// [Product.attributes][google.cloud.retail.v2.Product.attributes] map. - /// * pickupInStore.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "pickup-in-store". - /// * shipToStore.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "ship-to-store". - /// * sameDayDelivery.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "same-day-delivery". - /// * nextDayDelivery.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "next-day-delivery". - /// * customFulfillment1.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "custom-type-1". - /// * customFulfillment2.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "custom-type-2". - /// * customFulfillment3.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "custom-type-3". - /// * customFulfillment4.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "custom-type-4". - /// * customFulfillment5.id, where id is any - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] - /// "custom-type-5". - /// - /// If this field is set to an invalid value other than these, an - /// INVALID_ARGUMENT error is returned. - /// + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField VariantRollupKeys { - get { return variantRollupKeys_; } + public ProductAttributeInterval(ProductAttributeInterval other) : this() { + name_ = other.name_; + interval_ = other.interval_ != null ? other.interval_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "page_categories" field. - public const int PageCategoriesFieldNumber = 23; - private static readonly pb::FieldCodec _repeated_pageCategories_codec - = pb::FieldCodec.ForString(186); - private readonly pbc::RepeatedField pageCategories_ = new pbc::RepeatedField(); - /// - /// The categories associated with a category page. Must be set for category - /// navigation queries to achieve good search quality. The format should be - /// the same as - /// [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories]; - /// - /// To represent full path of category, use '>' sign to separate different - /// hierarchies. If '>' is part of the category name, replace it with - /// other character(s). - /// - /// Category pages include special pages such as sales or promotions. For - /// instance, a special sale page may have the category hierarchy: - /// "pageCategories" : ["Sales > 2017 Black Friday Deals"]. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField PageCategories { - get { return pageCategories_; } + public ProductAttributeInterval Clone() { + return new ProductAttributeInterval(this); } - /// Field number for the "search_mode" field. - public const int SearchModeFieldNumber = 31; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode searchMode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified; + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; /// - /// The search mode of the search request. If not specified, a single search - /// request triggers both product search and faceted search. + /// The attribute name (e.g. "length") /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode SearchMode { - get { return searchMode_; } + public string Name { + get { return name_; } set { - searchMode_ = value; + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "personalization_spec" field. - public const int PersonalizationSpecFieldNumber = 32; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec personalizationSpec_; + /// Field number for the "interval" field. + public const int IntervalFieldNumber = 2; + private global::Google.Cloud.Retail.V2.Interval interval_; /// - /// The specification for personalization. - /// - /// Notice that if both - /// [ServingConfig.personalization_spec][google.cloud.retail.v2.ServingConfig.personalization_spec] - /// and - /// [SearchRequest.personalization_spec][google.cloud.retail.v2.SearchRequest.personalization_spec] - /// are set. - /// [SearchRequest.personalization_spec][google.cloud.retail.v2.SearchRequest.personalization_spec] - /// will override - /// [ServingConfig.personalization_spec][google.cloud.retail.v2.ServingConfig.personalization_spec]. + /// The numeric interval (e.g. [10, 20)) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec PersonalizationSpec { - get { return personalizationSpec_; } + public global::Google.Cloud.Retail.V2.Interval Interval { + get { return interval_; } set { - personalizationSpec_ = value; - } - } - - /// Field number for the "labels" field. - public const int LabelsFieldNumber = 34; - private static readonly pbc::MapField.Codec _map_labels_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 274); - private readonly pbc::MapField labels_ = new pbc::MapField(); - /// - /// The labels applied to a resource must meet the following requirements: - /// - /// * Each resource can have multiple labels, up to a maximum of 64. - /// * Each label must be a key-value pair. - /// * Keys have a minimum length of 1 character and a maximum length of 63 - /// characters and cannot be empty. Values can be empty and have a maximum - /// length of 63 characters. - /// * Keys and values can contain only lowercase letters, numeric characters, - /// underscores, and dashes. All characters must use UTF-8 encoding, and - /// international characters are allowed. - /// * The key portion of a label must be unique. However, you can use the same - /// key with multiple resources. - /// * Keys must start with a lowercase letter or international character. - /// - /// For more information, see [Requirements for - /// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - /// in the Resource Manager documentation. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::MapField Labels { - get { return labels_; } - } - - /// Field number for the "spell_correction_spec" field. - public const int SpellCorrectionSpecFieldNumber = 35; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec spellCorrectionSpec_; - /// - /// The spell correction specification that specifies the mode under - /// which spell correction will take effect. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec SpellCorrectionSpec { - get { return spellCorrectionSpec_; } - set { - spellCorrectionSpec_ = value; - } - } - - /// 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"); + interval_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SearchRequest); + return Equals(other as ProductAttributeInterval); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(SearchRequest other) { + public bool Equals(ProductAttributeInterval other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Placement != other.Placement) return false; - if (Branch != other.Branch) return false; - if (Query != other.Query) return false; - if (VisitorId != other.VisitorId) return false; - if (!object.Equals(UserInfo, other.UserInfo)) return false; - if (PageSize != other.PageSize) return false; - if (PageToken != other.PageToken) return false; - if (Offset != other.Offset) return false; - if (Filter != other.Filter) return false; - if (CanonicalFilter != other.CanonicalFilter) return false; - if (OrderBy != other.OrderBy) return false; - if(!facetSpecs_.Equals(other.facetSpecs_)) return false; - if (!object.Equals(DynamicFacetSpec, other.DynamicFacetSpec)) return false; - if (!object.Equals(BoostSpec, other.BoostSpec)) return false; - if (!object.Equals(QueryExpansionSpec, other.QueryExpansionSpec)) return false; - if(!variantRollupKeys_.Equals(other.variantRollupKeys_)) return false; - if(!pageCategories_.Equals(other.pageCategories_)) return false; - if (SearchMode != other.SearchMode) return false; - 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; + if (Name != other.Name) return false; + if (!object.Equals(Interval, other.Interval)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -797,28 +559,8 @@ public bool Equals(SearchRequest other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Placement.Length != 0) hash ^= Placement.GetHashCode(); - if (Branch.Length != 0) hash ^= Branch.GetHashCode(); - if (Query.Length != 0) hash ^= Query.GetHashCode(); - if (VisitorId.Length != 0) hash ^= VisitorId.GetHashCode(); - if (userInfo_ != null) hash ^= UserInfo.GetHashCode(); - if (PageSize != 0) hash ^= PageSize.GetHashCode(); - if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); - if (Offset != 0) hash ^= Offset.GetHashCode(); - if (Filter.Length != 0) hash ^= Filter.GetHashCode(); - if (CanonicalFilter.Length != 0) hash ^= CanonicalFilter.GetHashCode(); - if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); - hash ^= facetSpecs_.GetHashCode(); - if (dynamicFacetSpec_ != null) hash ^= DynamicFacetSpec.GetHashCode(); - if (boostSpec_ != null) hash ^= BoostSpec.GetHashCode(); - if (queryExpansionSpec_ != null) hash ^= QueryExpansionSpec.GetHashCode(); - hash ^= variantRollupKeys_.GetHashCode(); - hash ^= pageCategories_.GetHashCode(); - if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) hash ^= SearchMode.GetHashCode(); - if (personalizationSpec_ != null) hash ^= PersonalizationSpec.GetHashCode(); - hash ^= Labels.GetHashCode(); - if (spellCorrectionSpec_ != null) hash ^= SpellCorrectionSpec.GetHashCode(); - if (Entity.Length != 0) hash ^= Entity.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (interval_ != null) hash ^= Interval.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -837,81 +579,13 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Placement.Length != 0) { + if (Name.Length != 0) { output.WriteRawTag(10); - output.WriteString(Placement); + output.WriteString(Name); } - if (Branch.Length != 0) { + if (interval_ != null) { output.WriteRawTag(18); - output.WriteString(Branch); - } - if (Query.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Query); - } - if (VisitorId.Length != 0) { - output.WriteRawTag(34); - output.WriteString(VisitorId); - } - if (userInfo_ != null) { - output.WriteRawTag(42); - output.WriteMessage(UserInfo); - } - if (PageSize != 0) { - output.WriteRawTag(56); - output.WriteInt32(PageSize); - } - if (PageToken.Length != 0) { - output.WriteRawTag(66); - output.WriteString(PageToken); - } - if (Offset != 0) { - output.WriteRawTag(72); - output.WriteInt32(Offset); - } - if (Filter.Length != 0) { - output.WriteRawTag(82); - output.WriteString(Filter); - } - if (OrderBy.Length != 0) { - output.WriteRawTag(90); - output.WriteString(OrderBy); - } - facetSpecs_.WriteTo(output, _repeated_facetSpecs_codec); - if (boostSpec_ != null) { - output.WriteRawTag(106); - output.WriteMessage(BoostSpec); - } - if (queryExpansionSpec_ != null) { - output.WriteRawTag(114); - output.WriteMessage(QueryExpansionSpec); - } - variantRollupKeys_.WriteTo(output, _repeated_variantRollupKeys_codec); - if (dynamicFacetSpec_ != null) { - output.WriteRawTag(170, 1); - output.WriteMessage(DynamicFacetSpec); - } - pageCategories_.WriteTo(output, _repeated_pageCategories_codec); - if (CanonicalFilter.Length != 0) { - output.WriteRawTag(226, 1); - output.WriteString(CanonicalFilter); - } - if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { - output.WriteRawTag(248, 1); - output.WriteEnum((int) SearchMode); - } - if (personalizationSpec_ != null) { - output.WriteRawTag(130, 2); - output.WriteMessage(PersonalizationSpec); - } - labels_.WriteTo(output, _map_labels_codec); - if (spellCorrectionSpec_ != null) { - output.WriteRawTag(154, 2); - output.WriteMessage(SpellCorrectionSpec); - } - if (Entity.Length != 0) { - output.WriteRawTag(178, 2); - output.WriteString(Entity); + output.WriteMessage(Interval); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -923,81 +597,13 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Placement.Length != 0) { + if (Name.Length != 0) { output.WriteRawTag(10); - output.WriteString(Placement); + output.WriteString(Name); } - if (Branch.Length != 0) { + if (interval_ != null) { output.WriteRawTag(18); - output.WriteString(Branch); - } - if (Query.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Query); - } - if (VisitorId.Length != 0) { - output.WriteRawTag(34); - output.WriteString(VisitorId); - } - if (userInfo_ != null) { - output.WriteRawTag(42); - output.WriteMessage(UserInfo); - } - if (PageSize != 0) { - output.WriteRawTag(56); - output.WriteInt32(PageSize); - } - if (PageToken.Length != 0) { - output.WriteRawTag(66); - output.WriteString(PageToken); - } - if (Offset != 0) { - output.WriteRawTag(72); - output.WriteInt32(Offset); - } - if (Filter.Length != 0) { - output.WriteRawTag(82); - output.WriteString(Filter); - } - if (OrderBy.Length != 0) { - output.WriteRawTag(90); - output.WriteString(OrderBy); - } - facetSpecs_.WriteTo(ref output, _repeated_facetSpecs_codec); - if (boostSpec_ != null) { - output.WriteRawTag(106); - output.WriteMessage(BoostSpec); - } - if (queryExpansionSpec_ != null) { - output.WriteRawTag(114); - output.WriteMessage(QueryExpansionSpec); - } - variantRollupKeys_.WriteTo(ref output, _repeated_variantRollupKeys_codec); - if (dynamicFacetSpec_ != null) { - output.WriteRawTag(170, 1); - output.WriteMessage(DynamicFacetSpec); - } - pageCategories_.WriteTo(ref output, _repeated_pageCategories_codec); - if (CanonicalFilter.Length != 0) { - output.WriteRawTag(226, 1); - output.WriteString(CanonicalFilter); - } - if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { - output.WriteRawTag(248, 1); - output.WriteEnum((int) SearchMode); - } - if (personalizationSpec_ != null) { - output.WriteRawTag(130, 2); - output.WriteMessage(PersonalizationSpec); - } - labels_.WriteTo(ref output, _map_labels_codec); - if (spellCorrectionSpec_ != null) { - output.WriteRawTag(154, 2); - output.WriteMessage(SpellCorrectionSpec); - } - if (Entity.Length != 0) { - output.WriteRawTag(178, 2); - output.WriteString(Entity); + output.WriteMessage(Interval); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1009,151 +615,32 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Placement.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Placement); + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } - if (Branch.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Branch); + if (interval_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Interval); } - if (Query.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Query); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); } - if (VisitorId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VisitorId); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ProductAttributeInterval other) { + if (other == null) { + return; } - if (userInfo_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserInfo); - } - if (PageSize != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); - } - if (PageToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); - } - if (Offset != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Offset); - } - if (Filter.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); - } - if (CanonicalFilter.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(CanonicalFilter); - } - if (OrderBy.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); - } - size += facetSpecs_.CalculateSize(_repeated_facetSpecs_codec); - if (dynamicFacetSpec_ != null) { - size += 2 + pb::CodedOutputStream.ComputeMessageSize(DynamicFacetSpec); - } - if (boostSpec_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoostSpec); - } - if (queryExpansionSpec_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryExpansionSpec); - } - size += variantRollupKeys_.CalculateSize(_repeated_variantRollupKeys_codec); - size += pageCategories_.CalculateSize(_repeated_pageCategories_codec); - if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { - size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SearchMode); - } - if (personalizationSpec_ != null) { - size += 2 + pb::CodedOutputStream.ComputeMessageSize(PersonalizationSpec); - } - size += labels_.CalculateSize(_map_labels_codec); - 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(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(SearchRequest other) { - if (other == null) { - return; - } - if (other.Placement.Length != 0) { - Placement = other.Placement; - } - if (other.Branch.Length != 0) { - Branch = other.Branch; - } - if (other.Query.Length != 0) { - Query = other.Query; - } - if (other.VisitorId.Length != 0) { - VisitorId = other.VisitorId; - } - if (other.userInfo_ != null) { - if (userInfo_ == null) { - UserInfo = new global::Google.Cloud.Retail.V2.UserInfo(); - } - UserInfo.MergeFrom(other.UserInfo); - } - if (other.PageSize != 0) { - PageSize = other.PageSize; - } - if (other.PageToken.Length != 0) { - PageToken = other.PageToken; - } - if (other.Offset != 0) { - Offset = other.Offset; - } - if (other.Filter.Length != 0) { - Filter = other.Filter; - } - if (other.CanonicalFilter.Length != 0) { - CanonicalFilter = other.CanonicalFilter; - } - if (other.OrderBy.Length != 0) { - OrderBy = other.OrderBy; - } - facetSpecs_.Add(other.facetSpecs_); - if (other.dynamicFacetSpec_ != null) { - if (dynamicFacetSpec_ == null) { - DynamicFacetSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec(); - } - DynamicFacetSpec.MergeFrom(other.DynamicFacetSpec); - } - if (other.boostSpec_ != null) { - if (boostSpec_ == null) { - BoostSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec(); - } - BoostSpec.MergeFrom(other.BoostSpec); - } - if (other.queryExpansionSpec_ != null) { - if (queryExpansionSpec_ == null) { - QueryExpansionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec(); - } - QueryExpansionSpec.MergeFrom(other.QueryExpansionSpec); + if (other.Name.Length != 0) { + Name = other.Name; } - variantRollupKeys_.Add(other.variantRollupKeys_); - pageCategories_.Add(other.pageCategories_); - if (other.SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { - SearchMode = other.SearchMode; - } - if (other.personalizationSpec_ != null) { - if (personalizationSpec_ == null) { - PersonalizationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec(); + if (other.interval_ != null) { + if (interval_ == null) { + Interval = new global::Google.Cloud.Retail.V2.Interval(); } - PersonalizationSpec.MergeFrom(other.PersonalizationSpec); - } - labels_.MergeFrom(other.labels_); - if (other.spellCorrectionSpec_ != null) { - if (spellCorrectionSpec_ == null) { - SpellCorrectionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec(); - } - SpellCorrectionSpec.MergeFrom(other.SpellCorrectionSpec); - } - if (other.Entity.Length != 0) { - Entity = other.Entity; + Interval.MergeFrom(other.Interval); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1171,109 +658,14 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Placement = input.ReadString(); + Name = input.ReadString(); break; } case 18: { - Branch = input.ReadString(); - break; - } - case 26: { - Query = input.ReadString(); - break; - } - case 34: { - VisitorId = input.ReadString(); - break; - } - case 42: { - if (userInfo_ == null) { - UserInfo = new global::Google.Cloud.Retail.V2.UserInfo(); - } - input.ReadMessage(UserInfo); - break; - } - case 56: { - PageSize = input.ReadInt32(); - break; - } - case 66: { - PageToken = input.ReadString(); - break; - } - case 72: { - Offset = input.ReadInt32(); - break; - } - case 82: { - Filter = input.ReadString(); - break; - } - case 90: { - OrderBy = input.ReadString(); - break; - } - case 98: { - facetSpecs_.AddEntriesFrom(input, _repeated_facetSpecs_codec); - break; - } - case 106: { - if (boostSpec_ == null) { - BoostSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec(); - } - input.ReadMessage(BoostSpec); - break; - } - case 114: { - if (queryExpansionSpec_ == null) { - QueryExpansionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec(); - } - input.ReadMessage(QueryExpansionSpec); - break; - } - case 138: { - variantRollupKeys_.AddEntriesFrom(input, _repeated_variantRollupKeys_codec); - break; - } - case 170: { - if (dynamicFacetSpec_ == null) { - DynamicFacetSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec(); - } - input.ReadMessage(DynamicFacetSpec); - break; - } - case 186: { - pageCategories_.AddEntriesFrom(input, _repeated_pageCategories_codec); - break; - } - case 226: { - CanonicalFilter = input.ReadString(); - break; - } - case 248: { - SearchMode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode) input.ReadEnum(); - break; - } - case 258: { - if (personalizationSpec_ == null) { - PersonalizationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec(); - } - input.ReadMessage(PersonalizationSpec); - break; - } - case 274: { - labels_.AddEntriesFrom(input, _map_labels_codec); - break; - } - case 282: { - if (spellCorrectionSpec_ == null) { - SpellCorrectionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec(); + if (interval_ == null) { + Interval = new global::Google.Cloud.Retail.V2.Interval(); } - input.ReadMessage(SpellCorrectionSpec); - break; - } - case 306: { - Entity = input.ReadString(); + input.ReadMessage(Interval); break; } } @@ -1292,109 +684,351 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - Placement = input.ReadString(); + Name = input.ReadString(); break; } case 18: { - Branch = input.ReadString(); - break; - } - case 26: { - Query = input.ReadString(); - break; - } - case 34: { - VisitorId = input.ReadString(); - break; - } - case 42: { - if (userInfo_ == null) { - UserInfo = new global::Google.Cloud.Retail.V2.UserInfo(); + if (interval_ == null) { + Interval = new global::Google.Cloud.Retail.V2.Interval(); } - input.ReadMessage(UserInfo); - break; - } - case 56: { - PageSize = input.ReadInt32(); - break; - } - case 66: { - PageToken = input.ReadString(); + input.ReadMessage(Interval); break; } - case 72: { - Offset = input.ReadInt32(); - break; - } - case 82: { - Filter = input.ReadString(); - break; - } - case 90: { - OrderBy = input.ReadString(); - break; + } + } + } + #endif + + } + + /// + /// This field specifies the tile information including an attribute key, + /// attribute value. More fields will be added in the future, eg: product id + /// or product counts, etc. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Tile : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Tile()); + 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 Tile() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Tile(Tile other) : this() { + representativeProductId_ = other.representativeProductId_; + switch (other.ProductAttributeCase) { + case ProductAttributeOneofCase.ProductAttributeValue: + ProductAttributeValue = other.ProductAttributeValue.Clone(); + break; + case ProductAttributeOneofCase.ProductAttributeInterval: + ProductAttributeInterval = other.ProductAttributeInterval.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Tile Clone() { + return new Tile(this); + } + + /// Field number for the "product_attribute_value" field. + public const int ProductAttributeValueFieldNumber = 1; + /// + /// The product attribute key-value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.ProductAttributeValue ProductAttributeValue { + get { return productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue ? (global::Google.Cloud.Retail.V2.ProductAttributeValue) productAttribute_ : null; } + set { + productAttribute_ = value; + productAttributeCase_ = value == null ? ProductAttributeOneofCase.None : ProductAttributeOneofCase.ProductAttributeValue; + } + } + + /// Field number for the "product_attribute_interval" field. + public const int ProductAttributeIntervalFieldNumber = 2; + /// + /// The product attribute key-numeric interval. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.ProductAttributeInterval ProductAttributeInterval { + get { return productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval ? (global::Google.Cloud.Retail.V2.ProductAttributeInterval) productAttribute_ : null; } + set { + productAttribute_ = value; + productAttributeCase_ = value == null ? ProductAttributeOneofCase.None : ProductAttributeOneofCase.ProductAttributeInterval; + } + } + + /// Field number for the "representative_product_id" field. + public const int RepresentativeProductIdFieldNumber = 3; + private string representativeProductId_ = ""; + /// + /// The representative product id for this tile. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RepresentativeProductId { + get { return representativeProductId_; } + set { + representativeProductId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + private object productAttribute_; + /// Enum of possible cases for the "product_attribute" oneof. + public enum ProductAttributeOneofCase { + None = 0, + ProductAttributeValue = 1, + ProductAttributeInterval = 2, + } + private ProductAttributeOneofCase productAttributeCase_ = ProductAttributeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ProductAttributeOneofCase ProductAttributeCase { + get { return productAttributeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearProductAttribute() { + productAttributeCase_ = ProductAttributeOneofCase.None; + productAttribute_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Tile); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Tile other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ProductAttributeValue, other.ProductAttributeValue)) return false; + if (!object.Equals(ProductAttributeInterval, other.ProductAttributeInterval)) return false; + if (RepresentativeProductId != other.RepresentativeProductId) return false; + if (ProductAttributeCase != other.ProductAttributeCase) 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 (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue) hash ^= ProductAttributeValue.GetHashCode(); + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval) hash ^= ProductAttributeInterval.GetHashCode(); + if (RepresentativeProductId.Length != 0) hash ^= RepresentativeProductId.GetHashCode(); + hash ^= (int) productAttributeCase_; + 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 (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue) { + output.WriteRawTag(10); + output.WriteMessage(ProductAttributeValue); + } + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval) { + output.WriteRawTag(18); + output.WriteMessage(ProductAttributeInterval); + } + if (RepresentativeProductId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RepresentativeProductId); + } + 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 (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue) { + output.WriteRawTag(10); + output.WriteMessage(ProductAttributeValue); + } + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval) { + output.WriteRawTag(18); + output.WriteMessage(ProductAttributeInterval); + } + if (RepresentativeProductId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RepresentativeProductId); + } + 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 (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProductAttributeValue); + } + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProductAttributeInterval); + } + if (RepresentativeProductId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RepresentativeProductId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Tile other) { + if (other == null) { + return; + } + if (other.RepresentativeProductId.Length != 0) { + RepresentativeProductId = other.RepresentativeProductId; + } + switch (other.ProductAttributeCase) { + case ProductAttributeOneofCase.ProductAttributeValue: + if (ProductAttributeValue == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); } - case 98: { - facetSpecs_.AddEntriesFrom(ref input, _repeated_facetSpecs_codec); - break; + ProductAttributeValue.MergeFrom(other.ProductAttributeValue); + break; + case ProductAttributeOneofCase.ProductAttributeInterval: + if (ProductAttributeInterval == null) { + ProductAttributeInterval = new global::Google.Cloud.Retail.V2.ProductAttributeInterval(); } - case 106: { - if (boostSpec_ == null) { - BoostSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec(); - } - input.ReadMessage(BoostSpec); + ProductAttributeInterval.MergeFrom(other.ProductAttributeInterval); + 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 114: { - if (queryExpansionSpec_ == null) { - QueryExpansionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec(); + case 10: { + global::Google.Cloud.Retail.V2.ProductAttributeValue subBuilder = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue) { + subBuilder.MergeFrom(ProductAttributeValue); } - input.ReadMessage(QueryExpansionSpec); - break; - } - case 138: { - variantRollupKeys_.AddEntriesFrom(ref input, _repeated_variantRollupKeys_codec); + input.ReadMessage(subBuilder); + ProductAttributeValue = subBuilder; break; } - case 170: { - if (dynamicFacetSpec_ == null) { - DynamicFacetSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec(); + case 18: { + global::Google.Cloud.Retail.V2.ProductAttributeInterval subBuilder = new global::Google.Cloud.Retail.V2.ProductAttributeInterval(); + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval) { + subBuilder.MergeFrom(ProductAttributeInterval); } - input.ReadMessage(DynamicFacetSpec); + input.ReadMessage(subBuilder); + ProductAttributeInterval = subBuilder; break; } - case 186: { - pageCategories_.AddEntriesFrom(ref input, _repeated_pageCategories_codec); + case 26: { + RepresentativeProductId = input.ReadString(); break; } - case 226: { - CanonicalFilter = input.ReadString(); + } + } + #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 248: { - SearchMode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode) input.ReadEnum(); + case 10: { + global::Google.Cloud.Retail.V2.ProductAttributeValue subBuilder = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeValue) { + subBuilder.MergeFrom(ProductAttributeValue); + } + input.ReadMessage(subBuilder); + ProductAttributeValue = subBuilder; break; } - case 258: { - if (personalizationSpec_ == null) { - PersonalizationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec(); + case 18: { + global::Google.Cloud.Retail.V2.ProductAttributeInterval subBuilder = new global::Google.Cloud.Retail.V2.ProductAttributeInterval(); + if (productAttributeCase_ == ProductAttributeOneofCase.ProductAttributeInterval) { + subBuilder.MergeFrom(ProductAttributeInterval); } - input.ReadMessage(PersonalizationSpec); + input.ReadMessage(subBuilder); + ProductAttributeInterval = subBuilder; break; } - case 274: { - labels_.AddEntriesFrom(ref input, _map_labels_codec); - break; - } - case 282: { - if (spellCorrectionSpec_ == null) { - SpellCorrectionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec(); - } - input.ReadMessage(SpellCorrectionSpec); - break; - } - case 306: { - Entity = input.ReadString(); + case 26: { + RepresentativeProductId = input.ReadString(); break; } } @@ -1402,767 +1036,4286 @@ public void MergeFrom(pb::CodedInputStream input) { } #endif - #region Nested types - /// Container for nested types declared in the SearchRequest message type. + } + + /// + /// Request message for + /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SearchRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SearchRequest()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// The search mode of each search request. - /// - public enum SearchMode { - /// - /// Default value. In this case both product search and faceted search will - /// be performed. Both - /// [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] - /// and [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] - /// will be returned. - /// - [pbr::OriginalName("SEARCH_MODE_UNSPECIFIED")] Unspecified = 0, - /// - /// Only product search will be performed. The faceted search will be - /// disabled. - /// - /// Only - /// [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] - /// will be returned. - /// [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will - /// not be returned, even if - /// [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] - /// or - /// [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec] - /// is set. - /// - [pbr::OriginalName("PRODUCT_SEARCH_ONLY")] ProductSearchOnly = 1, - /// - /// Only faceted search will be performed. The product search will be - /// disabled. - /// - /// When in this mode, one or both of - /// [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] - /// and - /// [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec] - /// should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only - /// [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will - /// be returned. - /// [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] - /// will not be returned. - /// - [pbr::OriginalName("FACETED_SEARCH_ONLY")] FacetedSearchOnly = 2, - } + public static pb::MessageParser Parser { get { return _parser; } } - /// - /// A facet specification to perform faceted search. - /// - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class FacetSpec : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FacetSpec()); - 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[3]; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Cloud.Retail.V2.SearchRequest.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)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SearchRequest() { + OnConstruction(); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetSpec() { - OnConstruction(); - } + partial void OnConstruction(); - partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SearchRequest(SearchRequest other) : this() { + placement_ = other.placement_; + branch_ = other.branch_; + query_ = other.query_; + visitorId_ = other.visitorId_; + userInfo_ = other.userInfo_ != null ? other.userInfo_.Clone() : null; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + offset_ = other.offset_; + filter_ = other.filter_; + canonicalFilter_ = other.canonicalFilter_; + orderBy_ = other.orderBy_; + facetSpecs_ = other.facetSpecs_.Clone(); + dynamicFacetSpec_ = other.dynamicFacetSpec_ != null ? other.dynamicFacetSpec_.Clone() : null; + boostSpec_ = other.boostSpec_ != null ? other.boostSpec_.Clone() : null; + queryExpansionSpec_ = other.queryExpansionSpec_ != null ? other.queryExpansionSpec_.Clone() : null; + variantRollupKeys_ = other.variantRollupKeys_.Clone(); + pageCategories_ = other.pageCategories_.Clone(); + searchMode_ = other.searchMode_; + personalizationSpec_ = other.personalizationSpec_ != null ? other.personalizationSpec_.Clone() : null; + labels_ = other.labels_.Clone(); + spellCorrectionSpec_ = other.spellCorrectionSpec_ != null ? other.spellCorrectionSpec_.Clone() : null; + entity_ = other.entity_; + conversationalSearchSpec_ = other.conversationalSearchSpec_ != null ? other.conversationalSearchSpec_.Clone() : null; + tileNavigationSpec_ = other.tileNavigationSpec_ != null ? other.tileNavigationSpec_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetSpec(FacetSpec other) : this() { - facetKey_ = other.facetKey_ != null ? other.facetKey_.Clone() : null; - limit_ = other.limit_; - excludedFilterKeys_ = other.excludedFilterKeys_.Clone(); - enableDynamicPosition_ = other.enableDynamicPosition_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SearchRequest Clone() { + return new SearchRequest(this); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetSpec Clone() { - return new FacetSpec(this); - } + /// Field number for the "placement" field. + public const int PlacementFieldNumber = 1; + private string placement_ = ""; + /// + /// Required. The resource name of the Retail Search serving config, such as + /// `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` + /// or the name of the legacy placement resource, such as + /// `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. + /// This field is used to identify the serving config name and the set + /// of models that are used to make the search. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Placement { + get { return placement_; } + set { + placement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - /// Field number for the "facet_key" field. - public const int FacetKeyFieldNumber = 1; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey facetKey_; - /// - /// Required. The facet key specification. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey FacetKey { - get { return facetKey_; } - set { - facetKey_ = value; - } - } + /// Field number for the "branch" field. + public const int BranchFieldNumber = 2; + private string branch_ = ""; + /// + /// The branch resource name, such as + /// `projects/*/locations/global/catalogs/default_catalog/branches/0`. + /// + /// Use "default_branch" as the branch ID or leave this field empty, to search + /// products under the default branch. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Branch { + get { return branch_; } + set { + branch_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - /// Field number for the "limit" field. - public const int LimitFieldNumber = 2; - private int limit_; - /// - /// Maximum of facet values that should be returned for this facet. If - /// unspecified, defaults to 50. The maximum allowed value is 300. Values - /// above 300 will be coerced to 300. - /// - /// If this field is negative, an INVALID_ARGUMENT is returned. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Limit { - get { return limit_; } - set { - limit_ = value; - } - } + /// Field number for the "query" field. + public const int QueryFieldNumber = 3; + private string query_ = ""; + /// + /// Raw search query. + /// + /// If this field is empty, the request is considered a category browsing + /// request and returned results are based on + /// [filter][google.cloud.retail.v2.SearchRequest.filter] and + /// [page_categories][google.cloud.retail.v2.SearchRequest.page_categories]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Query { + get { return query_; } + set { + query_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - /// Field number for the "excluded_filter_keys" field. - public const int ExcludedFilterKeysFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_excludedFilterKeys_codec - = pb::FieldCodec.ForString(26); - private readonly pbc::RepeatedField excludedFilterKeys_ = new pbc::RepeatedField(); - /// - /// List of keys to exclude when faceting. - /// - /// By default, - /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] - /// is not excluded from the filter unless it is listed in this field. - /// - /// Listing a facet key in this field allows its values to appear as facet - /// results, even when they are filtered out of search results. Using this - /// field does not affect what search results are returned. - /// - /// For example, suppose there are 100 products with the color facet "Red" - /// and 200 products with the color facet "Blue". A query containing the - /// filter "colorFamilies:ANY("Red")" and having "colorFamilies" as - /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] - /// would by default return only "Red" products in the search results, and - /// also return "Red" with count 100 as the only color facet. Although there - /// are also blue products available, "Blue" would not be shown as an - /// available facet value. - /// - /// If "colorFamilies" is listed in "excludedFilterKeys", then the query - /// returns the facet values "Red" with count 100 and "Blue" with count - /// 200, because the "colorFamilies" key is now excluded from the filter. - /// Because this field doesn't affect search results, the search results - /// are still correctly filtered to return only "Red" products. - /// - /// A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error - /// is returned. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField ExcludedFilterKeys { - get { return excludedFilterKeys_; } - } - - /// Field number for the "enable_dynamic_position" field. - public const int EnableDynamicPositionFieldNumber = 4; - private bool enableDynamicPosition_; - /// - /// Enables dynamic position for this facet. If set to true, the position of - /// this facet among all facets in the response is determined by Google - /// Retail Search. It is ordered together with dynamic facets if dynamic - /// facets is enabled. If set to false, the position of this facet in the - /// response is the same as in the request, and it is ranked before - /// the facets with dynamic position enable and all dynamic facets. - /// - /// For example, you may always want to have rating facet returned in - /// the response, but it's not necessarily to always display the rating facet - /// at the top. In that case, you can set enable_dynamic_position to true so - /// that the position of rating facet in response is determined by - /// Google Retail Search. - /// - /// Another example, assuming you have the following facets in the request: - /// - /// * "rating", enable_dynamic_position = true - /// - /// * "price", enable_dynamic_position = false - /// - /// * "brands", enable_dynamic_position = false - /// - /// And also you have a dynamic facets enable, which generates a facet - /// "gender". Then, the final order of the facets in the response can be - /// ("price", "brands", "rating", "gender") or ("price", "brands", "gender", - /// "rating") depends on how Google Retail Search orders "gender" and - /// "rating" facets. However, notice that "price" and "brands" are always - /// ranked at first and second position because their enable_dynamic_position - /// values are false. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool EnableDynamicPosition { - get { return enableDynamicPosition_; } - set { - enableDynamicPosition_ = value; - } - } + /// Field number for the "visitor_id" field. + public const int VisitorIdFieldNumber = 4; + private string visitorId_ = ""; + /// + /// Required. A unique identifier for tracking visitors. For example, this + /// could be implemented with an HTTP cookie, which should be able to uniquely + /// identify a visitor on a single device. This unique identifier should not + /// change if the visitor logs in or out of the website. + /// + /// This should be the same identifier as + /// [UserEvent.visitor_id][google.cloud.retail.v2.UserEvent.visitor_id]. + /// + /// The field must be a UTF-8 encoded string with a length limit of 128 + /// characters. Otherwise, an INVALID_ARGUMENT error is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VisitorId { + get { return visitorId_; } + set { + visitorId_ = 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 FacetSpec); - } + /// Field number for the "user_info" field. + public const int UserInfoFieldNumber = 5; + private global::Google.Cloud.Retail.V2.UserInfo userInfo_; + /// + /// User information. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.UserInfo UserInfo { + get { return userInfo_; } + set { + userInfo_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(FacetSpec other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (!object.Equals(FacetKey, other.FacetKey)) return false; - if (Limit != other.Limit) return false; - if(!excludedFilterKeys_.Equals(other.excludedFilterKeys_)) return false; - if (EnableDynamicPosition != other.EnableDynamicPosition) return false; - return Equals(_unknownFields, other._unknownFields); - } + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 7; + private int pageSize_; + /// + /// Maximum number of [Product][google.cloud.retail.v2.Product]s to return. If + /// unspecified, defaults to a reasonable value. The maximum allowed value is + /// 120. Values above 120 will be coerced to 120. + /// + /// If this field is negative, an INVALID_ARGUMENT is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (facetKey_ != null) hash ^= FacetKey.GetHashCode(); - if (Limit != 0) hash ^= Limit.GetHashCode(); - hash ^= excludedFilterKeys_.GetHashCode(); - if (EnableDynamicPosition != false) hash ^= EnableDynamicPosition.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 8; + private string pageToken_ = ""; + /// + /// A page token + /// [SearchResponse.next_page_token][google.cloud.retail.v2.SearchResponse.next_page_token], + /// received from a previous + /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] call. + /// Provide this to retrieve the subsequent page. + /// + /// When paginating, all other parameters provided to + /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] must + /// match the call that provided the page token. Otherwise, an INVALID_ARGUMENT + /// error is returned. + /// + [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 string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } + /// Field number for the "offset" field. + public const int OffsetFieldNumber = 9; + private int offset_; + /// + /// A 0-indexed integer that specifies the current offset (that is, starting + /// result location, amongst the [Product][google.cloud.retail.v2.Product]s + /// deemed by the API as relevant) in search results. This field is only + /// considered if [page_token][google.cloud.retail.v2.SearchRequest.page_token] + /// is unset. + /// + /// If this field is negative, an INVALID_ARGUMENT is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Offset { + get { return offset_; } + set { + offset_ = value; + } + } - [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 (facetKey_ != null) { - output.WriteRawTag(10); - output.WriteMessage(FacetKey); - } - if (Limit != 0) { - output.WriteRawTag(16); - output.WriteInt32(Limit); - } - excludedFilterKeys_.WriteTo(output, _repeated_excludedFilterKeys_codec); - if (EnableDynamicPosition != false) { - output.WriteRawTag(32); - output.WriteBool(EnableDynamicPosition); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } + /// Field number for the "filter" field. + public const int FilterFieldNumber = 10; + private string filter_ = ""; + /// + /// The filter syntax consists of an expression language for constructing a + /// predicate from one or more fields of the products being filtered. Filter + /// expression is case-sensitive. For more information, see + /// [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). + /// + /// If this field is unrecognizable, an INVALID_ARGUMENT is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - #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 (facetKey_ != null) { - output.WriteRawTag(10); - output.WriteMessage(FacetKey); - } - if (Limit != 0) { - output.WriteRawTag(16); - output.WriteInt32(Limit); - } - excludedFilterKeys_.WriteTo(ref output, _repeated_excludedFilterKeys_codec); - if (EnableDynamicPosition != false) { - output.WriteRawTag(32); - output.WriteBool(EnableDynamicPosition); - } - 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 (facetKey_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(FacetKey); - } - if (Limit != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit); - } - size += excludedFilterKeys_.CalculateSize(_repeated_excludedFilterKeys_codec); - if (EnableDynamicPosition != false) { - size += 1 + 1; - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } + /// Field number for the "canonical_filter" field. + public const int CanonicalFilterFieldNumber = 28; + private string canonicalFilter_ = ""; + /// + /// The default filter that is applied when a user performs a search without + /// checking any filters on the search page. + /// + /// The filter applied to every search request when quality improvement such as + /// query expansion is needed. In the case a query does not have a sufficient + /// amount of results this filter will be used to determine whether or not to + /// enable the query expansion flow. The original filter will still be used for + /// the query expanded search. + /// This field is strongly recommended to achieve high search quality. + /// + /// For more information about filter syntax, see + /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CanonicalFilter { + get { return canonicalFilter_; } + set { + canonicalFilter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(FacetSpec other) { - if (other == null) { - return; - } - if (other.facetKey_ != null) { - if (facetKey_ == null) { - FacetKey = new global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey(); - } - FacetKey.MergeFrom(other.FacetKey); - } - if (other.Limit != 0) { - Limit = other.Limit; - } - excludedFilterKeys_.Add(other.excludedFilterKeys_); - if (other.EnableDynamicPosition != false) { - EnableDynamicPosition = other.EnableDynamicPosition; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 11; + private string orderBy_ = ""; + /// + /// The order in which products are returned. Products can be ordered by + /// a field in an [Product][google.cloud.retail.v2.Product] object. Leave it + /// unset if ordered by relevance. OrderBy expression is case-sensitive. For + /// more information, see + /// [Order](https://cloud.google.com/retail/docs/filter-and-order#order). + /// + /// If this field is unrecognizable, an INVALID_ARGUMENT is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - [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 (facetKey_ == null) { - FacetKey = new global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey(); - } - input.ReadMessage(FacetKey); - break; - } - case 16: { - Limit = input.ReadInt32(); - break; - } - case 26: { - excludedFilterKeys_.AddEntriesFrom(input, _repeated_excludedFilterKeys_codec); - break; - } - case 32: { - EnableDynamicPosition = input.ReadBool(); - break; - } - } - } - #endif - } + /// Field number for the "facet_specs" field. + public const int FacetSpecsFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_facetSpecs_codec + = pb::FieldCodec.ForMessage(98, global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Parser); + private readonly pbc::RepeatedField facetSpecs_ = new pbc::RepeatedField(); + /// + /// Facet specifications for faceted search. If empty, no facets are returned. + /// + /// A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error + /// is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FacetSpecs { + get { return facetSpecs_; } + } - #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 (facetKey_ == null) { - FacetKey = new global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey(); - } - input.ReadMessage(FacetKey); - break; - } - case 16: { - Limit = input.ReadInt32(); - break; - } - case 26: { - excludedFilterKeys_.AddEntriesFrom(ref input, _repeated_excludedFilterKeys_codec); - break; - } - case 32: { - EnableDynamicPosition = input.ReadBool(); - break; - } - } - } - } - #endif + /// Field number for the "dynamic_facet_spec" field. + public const int DynamicFacetSpecFieldNumber = 21; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec dynamicFacetSpec_; + /// + /// Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic + /// to enable dynamic facets. Do not set this field. + /// + /// The specification for dynamically generated facets. Notice that only + /// textual facets can be dynamically generated. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec DynamicFacetSpec { + get { return dynamicFacetSpec_; } + set { + dynamicFacetSpec_ = value; + } + } - #region Nested types - /// Container for nested types declared in the FacetSpec message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// Specifies how a facet is computed. - /// - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class FacetKey : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FacetKey()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + /// Field number for the "boost_spec" field. + public const int BoostSpecFieldNumber = 13; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec boostSpec_; + /// + /// Boost specification to boost certain products. For more information, see + /// [Boost results](https://cloud.google.com/retail/docs/boosting). + /// + /// Notice that if both + /// [ServingConfig.boost_control_ids][google.cloud.retail.v2.ServingConfig.boost_control_ids] + /// and + /// [SearchRequest.boost_spec][google.cloud.retail.v2.SearchRequest.boost_spec] + /// are set, the boost conditions from both places are evaluated. If a search + /// request matches multiple boost conditions, the final boost score is equal + /// to the sum of the boost scores from all matched boost conditions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec BoostSpec { + get { return boostSpec_; } + set { + boostSpec_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Descriptor.NestedTypes[0]; } - } + /// Field number for the "query_expansion_spec" field. + public const int QueryExpansionSpecFieldNumber = 14; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec queryExpansionSpec_; + /// + /// The query expansion specification that specifies the conditions under which + /// query expansion occurs. For more information, see [Query + /// expansion](https://cloud.google.com/retail/docs/result-size#query_expansion). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec QueryExpansionSpec { + get { return queryExpansionSpec_; } + set { + queryExpansionSpec_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } + /// Field number for the "variant_rollup_keys" field. + public const int VariantRollupKeysFieldNumber = 17; + private static readonly pb::FieldCodec _repeated_variantRollupKeys_codec + = pb::FieldCodec.ForString(138); + private readonly pbc::RepeatedField variantRollupKeys_ = new pbc::RepeatedField(); + /// + /// The keys to fetch and rollup the matching + /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] + /// [Product][google.cloud.retail.v2.Product]s attributes, + /// [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo] or + /// [LocalInventory][google.cloud.retail.v2.LocalInventory]s attributes. The + /// attributes from all the matching + /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] + /// [Product][google.cloud.retail.v2.Product]s or + /// [LocalInventory][google.cloud.retail.v2.LocalInventory]s are merged and + /// de-duplicated. Notice that rollup attributes will lead to extra query + /// latency. Maximum number of keys is 30. + /// + /// For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], a + /// fulfillment type and a fulfillment ID must be provided in the format of + /// "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123", + /// "pickupInStore" is fulfillment type and "store123" is the store ID. + /// + /// Supported keys are: + /// + /// * colorFamilies + /// * price + /// * originalPrice + /// * discount + /// * variantId + /// * inventory(place_id,price) + /// * inventory(place_id,original_price) + /// * inventory(place_id,attributes.key), where key is any key in the + /// [Product.local_inventories.attributes][google.cloud.retail.v2.LocalInventory.attributes] + /// map. + /// * attributes.key, where key is any key in the + /// [Product.attributes][google.cloud.retail.v2.Product.attributes] map. + /// * pickupInStore.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "pickup-in-store". + /// * shipToStore.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "ship-to-store". + /// * sameDayDelivery.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "same-day-delivery". + /// * nextDayDelivery.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "next-day-delivery". + /// * customFulfillment1.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "custom-type-1". + /// * customFulfillment2.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "custom-type-2". + /// * customFulfillment3.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "custom-type-3". + /// * customFulfillment4.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "custom-type-4". + /// * customFulfillment5.id, where id is any + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type] + /// "custom-type-5". + /// + /// If this field is set to an invalid value other than these, an + /// INVALID_ARGUMENT error is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField VariantRollupKeys { + get { return variantRollupKeys_; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetKey() { - OnConstruction(); - } + /// Field number for the "page_categories" field. + public const int PageCategoriesFieldNumber = 23; + private static readonly pb::FieldCodec _repeated_pageCategories_codec + = pb::FieldCodec.ForString(186); + private readonly pbc::RepeatedField pageCategories_ = new pbc::RepeatedField(); + /// + /// The categories associated with a category page. Must be set for category + /// navigation queries to achieve good search quality. The format should be + /// the same as + /// [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories]; + /// + /// To represent full path of category, use '>' sign to separate different + /// hierarchies. If '>' is part of the category name, replace it with + /// other character(s). + /// + /// Category pages include special pages such as sales or promotions. For + /// instance, a special sale page may have the category hierarchy: + /// "pageCategories" : ["Sales > 2017 Black Friday Deals"]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField PageCategories { + get { return pageCategories_; } + } - partial void OnConstruction(); + /// Field number for the "search_mode" field. + public const int SearchModeFieldNumber = 31; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode searchMode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified; + /// + /// The search mode of the search request. If not specified, a single search + /// request triggers both product search and faceted search. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode SearchMode { + get { return searchMode_; } + set { + searchMode_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetKey(FacetKey other) : this() { - key_ = other.key_; - intervals_ = other.intervals_.Clone(); - restrictedValues_ = other.restrictedValues_.Clone(); - prefixes_ = other.prefixes_.Clone(); - contains_ = other.contains_.Clone(); - caseInsensitive_ = other.caseInsensitive_; - orderBy_ = other.orderBy_; - query_ = other.query_; - returnMinMax_ = other.returnMinMax_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + /// Field number for the "personalization_spec" field. + public const int PersonalizationSpecFieldNumber = 32; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec personalizationSpec_; + /// + /// The specification for personalization. + /// + /// Notice that if both + /// [ServingConfig.personalization_spec][google.cloud.retail.v2.ServingConfig.personalization_spec] + /// and + /// [SearchRequest.personalization_spec][google.cloud.retail.v2.SearchRequest.personalization_spec] + /// are set. + /// [SearchRequest.personalization_spec][google.cloud.retail.v2.SearchRequest.personalization_spec] + /// will override + /// [ServingConfig.personalization_spec][google.cloud.retail.v2.ServingConfig.personalization_spec]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec PersonalizationSpec { + get { return personalizationSpec_; } + set { + personalizationSpec_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetKey Clone() { - return new FacetKey(this); - } + /// Field number for the "labels" field. + public const int LabelsFieldNumber = 34; + private static readonly pbc::MapField.Codec _map_labels_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 274); + private readonly pbc::MapField labels_ = new pbc::MapField(); + /// + /// The labels applied to a resource must meet the following requirements: + /// + /// * Each resource can have multiple labels, up to a maximum of 64. + /// * Each label must be a key-value pair. + /// * Keys have a minimum length of 1 character and a maximum length of 63 + /// characters and cannot be empty. Values can be empty and have a maximum + /// length of 63 characters. + /// * Keys and values can contain only lowercase letters, numeric characters, + /// underscores, and dashes. All characters must use UTF-8 encoding, and + /// international characters are allowed. + /// * The key portion of a label must be unique. However, you can use the same + /// key with multiple resources. + /// * Keys must start with a lowercase letter or international character. + /// + /// For more information, see [Requirements for + /// labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + /// in the Resource Manager documentation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Labels { + get { return labels_; } + } - /// Field number for the "key" field. - public const int KeyFieldNumber = 1; - private string key_ = ""; - /// - /// Required. Supported textual and numerical facet keys in - /// [Product][google.cloud.retail.v2.Product] object, over which the facet - /// values are computed. Facet key is case-sensitive. - /// - /// Allowed facet keys when - /// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query] - /// is not specified: - /// - /// * textual_field = - /// * "brands" - /// * "categories" - /// * "genders" - /// * "ageGroups" - /// * "availability" - /// * "colorFamilies" - /// * "colors" - /// * "sizes" - /// * "materials" - /// * "patterns" - /// * "conditions" - /// * "attributes.key" - /// * "pickupInStore" - /// * "shipToStore" - /// * "sameDayDelivery" - /// * "nextDayDelivery" - /// * "customFulfillment1" - /// * "customFulfillment2" - /// * "customFulfillment3" - /// * "customFulfillment4" - /// * "customFulfillment5" - /// * "inventory(place_id,attributes.key)" - /// - /// * numerical_field = - /// * "price" - /// * "discount" - /// * "rating" - /// * "ratingCount" - /// * "attributes.key" - /// * "inventory(place_id,price)" - /// * "inventory(place_id,original_price)" - /// * "inventory(place_id,attributes.key)" - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Key { - get { return key_; } - set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "intervals" field. - public const int IntervalsFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_intervals_codec - = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.Interval.Parser); - private readonly pbc::RepeatedField intervals_ = new pbc::RepeatedField(); - /// - /// 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 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 become the bounds - /// for its intervals and are returned in the response. If the - /// facet key intervals are specified in the request, then the specified - /// intervals are returned instead. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Intervals { - get { return intervals_; } - } + /// Field number for the "spell_correction_spec" field. + public const int SpellCorrectionSpecFieldNumber = 35; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec spellCorrectionSpec_; + /// + /// The spell correction specification that specifies the mode under + /// which spell correction will take effect. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec SpellCorrectionSpec { + get { return spellCorrectionSpec_; } + set { + spellCorrectionSpec_ = value; + } + } - /// Field number for the "restricted_values" field. - public const int RestrictedValuesFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_restrictedValues_codec - = pb::FieldCodec.ForString(26); - private readonly pbc::RepeatedField restrictedValues_ = new pbc::RepeatedField(); - /// - /// Only get facet for the given restricted values. For example, when using - /// "pickupInStore" as key and set restricted values to - /// ["store123", "store456"], only facets for "store123" and "store456" are - /// returned. Only supported on predefined textual fields, custom textual - /// attributes and fulfillments. Maximum is 20. - /// - /// Must be set for the fulfillment facet keys: - /// - /// * pickupInStore - /// - /// * shipToStore - /// - /// * sameDayDelivery - /// - /// * nextDayDelivery - /// - /// * customFulfillment1 - /// - /// * customFulfillment2 - /// - /// * customFulfillment3 - /// - /// * customFulfillment4 - /// - /// * customFulfillment5 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField RestrictedValues { - get { return restrictedValues_; } - } + /// 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"); + } + } - /// Field number for the "prefixes" field. - public const int PrefixesFieldNumber = 8; - private static readonly pb::FieldCodec _repeated_prefixes_codec - = pb::FieldCodec.ForString(66); - private readonly pbc::RepeatedField prefixes_ = new pbc::RepeatedField(); - /// - /// Only get facet values that start with the given string prefix. For - /// example, suppose "categories" has three values "Women > Shoe", - /// "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the - /// "categories" facet gives only "Women > Shoe" and "Women > Dress". - /// Only supported on textual fields. Maximum is 10. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Prefixes { - get { return prefixes_; } - } + /// Field number for the "conversational_search_spec" field. + public const int ConversationalSearchSpecFieldNumber = 40; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec conversationalSearchSpec_; + /// + /// Optional. This field specifies all conversational related parameters + /// addition to traditional retail search. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec ConversationalSearchSpec { + get { return conversationalSearchSpec_; } + set { + conversationalSearchSpec_ = value; + } + } - /// Field number for the "contains" field. - public const int ContainsFieldNumber = 9; - private static readonly pb::FieldCodec _repeated_contains_codec - = pb::FieldCodec.ForString(74); - private readonly pbc::RepeatedField contains_ = new pbc::RepeatedField(); - /// - /// Only get facet values that contains the given strings. For example, - /// suppose "categories" has three values "Women > Shoe", - /// "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the - /// "categories" facet gives only "Women > Shoe" and "Men > Shoe". - /// Only supported on textual fields. Maximum is 10. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Contains { - get { return contains_; } - } + /// Field number for the "tile_navigation_spec" field. + public const int TileNavigationSpecFieldNumber = 41; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec tileNavigationSpec_; + /// + /// Optional. This field specifies tile navigation related parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec TileNavigationSpec { + get { return tileNavigationSpec_; } + set { + tileNavigationSpec_ = value; + } + } - /// Field number for the "case_insensitive" field. - public const int CaseInsensitiveFieldNumber = 10; - private bool caseInsensitive_; - /// - /// True to make facet keys case insensitive when getting faceting - /// values with prefixes or contains; false otherwise. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool CaseInsensitive { - get { return caseInsensitive_; } - set { - caseInsensitive_ = value; - } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SearchRequest); + } - /// Field number for the "order_by" field. - public const int OrderByFieldNumber = 4; - private string orderBy_ = ""; - /// - /// The order in which - /// [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values] - /// are returned. - /// - /// Allowed values are: - /// - /// * "count desc", which means order by - /// [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] - /// descending. - /// - /// * "value desc", which means order by - /// [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] - /// descending. - /// Only applies to textual facets. - /// - /// If not set, textual values are sorted in [natural - /// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical - /// intervals are sorted in the order given by - /// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]; - /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] - /// are sorted in the order given by - /// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.restricted_values]. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string OrderBy { - get { return orderBy_; } - set { - orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SearchRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Placement != other.Placement) return false; + if (Branch != other.Branch) return false; + if (Query != other.Query) return false; + if (VisitorId != other.VisitorId) return false; + if (!object.Equals(UserInfo, other.UserInfo)) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + if (Offset != other.Offset) return false; + if (Filter != other.Filter) return false; + if (CanonicalFilter != other.CanonicalFilter) return false; + if (OrderBy != other.OrderBy) return false; + if(!facetSpecs_.Equals(other.facetSpecs_)) return false; + if (!object.Equals(DynamicFacetSpec, other.DynamicFacetSpec)) return false; + if (!object.Equals(BoostSpec, other.BoostSpec)) return false; + if (!object.Equals(QueryExpansionSpec, other.QueryExpansionSpec)) return false; + if(!variantRollupKeys_.Equals(other.variantRollupKeys_)) return false; + if(!pageCategories_.Equals(other.pageCategories_)) return false; + if (SearchMode != other.SearchMode) return false; + 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; + if (!object.Equals(ConversationalSearchSpec, other.ConversationalSearchSpec)) return false; + if (!object.Equals(TileNavigationSpec, other.TileNavigationSpec)) return false; + return Equals(_unknownFields, other._unknownFields); + } - /// Field number for the "query" field. - public const int QueryFieldNumber = 5; - private string query_ = ""; - /// - /// The query that is used to compute facet for the given facet key. - /// When provided, it overrides the default behavior of facet - /// computation. The query syntax is the same as a filter expression. See + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Placement.Length != 0) hash ^= Placement.GetHashCode(); + if (Branch.Length != 0) hash ^= Branch.GetHashCode(); + if (Query.Length != 0) hash ^= Query.GetHashCode(); + if (VisitorId.Length != 0) hash ^= VisitorId.GetHashCode(); + if (userInfo_ != null) hash ^= UserInfo.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (Offset != 0) hash ^= Offset.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (CanonicalFilter.Length != 0) hash ^= CanonicalFilter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); + hash ^= facetSpecs_.GetHashCode(); + if (dynamicFacetSpec_ != null) hash ^= DynamicFacetSpec.GetHashCode(); + if (boostSpec_ != null) hash ^= BoostSpec.GetHashCode(); + if (queryExpansionSpec_ != null) hash ^= QueryExpansionSpec.GetHashCode(); + hash ^= variantRollupKeys_.GetHashCode(); + hash ^= pageCategories_.GetHashCode(); + if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) hash ^= SearchMode.GetHashCode(); + if (personalizationSpec_ != null) hash ^= PersonalizationSpec.GetHashCode(); + hash ^= Labels.GetHashCode(); + if (spellCorrectionSpec_ != null) hash ^= SpellCorrectionSpec.GetHashCode(); + if (Entity.Length != 0) hash ^= Entity.GetHashCode(); + if (conversationalSearchSpec_ != null) hash ^= ConversationalSearchSpec.GetHashCode(); + if (tileNavigationSpec_ != null) hash ^= TileNavigationSpec.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 (Placement.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Placement); + } + if (Branch.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Branch); + } + if (Query.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Query); + } + if (VisitorId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(VisitorId); + } + if (userInfo_ != null) { + output.WriteRawTag(42); + output.WriteMessage(UserInfo); + } + if (PageSize != 0) { + output.WriteRawTag(56); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(66); + output.WriteString(PageToken); + } + if (Offset != 0) { + output.WriteRawTag(72); + output.WriteInt32(Offset); + } + if (Filter.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(90); + output.WriteString(OrderBy); + } + facetSpecs_.WriteTo(output, _repeated_facetSpecs_codec); + if (boostSpec_ != null) { + output.WriteRawTag(106); + output.WriteMessage(BoostSpec); + } + if (queryExpansionSpec_ != null) { + output.WriteRawTag(114); + output.WriteMessage(QueryExpansionSpec); + } + variantRollupKeys_.WriteTo(output, _repeated_variantRollupKeys_codec); + if (dynamicFacetSpec_ != null) { + output.WriteRawTag(170, 1); + output.WriteMessage(DynamicFacetSpec); + } + pageCategories_.WriteTo(output, _repeated_pageCategories_codec); + if (CanonicalFilter.Length != 0) { + output.WriteRawTag(226, 1); + output.WriteString(CanonicalFilter); + } + if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { + output.WriteRawTag(248, 1); + output.WriteEnum((int) SearchMode); + } + if (personalizationSpec_ != null) { + output.WriteRawTag(130, 2); + output.WriteMessage(PersonalizationSpec); + } + labels_.WriteTo(output, _map_labels_codec); + if (spellCorrectionSpec_ != null) { + output.WriteRawTag(154, 2); + output.WriteMessage(SpellCorrectionSpec); + } + if (Entity.Length != 0) { + output.WriteRawTag(178, 2); + output.WriteString(Entity); + } + if (conversationalSearchSpec_ != null) { + output.WriteRawTag(194, 2); + output.WriteMessage(ConversationalSearchSpec); + } + if (tileNavigationSpec_ != null) { + output.WriteRawTag(202, 2); + output.WriteMessage(TileNavigationSpec); + } + 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 (Placement.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Placement); + } + if (Branch.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Branch); + } + if (Query.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Query); + } + if (VisitorId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(VisitorId); + } + if (userInfo_ != null) { + output.WriteRawTag(42); + output.WriteMessage(UserInfo); + } + if (PageSize != 0) { + output.WriteRawTag(56); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(66); + output.WriteString(PageToken); + } + if (Offset != 0) { + output.WriteRawTag(72); + output.WriteInt32(Offset); + } + if (Filter.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(90); + output.WriteString(OrderBy); + } + facetSpecs_.WriteTo(ref output, _repeated_facetSpecs_codec); + if (boostSpec_ != null) { + output.WriteRawTag(106); + output.WriteMessage(BoostSpec); + } + if (queryExpansionSpec_ != null) { + output.WriteRawTag(114); + output.WriteMessage(QueryExpansionSpec); + } + variantRollupKeys_.WriteTo(ref output, _repeated_variantRollupKeys_codec); + if (dynamicFacetSpec_ != null) { + output.WriteRawTag(170, 1); + output.WriteMessage(DynamicFacetSpec); + } + pageCategories_.WriteTo(ref output, _repeated_pageCategories_codec); + if (CanonicalFilter.Length != 0) { + output.WriteRawTag(226, 1); + output.WriteString(CanonicalFilter); + } + if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { + output.WriteRawTag(248, 1); + output.WriteEnum((int) SearchMode); + } + if (personalizationSpec_ != null) { + output.WriteRawTag(130, 2); + output.WriteMessage(PersonalizationSpec); + } + labels_.WriteTo(ref output, _map_labels_codec); + if (spellCorrectionSpec_ != null) { + output.WriteRawTag(154, 2); + output.WriteMessage(SpellCorrectionSpec); + } + if (Entity.Length != 0) { + output.WriteRawTag(178, 2); + output.WriteString(Entity); + } + if (conversationalSearchSpec_ != null) { + output.WriteRawTag(194, 2); + output.WriteMessage(ConversationalSearchSpec); + } + if (tileNavigationSpec_ != null) { + output.WriteRawTag(202, 2); + output.WriteMessage(TileNavigationSpec); + } + 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 (Placement.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Placement); + } + if (Branch.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Branch); + } + if (Query.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Query); + } + if (VisitorId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VisitorId); + } + if (userInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserInfo); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (Offset != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Offset); + } + if (Filter.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); + } + if (CanonicalFilter.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(CanonicalFilter); + } + if (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + size += facetSpecs_.CalculateSize(_repeated_facetSpecs_codec); + if (dynamicFacetSpec_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(DynamicFacetSpec); + } + if (boostSpec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoostSpec); + } + if (queryExpansionSpec_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryExpansionSpec); + } + size += variantRollupKeys_.CalculateSize(_repeated_variantRollupKeys_codec); + size += pageCategories_.CalculateSize(_repeated_pageCategories_codec); + if (SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SearchMode); + } + if (personalizationSpec_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(PersonalizationSpec); + } + size += labels_.CalculateSize(_map_labels_codec); + if (spellCorrectionSpec_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SpellCorrectionSpec); + } + if (Entity.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Entity); + } + if (conversationalSearchSpec_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ConversationalSearchSpec); + } + if (tileNavigationSpec_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(TileNavigationSpec); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SearchRequest other) { + if (other == null) { + return; + } + if (other.Placement.Length != 0) { + Placement = other.Placement; + } + if (other.Branch.Length != 0) { + Branch = other.Branch; + } + if (other.Query.Length != 0) { + Query = other.Query; + } + if (other.VisitorId.Length != 0) { + VisitorId = other.VisitorId; + } + if (other.userInfo_ != null) { + if (userInfo_ == null) { + UserInfo = new global::Google.Cloud.Retail.V2.UserInfo(); + } + UserInfo.MergeFrom(other.UserInfo); + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + if (other.Offset != 0) { + Offset = other.Offset; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.CanonicalFilter.Length != 0) { + CanonicalFilter = other.CanonicalFilter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + facetSpecs_.Add(other.facetSpecs_); + if (other.dynamicFacetSpec_ != null) { + if (dynamicFacetSpec_ == null) { + DynamicFacetSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec(); + } + DynamicFacetSpec.MergeFrom(other.DynamicFacetSpec); + } + if (other.boostSpec_ != null) { + if (boostSpec_ == null) { + BoostSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec(); + } + BoostSpec.MergeFrom(other.BoostSpec); + } + if (other.queryExpansionSpec_ != null) { + if (queryExpansionSpec_ == null) { + QueryExpansionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec(); + } + QueryExpansionSpec.MergeFrom(other.QueryExpansionSpec); + } + variantRollupKeys_.Add(other.variantRollupKeys_); + pageCategories_.Add(other.pageCategories_); + if (other.SearchMode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode.Unspecified) { + SearchMode = other.SearchMode; + } + if (other.personalizationSpec_ != null) { + if (personalizationSpec_ == null) { + PersonalizationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec(); + } + PersonalizationSpec.MergeFrom(other.PersonalizationSpec); + } + labels_.MergeFrom(other.labels_); + if (other.spellCorrectionSpec_ != null) { + if (spellCorrectionSpec_ == null) { + SpellCorrectionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec(); + } + SpellCorrectionSpec.MergeFrom(other.SpellCorrectionSpec); + } + if (other.Entity.Length != 0) { + Entity = other.Entity; + } + if (other.conversationalSearchSpec_ != null) { + if (conversationalSearchSpec_ == null) { + ConversationalSearchSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec(); + } + ConversationalSearchSpec.MergeFrom(other.ConversationalSearchSpec); + } + if (other.tileNavigationSpec_ != null) { + if (tileNavigationSpec_ == null) { + TileNavigationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec(); + } + TileNavigationSpec.MergeFrom(other.TileNavigationSpec); + } + _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: { + Placement = input.ReadString(); + break; + } + case 18: { + Branch = input.ReadString(); + break; + } + case 26: { + Query = input.ReadString(); + break; + } + case 34: { + VisitorId = input.ReadString(); + break; + } + case 42: { + if (userInfo_ == null) { + UserInfo = new global::Google.Cloud.Retail.V2.UserInfo(); + } + input.ReadMessage(UserInfo); + break; + } + case 56: { + PageSize = input.ReadInt32(); + break; + } + case 66: { + PageToken = input.ReadString(); + break; + } + case 72: { + Offset = input.ReadInt32(); + break; + } + case 82: { + Filter = input.ReadString(); + break; + } + case 90: { + OrderBy = input.ReadString(); + break; + } + case 98: { + facetSpecs_.AddEntriesFrom(input, _repeated_facetSpecs_codec); + break; + } + case 106: { + if (boostSpec_ == null) { + BoostSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec(); + } + input.ReadMessage(BoostSpec); + break; + } + case 114: { + if (queryExpansionSpec_ == null) { + QueryExpansionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec(); + } + input.ReadMessage(QueryExpansionSpec); + break; + } + case 138: { + variantRollupKeys_.AddEntriesFrom(input, _repeated_variantRollupKeys_codec); + break; + } + case 170: { + if (dynamicFacetSpec_ == null) { + DynamicFacetSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec(); + } + input.ReadMessage(DynamicFacetSpec); + break; + } + case 186: { + pageCategories_.AddEntriesFrom(input, _repeated_pageCategories_codec); + break; + } + case 226: { + CanonicalFilter = input.ReadString(); + break; + } + case 248: { + SearchMode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode) input.ReadEnum(); + break; + } + case 258: { + if (personalizationSpec_ == null) { + PersonalizationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec(); + } + input.ReadMessage(PersonalizationSpec); + break; + } + case 274: { + labels_.AddEntriesFrom(input, _map_labels_codec); + break; + } + case 282: { + if (spellCorrectionSpec_ == null) { + SpellCorrectionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec(); + } + input.ReadMessage(SpellCorrectionSpec); + break; + } + case 306: { + Entity = input.ReadString(); + break; + } + case 322: { + if (conversationalSearchSpec_ == null) { + ConversationalSearchSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec(); + } + input.ReadMessage(ConversationalSearchSpec); + break; + } + case 330: { + if (tileNavigationSpec_ == null) { + TileNavigationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec(); + } + input.ReadMessage(TileNavigationSpec); + 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: { + Placement = input.ReadString(); + break; + } + case 18: { + Branch = input.ReadString(); + break; + } + case 26: { + Query = input.ReadString(); + break; + } + case 34: { + VisitorId = input.ReadString(); + break; + } + case 42: { + if (userInfo_ == null) { + UserInfo = new global::Google.Cloud.Retail.V2.UserInfo(); + } + input.ReadMessage(UserInfo); + break; + } + case 56: { + PageSize = input.ReadInt32(); + break; + } + case 66: { + PageToken = input.ReadString(); + break; + } + case 72: { + Offset = input.ReadInt32(); + break; + } + case 82: { + Filter = input.ReadString(); + break; + } + case 90: { + OrderBy = input.ReadString(); + break; + } + case 98: { + facetSpecs_.AddEntriesFrom(ref input, _repeated_facetSpecs_codec); + break; + } + case 106: { + if (boostSpec_ == null) { + BoostSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec(); + } + input.ReadMessage(BoostSpec); + break; + } + case 114: { + if (queryExpansionSpec_ == null) { + QueryExpansionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec(); + } + input.ReadMessage(QueryExpansionSpec); + break; + } + case 138: { + variantRollupKeys_.AddEntriesFrom(ref input, _repeated_variantRollupKeys_codec); + break; + } + case 170: { + if (dynamicFacetSpec_ == null) { + DynamicFacetSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec(); + } + input.ReadMessage(DynamicFacetSpec); + break; + } + case 186: { + pageCategories_.AddEntriesFrom(ref input, _repeated_pageCategories_codec); + break; + } + case 226: { + CanonicalFilter = input.ReadString(); + break; + } + case 248: { + SearchMode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SearchMode) input.ReadEnum(); + break; + } + case 258: { + if (personalizationSpec_ == null) { + PersonalizationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec(); + } + input.ReadMessage(PersonalizationSpec); + break; + } + case 274: { + labels_.AddEntriesFrom(ref input, _map_labels_codec); + break; + } + case 282: { + if (spellCorrectionSpec_ == null) { + SpellCorrectionSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec(); + } + input.ReadMessage(SpellCorrectionSpec); + break; + } + case 306: { + Entity = input.ReadString(); + break; + } + case 322: { + if (conversationalSearchSpec_ == null) { + ConversationalSearchSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec(); + } + input.ReadMessage(ConversationalSearchSpec); + break; + } + case 330: { + if (tileNavigationSpec_ == null) { + TileNavigationSpec = new global::Google.Cloud.Retail.V2.SearchRequest.Types.TileNavigationSpec(); + } + input.ReadMessage(TileNavigationSpec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the SearchRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The search mode of each search request. + /// + public enum SearchMode { + /// + /// Default value. In this case both product search and faceted search will + /// be performed. Both + /// [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] + /// and [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] + /// will be returned. + /// + [pbr::OriginalName("SEARCH_MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Only product search will be performed. The faceted search will be + /// disabled. + /// + /// Only + /// [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] + /// will be returned. + /// [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will + /// not be returned, even if + /// [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] + /// or + /// [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec] + /// is set. + /// + [pbr::OriginalName("PRODUCT_SEARCH_ONLY")] ProductSearchOnly = 1, + /// + /// Only faceted search will be performed. The product search will be + /// disabled. + /// + /// When in this mode, one or both of + /// [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] + /// and + /// [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec] + /// should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only + /// [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will + /// be returned. + /// [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] + /// will not be returned. + /// + [pbr::OriginalName("FACETED_SEARCH_ONLY")] FacetedSearchOnly = 2, + } + + /// + /// A facet specification to perform faceted search. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FacetSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FacetSpec()); + 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.SearchRequest.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 FacetSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetSpec(FacetSpec other) : this() { + facetKey_ = other.facetKey_ != null ? other.facetKey_.Clone() : null; + limit_ = other.limit_; + excludedFilterKeys_ = other.excludedFilterKeys_.Clone(); + enableDynamicPosition_ = other.enableDynamicPosition_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetSpec Clone() { + return new FacetSpec(this); + } + + /// Field number for the "facet_key" field. + public const int FacetKeyFieldNumber = 1; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey facetKey_; + /// + /// Required. The facet key specification. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey FacetKey { + get { return facetKey_; } + set { + facetKey_ = value; + } + } + + /// Field number for the "limit" field. + public const int LimitFieldNumber = 2; + private int limit_; + /// + /// Maximum of facet values that should be returned for this facet. If + /// unspecified, defaults to 50. The maximum allowed value is 300. Values + /// above 300 will be coerced to 300. + /// + /// If this field is negative, an INVALID_ARGUMENT is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Limit { + get { return limit_; } + set { + limit_ = value; + } + } + + /// Field number for the "excluded_filter_keys" field. + public const int ExcludedFilterKeysFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_excludedFilterKeys_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField excludedFilterKeys_ = new pbc::RepeatedField(); + /// + /// List of keys to exclude when faceting. + /// + /// By default, + /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] + /// is not excluded from the filter unless it is listed in this field. + /// + /// Listing a facet key in this field allows its values to appear as facet + /// results, even when they are filtered out of search results. Using this + /// field does not affect what search results are returned. + /// + /// For example, suppose there are 100 products with the color facet "Red" + /// and 200 products with the color facet "Blue". A query containing the + /// filter "colorFamilies:ANY("Red")" and having "colorFamilies" as + /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] + /// would by default return only "Red" products in the search results, and + /// also return "Red" with count 100 as the only color facet. Although there + /// are also blue products available, "Blue" would not be shown as an + /// available facet value. + /// + /// If "colorFamilies" is listed in "excludedFilterKeys", then the query + /// returns the facet values "Red" with count 100 and "Blue" with count + /// 200, because the "colorFamilies" key is now excluded from the filter. + /// Because this field doesn't affect search results, the search results + /// are still correctly filtered to return only "Red" products. + /// + /// A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error + /// is returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ExcludedFilterKeys { + get { return excludedFilterKeys_; } + } + + /// Field number for the "enable_dynamic_position" field. + public const int EnableDynamicPositionFieldNumber = 4; + private bool enableDynamicPosition_; + /// + /// Enables dynamic position for this facet. If set to true, the position of + /// this facet among all facets in the response is determined by Google + /// Retail Search. It is ordered together with dynamic facets if dynamic + /// facets is enabled. If set to false, the position of this facet in the + /// response is the same as in the request, and it is ranked before + /// the facets with dynamic position enable and all dynamic facets. + /// + /// For example, you may always want to have rating facet returned in + /// the response, but it's not necessarily to always display the rating facet + /// at the top. In that case, you can set enable_dynamic_position to true so + /// that the position of rating facet in response is determined by + /// Google Retail Search. + /// + /// Another example, assuming you have the following facets in the request: + /// + /// * "rating", enable_dynamic_position = true + /// + /// * "price", enable_dynamic_position = false + /// + /// * "brands", enable_dynamic_position = false + /// + /// And also you have a dynamic facets enable, which generates a facet + /// "gender". Then, the final order of the facets in the response can be + /// ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + /// "rating") depends on how Google Retail Search orders "gender" and + /// "rating" facets. However, notice that "price" and "brands" are always + /// ranked at first and second position because their enable_dynamic_position + /// values are false. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool EnableDynamicPosition { + get { return enableDynamicPosition_; } + set { + enableDynamicPosition_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FacetSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FacetSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(FacetKey, other.FacetKey)) return false; + if (Limit != other.Limit) return false; + if(!excludedFilterKeys_.Equals(other.excludedFilterKeys_)) return false; + if (EnableDynamicPosition != other.EnableDynamicPosition) 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 (facetKey_ != null) hash ^= FacetKey.GetHashCode(); + if (Limit != 0) hash ^= Limit.GetHashCode(); + hash ^= excludedFilterKeys_.GetHashCode(); + if (EnableDynamicPosition != false) hash ^= EnableDynamicPosition.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 (facetKey_ != null) { + output.WriteRawTag(10); + output.WriteMessage(FacetKey); + } + if (Limit != 0) { + output.WriteRawTag(16); + output.WriteInt32(Limit); + } + excludedFilterKeys_.WriteTo(output, _repeated_excludedFilterKeys_codec); + if (EnableDynamicPosition != false) { + output.WriteRawTag(32); + output.WriteBool(EnableDynamicPosition); + } + 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 (facetKey_ != null) { + output.WriteRawTag(10); + output.WriteMessage(FacetKey); + } + if (Limit != 0) { + output.WriteRawTag(16); + output.WriteInt32(Limit); + } + excludedFilterKeys_.WriteTo(ref output, _repeated_excludedFilterKeys_codec); + if (EnableDynamicPosition != false) { + output.WriteRawTag(32); + output.WriteBool(EnableDynamicPosition); + } + 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 (facetKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FacetKey); + } + if (Limit != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit); + } + size += excludedFilterKeys_.CalculateSize(_repeated_excludedFilterKeys_codec); + if (EnableDynamicPosition != 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(FacetSpec other) { + if (other == null) { + return; + } + if (other.facetKey_ != null) { + if (facetKey_ == null) { + FacetKey = new global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey(); + } + FacetKey.MergeFrom(other.FacetKey); + } + if (other.Limit != 0) { + Limit = other.Limit; + } + excludedFilterKeys_.Add(other.excludedFilterKeys_); + if (other.EnableDynamicPosition != false) { + EnableDynamicPosition = other.EnableDynamicPosition; + } + _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 (facetKey_ == null) { + FacetKey = new global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey(); + } + input.ReadMessage(FacetKey); + break; + } + case 16: { + Limit = input.ReadInt32(); + break; + } + case 26: { + excludedFilterKeys_.AddEntriesFrom(input, _repeated_excludedFilterKeys_codec); + break; + } + case 32: { + EnableDynamicPosition = 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: { + if (facetKey_ == null) { + FacetKey = new global::Google.Cloud.Retail.V2.SearchRequest.Types.FacetSpec.Types.FacetKey(); + } + input.ReadMessage(FacetKey); + break; + } + case 16: { + Limit = input.ReadInt32(); + break; + } + case 26: { + excludedFilterKeys_.AddEntriesFrom(ref input, _repeated_excludedFilterKeys_codec); + break; + } + case 32: { + EnableDynamicPosition = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the FacetSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Specifies how a facet is computed. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FacetKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FacetKey()); + 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.SearchRequest.Types.FacetSpec.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 FacetKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetKey(FacetKey other) : this() { + key_ = other.key_; + intervals_ = other.intervals_.Clone(); + restrictedValues_ = other.restrictedValues_.Clone(); + prefixes_ = other.prefixes_.Clone(); + contains_ = other.contains_.Clone(); + caseInsensitive_ = other.caseInsensitive_; + orderBy_ = other.orderBy_; + query_ = other.query_; + returnMinMax_ = other.returnMinMax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetKey Clone() { + return new FacetKey(this); + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private string key_ = ""; + /// + /// Required. Supported textual and numerical facet keys in + /// [Product][google.cloud.retail.v2.Product] object, over which the facet + /// values are computed. Facet key is case-sensitive. + /// + /// Allowed facet keys when + /// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query] + /// is not specified: + /// + /// * textual_field = + /// * "brands" + /// * "categories" + /// * "genders" + /// * "ageGroups" + /// * "availability" + /// * "colorFamilies" + /// * "colors" + /// * "sizes" + /// * "materials" + /// * "patterns" + /// * "conditions" + /// * "attributes.key" + /// * "pickupInStore" + /// * "shipToStore" + /// * "sameDayDelivery" + /// * "nextDayDelivery" + /// * "customFulfillment1" + /// * "customFulfillment2" + /// * "customFulfillment3" + /// * "customFulfillment4" + /// * "customFulfillment5" + /// * "inventory(place_id,attributes.key)" + /// + /// * numerical_field = + /// * "price" + /// * "discount" + /// * "rating" + /// * "ratingCount" + /// * "attributes.key" + /// * "inventory(place_id,price)" + /// * "inventory(place_id,original_price)" + /// * "inventory(place_id,attributes.key)" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "intervals" field. + public const int IntervalsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_intervals_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.Interval.Parser); + private readonly pbc::RepeatedField intervals_ = new pbc::RepeatedField(); + /// + /// 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 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 become the bounds + /// for its intervals and are returned in the response. If the + /// facet key intervals are specified in the request, then the specified + /// intervals are returned instead. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Intervals { + get { return intervals_; } + } + + /// Field number for the "restricted_values" field. + public const int RestrictedValuesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_restrictedValues_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField restrictedValues_ = new pbc::RepeatedField(); + /// + /// Only get facet for the given restricted values. For example, when using + /// "pickupInStore" as key and set restricted values to + /// ["store123", "store456"], only facets for "store123" and "store456" are + /// returned. Only supported on predefined textual fields, custom textual + /// attributes and fulfillments. Maximum is 20. + /// + /// Must be set for the fulfillment facet keys: + /// + /// * pickupInStore + /// + /// * shipToStore + /// + /// * sameDayDelivery + /// + /// * nextDayDelivery + /// + /// * customFulfillment1 + /// + /// * customFulfillment2 + /// + /// * customFulfillment3 + /// + /// * customFulfillment4 + /// + /// * customFulfillment5 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RestrictedValues { + get { return restrictedValues_; } + } + + /// Field number for the "prefixes" field. + public const int PrefixesFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_prefixes_codec + = pb::FieldCodec.ForString(66); + private readonly pbc::RepeatedField prefixes_ = new pbc::RepeatedField(); + /// + /// Only get facet values that start with the given string prefix. For + /// example, suppose "categories" has three values "Women > Shoe", + /// "Women > Dress" and "Men > Shoe". If set "prefixes" to "Women", the + /// "categories" facet gives only "Women > Shoe" and "Women > Dress". + /// Only supported on textual fields. Maximum is 10. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Prefixes { + get { return prefixes_; } + } + + /// Field number for the "contains" field. + public const int ContainsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_contains_codec + = pb::FieldCodec.ForString(74); + private readonly pbc::RepeatedField contains_ = new pbc::RepeatedField(); + /// + /// Only get facet values that contains the given strings. For example, + /// suppose "categories" has three values "Women > Shoe", + /// "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the + /// "categories" facet gives only "Women > Shoe" and "Men > Shoe". + /// Only supported on textual fields. Maximum is 10. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Contains { + get { return contains_; } + } + + /// Field number for the "case_insensitive" field. + public const int CaseInsensitiveFieldNumber = 10; + private bool caseInsensitive_; + /// + /// True to make facet keys case insensitive when getting faceting + /// values with prefixes or contains; false otherwise. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CaseInsensitive { + get { return caseInsensitive_; } + set { + caseInsensitive_ = value; + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 4; + private string orderBy_ = ""; + /// + /// The order in which + /// [SearchResponse.Facet.values][google.cloud.retail.v2.SearchResponse.Facet.values] + /// are returned. + /// + /// Allowed values are: + /// + /// * "count desc", which means order by + /// [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] + /// descending. + /// + /// * "value desc", which means order by + /// [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] + /// descending. + /// Only applies to textual facets. + /// + /// If not set, textual values are sorted in [natural + /// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + /// intervals are sorted in the order given by + /// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals]; + /// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids] + /// are sorted in the order given by + /// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.restricted_values]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "query" field. + public const int QueryFieldNumber = 5; + private string query_ = ""; + /// + /// The query that is used to compute facet for the given facet key. + /// When provided, it overrides the default behavior of facet + /// computation. The query syntax is the same as a filter expression. See + /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for + /// detail syntax and limitations. Notice that there is no limitation on + /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] + /// when query is specified. + /// + /// In the response, + /// [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] + /// is always "1" and + /// [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] + /// is the number of results that match the query. + /// + /// For example, you can set a customized facet for "shipToStore", + /// where + /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] + /// is "customizedShipToStore", and + /// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query] + /// is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". + /// Then the facet counts the products that are both in stock and ship + /// to store "123". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Query { + get { return query_; } + set { + query_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "return_min_max" field. + public const int ReturnMinMaxFieldNumber = 11; + private bool returnMinMax_; + /// + /// Returns the min and max value for each numerical facet intervals. + /// Ignored for textual facets. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ReturnMinMax { + get { return returnMinMax_; } + set { + returnMinMax_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FacetKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FacetKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Key != other.Key) return false; + if(!intervals_.Equals(other.intervals_)) return false; + if(!restrictedValues_.Equals(other.restrictedValues_)) return false; + if(!prefixes_.Equals(other.prefixes_)) return false; + if(!contains_.Equals(other.contains_)) return false; + if (CaseInsensitive != other.CaseInsensitive) return false; + if (OrderBy != other.OrderBy) return false; + if (Query != other.Query) return false; + if (ReturnMinMax != other.ReturnMinMax) 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 (Key.Length != 0) hash ^= Key.GetHashCode(); + hash ^= intervals_.GetHashCode(); + hash ^= restrictedValues_.GetHashCode(); + hash ^= prefixes_.GetHashCode(); + hash ^= contains_.GetHashCode(); + if (CaseInsensitive != false) hash ^= CaseInsensitive.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); + if (Query.Length != 0) hash ^= Query.GetHashCode(); + if (ReturnMinMax != false) hash ^= ReturnMinMax.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 (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + intervals_.WriteTo(output, _repeated_intervals_codec); + restrictedValues_.WriteTo(output, _repeated_restrictedValues_codec); + if (OrderBy.Length != 0) { + output.WriteRawTag(34); + output.WriteString(OrderBy); + } + if (Query.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Query); + } + prefixes_.WriteTo(output, _repeated_prefixes_codec); + contains_.WriteTo(output, _repeated_contains_codec); + if (CaseInsensitive != false) { + output.WriteRawTag(80); + output.WriteBool(CaseInsensitive); + } + if (ReturnMinMax != false) { + output.WriteRawTag(88); + output.WriteBool(ReturnMinMax); + } + 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 (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + intervals_.WriteTo(ref output, _repeated_intervals_codec); + restrictedValues_.WriteTo(ref output, _repeated_restrictedValues_codec); + if (OrderBy.Length != 0) { + output.WriteRawTag(34); + output.WriteString(OrderBy); + } + if (Query.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Query); + } + prefixes_.WriteTo(ref output, _repeated_prefixes_codec); + contains_.WriteTo(ref output, _repeated_contains_codec); + if (CaseInsensitive != false) { + output.WriteRawTag(80); + output.WriteBool(CaseInsensitive); + } + if (ReturnMinMax != false) { + output.WriteRawTag(88); + output.WriteBool(ReturnMinMax); + } + 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 (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + size += intervals_.CalculateSize(_repeated_intervals_codec); + size += restrictedValues_.CalculateSize(_repeated_restrictedValues_codec); + size += prefixes_.CalculateSize(_repeated_prefixes_codec); + size += contains_.CalculateSize(_repeated_contains_codec); + if (CaseInsensitive != false) { + size += 1 + 1; + } + if (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (Query.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Query); + } + if (ReturnMinMax != 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(FacetKey other) { + if (other == null) { + return; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + intervals_.Add(other.intervals_); + restrictedValues_.Add(other.restrictedValues_); + prefixes_.Add(other.prefixes_); + contains_.Add(other.contains_); + if (other.CaseInsensitive != false) { + CaseInsensitive = other.CaseInsensitive; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + if (other.Query.Length != 0) { + Query = other.Query; + } + if (other.ReturnMinMax != false) { + ReturnMinMax = other.ReturnMinMax; + } + _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: { + Key = input.ReadString(); + break; + } + case 18: { + intervals_.AddEntriesFrom(input, _repeated_intervals_codec); + break; + } + case 26: { + restrictedValues_.AddEntriesFrom(input, _repeated_restrictedValues_codec); + break; + } + case 34: { + OrderBy = input.ReadString(); + break; + } + case 42: { + Query = input.ReadString(); + break; + } + case 66: { + prefixes_.AddEntriesFrom(input, _repeated_prefixes_codec); + break; + } + case 74: { + contains_.AddEntriesFrom(input, _repeated_contains_codec); + break; + } + case 80: { + CaseInsensitive = input.ReadBool(); + break; + } + case 88: { + ReturnMinMax = 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: { + Key = input.ReadString(); + break; + } + case 18: { + intervals_.AddEntriesFrom(ref input, _repeated_intervals_codec); + break; + } + case 26: { + restrictedValues_.AddEntriesFrom(ref input, _repeated_restrictedValues_codec); + break; + } + case 34: { + OrderBy = input.ReadString(); + break; + } + case 42: { + Query = input.ReadString(); + break; + } + case 66: { + prefixes_.AddEntriesFrom(ref input, _repeated_prefixes_codec); + break; + } + case 74: { + contains_.AddEntriesFrom(ref input, _repeated_contains_codec); + break; + } + case 80: { + CaseInsensitive = input.ReadBool(); + break; + } + case 88: { + ReturnMinMax = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// The specifications of dynamically generated facets. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DynamicFacetSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DynamicFacetSpec()); + 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.SearchRequest.Descriptor.NestedTypes[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 DynamicFacetSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DynamicFacetSpec(DynamicFacetSpec other) : this() { + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DynamicFacetSpec Clone() { + return new DynamicFacetSpec(this); + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode mode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified; + /// + /// Mode of the DynamicFacet feature. + /// Defaults to + /// [Mode.DISABLED][google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode.DISABLED] + /// if it's unset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DynamicFacetSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DynamicFacetSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Mode != other.Mode) 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) hash ^= Mode.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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DynamicFacetSpec other) { + if (other == null) { + return; + } + if (other.Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { + Mode = other.Mode; + } + _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 8: { + Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode) input.ReadEnum(); + 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 8: { + Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the DynamicFacetSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Enum to control DynamicFacet mode + /// + public enum Mode { + /// + /// Default value. + /// + [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Disable Dynamic Facet. + /// + [pbr::OriginalName("DISABLED")] Disabled = 1, + /// + /// Automatic mode built by Google Retail Search. + /// + [pbr::OriginalName("ENABLED")] Enabled = 2, + } + + } + #endregion + + } + + /// + /// Boost specification to boost certain items. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BoostSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoostSpec()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [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.SearchRequest.Descriptor.NestedTypes[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 BoostSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BoostSpec(BoostSpec other) : this() { + _hasBits0 = other._hasBits0; + conditionBoostSpecs_ = other.conditionBoostSpecs_.Clone(); + skipBoostSpecValidation_ = other.skipBoostSpecValidation_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BoostSpec Clone() { + return new BoostSpec(this); + } + + /// Field number for the "condition_boost_specs" field. + public const int ConditionBoostSpecsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_conditionBoostSpecs_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec.Parser); + private readonly pbc::RepeatedField conditionBoostSpecs_ = new pbc::RepeatedField(); + /// + /// Condition boost specifications. If a product matches multiple conditions + /// in the specifictions, boost scores from these specifications are all + /// applied and combined in a non-linear way. Maximum number of + /// specifications is 20. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ConditionBoostSpecs { + get { return conditionBoostSpecs_; } + } + + /// Field number for the "skip_boost_spec_validation" field. + public const int SkipBoostSpecValidationFieldNumber = 2; + private readonly static bool SkipBoostSpecValidationDefaultValue = false; + + private bool skipBoostSpecValidation_; + /// + /// Whether to skip boostspec validation. If this field is set to true, + /// invalid + /// [BoostSpec.condition_boost_specs][google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs] + /// will be ignored and valid + /// [BoostSpec.condition_boost_specs][google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs] + /// will still be applied. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool SkipBoostSpecValidation { + get { if ((_hasBits0 & 1) != 0) { return skipBoostSpecValidation_; } else { return SkipBoostSpecValidationDefaultValue; } } + set { + _hasBits0 |= 1; + skipBoostSpecValidation_ = value; + } + } + /// Gets whether the "skip_boost_spec_validation" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSkipBoostSpecValidation { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "skip_boost_spec_validation" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSkipBoostSpecValidation() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BoostSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BoostSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!conditionBoostSpecs_.Equals(other.conditionBoostSpecs_)) return false; + if (SkipBoostSpecValidation != other.SkipBoostSpecValidation) 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 ^= conditionBoostSpecs_.GetHashCode(); + if (HasSkipBoostSpecValidation) hash ^= SkipBoostSpecValidation.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 + conditionBoostSpecs_.WriteTo(output, _repeated_conditionBoostSpecs_codec); + if (HasSkipBoostSpecValidation) { + output.WriteRawTag(16); + output.WriteBool(SkipBoostSpecValidation); + } + 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) { + conditionBoostSpecs_.WriteTo(ref output, _repeated_conditionBoostSpecs_codec); + if (HasSkipBoostSpecValidation) { + output.WriteRawTag(16); + output.WriteBool(SkipBoostSpecValidation); + } + 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 += conditionBoostSpecs_.CalculateSize(_repeated_conditionBoostSpecs_codec); + if (HasSkipBoostSpecValidation) { + 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(BoostSpec other) { + if (other == null) { + return; + } + conditionBoostSpecs_.Add(other.conditionBoostSpecs_); + if (other.HasSkipBoostSpecValidation) { + SkipBoostSpecValidation = other.SkipBoostSpecValidation; + } + _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: { + conditionBoostSpecs_.AddEntriesFrom(input, _repeated_conditionBoostSpecs_codec); + break; + } + case 16: { + SkipBoostSpecValidation = 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: { + conditionBoostSpecs_.AddEntriesFrom(ref input, _repeated_conditionBoostSpecs_codec); + break; + } + case 16: { + SkipBoostSpecValidation = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the BoostSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Boost applies to products which match a condition. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConditionBoostSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConditionBoostSpec()); + 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.SearchRequest.Types.BoostSpec.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 ConditionBoostSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConditionBoostSpec(ConditionBoostSpec other) : this() { + condition_ = other.condition_; + boost_ = other.boost_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConditionBoostSpec Clone() { + return new ConditionBoostSpec(this); + } + + /// Field number for the "condition" field. + public const int ConditionFieldNumber = 1; + private string condition_ = ""; + /// + /// An expression which specifies a boost condition. The syntax and + /// supported fields are the same as a filter expression. See /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - /// detail syntax and limitations. Notice that there is no limitation on - /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] - /// when query is specified. + /// detail syntax and limitations. /// - /// In the response, - /// [SearchResponse.Facet.values.value][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.value] - /// is always "1" and - /// [SearchResponse.Facet.values.count][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.count] - /// is the number of results that match the query. + /// Examples: /// - /// For example, you can set a customized facet for "shipToStore", - /// where - /// [FacetKey.key][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.key] - /// is "customizedShipToStore", and - /// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query] - /// is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")". - /// Then the facet counts the products that are both in stock and ship - /// to store "123". + /// * To boost products with product ID "product_1" or "product_2", and + /// color + /// "Red" or "Blue": + /// * (id: ANY("product_1", "product_2")) AND (colorFamilies: + /// ANY("Red","Blue")) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Condition { + get { return condition_; } + set { + condition_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "boost" field. + public const int BoostFieldNumber = 2; + private float boost_; + /// + /// Strength of the condition boost, which should be in [-1, 1]. Negative + /// boost means demotion. Default is 0.0. + /// + /// Setting to 1.0 gives the item a big promotion. However, it does not + /// necessarily mean that the boosted item will be the top result at all + /// times, nor that other items will be excluded. Results could still be + /// shown even when none of them matches the condition. And results that + /// are significantly more relevant to the search query can still trump + /// your heavily favored but irrelevant items. + /// + /// Setting to -1.0 gives the item a big demotion. However, results that + /// are deeply relevant might still be shown. The item will have an + /// upstream battle to get a fairly high ranking, but it is not blocked out + /// completely. + /// + /// Setting to 0.0 means no boost applied. The boosting condition is + /// ignored. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Boost { + get { return boost_; } + set { + boost_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConditionBoostSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConditionBoostSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Condition != other.Condition) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Boost, other.Boost)) 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 (Condition.Length != 0) hash ^= Condition.GetHashCode(); + if (Boost != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Boost); + 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 (Condition.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Condition); + } + if (Boost != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Boost); + } + 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 (Condition.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Condition); + } + if (Boost != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Boost); + } + 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 (Condition.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Condition); + } + if (Boost != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConditionBoostSpec other) { + if (other == null) { + return; + } + if (other.Condition.Length != 0) { + Condition = other.Condition; + } + if (other.Boost != 0F) { + Boost = other.Boost; + } + _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: { + Condition = input.ReadString(); + break; + } + case 21: { + Boost = input.ReadFloat(); + 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: { + Condition = input.ReadString(); + break; + } + case 21: { + Boost = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Specification to determine under which conditions query expansion should + /// occur. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class QueryExpansionSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueryExpansionSpec()); + 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.SearchRequest.Descriptor.NestedTypes[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 QueryExpansionSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryExpansionSpec(QueryExpansionSpec other) : this() { + condition_ = other.condition_; + pinUnexpandedResults_ = other.pinUnexpandedResults_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueryExpansionSpec Clone() { + return new QueryExpansionSpec(this); + } + + /// Field number for the "condition" field. + public const int ConditionFieldNumber = 1; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition condition_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified; + /// + /// The condition under which query expansion should occur. Default to + /// [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition Condition { + get { return condition_; } + set { + condition_ = value; + } + } + + /// Field number for the "pin_unexpanded_results" field. + public const int PinUnexpandedResultsFieldNumber = 2; + private bool pinUnexpandedResults_; + /// + /// Whether to pin unexpanded results. If this field is set to true, + /// unexpanded products are always at the top of the search results, followed + /// by the expanded results. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool PinUnexpandedResults { + get { return pinUnexpandedResults_; } + set { + pinUnexpandedResults_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as QueryExpansionSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(QueryExpansionSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Condition != other.Condition) return false; + if (PinUnexpandedResults != other.PinUnexpandedResults) 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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) hash ^= Condition.GetHashCode(); + if (PinUnexpandedResults != false) hash ^= PinUnexpandedResults.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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Condition); + } + if (PinUnexpandedResults != false) { + output.WriteRawTag(16); + output.WriteBool(PinUnexpandedResults); + } + 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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Condition); + } + if (PinUnexpandedResults != false) { + output.WriteRawTag(16); + output.WriteBool(PinUnexpandedResults); + } + 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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Condition); + } + if (PinUnexpandedResults != 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(QueryExpansionSpec other) { + if (other == null) { + return; + } + if (other.Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { + Condition = other.Condition; + } + if (other.PinUnexpandedResults != false) { + PinUnexpandedResults = other.PinUnexpandedResults; + } + _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 8: { + Condition = (global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition) input.ReadEnum(); + break; + } + case 16: { + PinUnexpandedResults = 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 8: { + Condition = (global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition) input.ReadEnum(); + break; + } + case 16: { + PinUnexpandedResults = input.ReadBool(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the QueryExpansionSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Enum describing under which condition query expansion should occur. + /// + public enum Condition { + /// + /// Unspecified query expansion condition. In this case, server behavior + /// defaults to + /// [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + /// + [pbr::OriginalName("CONDITION_UNSPECIFIED")] Unspecified = 0, + /// + /// Disabled query expansion. Only the exact search query is used, even if + /// [SearchResponse.total_size][google.cloud.retail.v2.SearchResponse.total_size] + /// is zero. + /// + [pbr::OriginalName("DISABLED")] Disabled = 1, + /// + /// Automatic query expansion built by Google Retail Search. + /// + [pbr::OriginalName("AUTO")] Auto = 3, + } + + } + #endregion + + } + + /// + /// The specification for personalization. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PersonalizationSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PersonalizationSpec()); + 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.SearchRequest.Descriptor.NestedTypes[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 PersonalizationSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PersonalizationSpec(PersonalizationSpec other) : this() { + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PersonalizationSpec Clone() { + return new PersonalizationSpec(this); + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode mode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified; + /// + /// Defaults to + /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PersonalizationSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PersonalizationSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Mode != other.Mode) 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) hash ^= Mode.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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PersonalizationSpec other) { + if (other == null) { + return; + } + if (other.Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { + Mode = other.Mode; + } + _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 8: { + Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode) input.ReadEnum(); + 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 8: { + Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the PersonalizationSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The personalization mode of each search request. + /// + public enum Mode { + /// + /// Default value. In this case, server behavior defaults to + /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. + /// + [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Let CRS decide whether to use personalization based on quality of user + /// event data. + /// + [pbr::OriginalName("AUTO")] Auto = 1, + /// + /// Disable personalization. + /// + [pbr::OriginalName("DISABLED")] Disabled = 2, + } + + } + #endregion + + } + + /// + /// The specification for query spell correction. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SpellCorrectionSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SpellCorrectionSpec()); + 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.SearchRequest.Descriptor.NestedTypes[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 SpellCorrectionSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SpellCorrectionSpec(SpellCorrectionSpec other) : this() { + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SpellCorrectionSpec Clone() { + return new SpellCorrectionSpec(this); + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 1; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode mode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified; + /// + /// The mode under which spell correction should take effect to + /// replace the original search query. Default to + /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SpellCorrectionSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SpellCorrectionSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Mode != other.Mode) 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) hash ^= Mode.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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) Mode); + } + 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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SpellCorrectionSpec other) { + if (other == null) { + return; + } + if (other.Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { + Mode = other.Mode; + } + _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 8: { + Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode) input.ReadEnum(); + 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 8: { + Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the SpellCorrectionSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Enum describing under which mode spell correction should occur. + /// + public enum Mode { + /// + /// Unspecified spell correction mode. In this case, server behavior + /// defaults to + /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + /// + [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, + /// + /// Google Retail Search will try to find a spell suggestion if there + /// is any and put in the + /// [SearchResponse.corrected_query][google.cloud.retail.v2.SearchResponse.corrected_query]. + /// The spell suggestion will not be used as the search query. + /// + [pbr::OriginalName("SUGGESTION_ONLY")] SuggestionOnly = 1, + /// + /// Automatic spell correction built by Google Retail Search. Search will + /// be based on the corrected query if found. + /// + [pbr::OriginalName("AUTO")] Auto = 2, + } + + } + #endregion + + } + + /// + /// This field specifies all conversational related parameters addition to + /// traditional retail search. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConversationalSearchSpec : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConversationalSearchSpec()); + 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.SearchRequest.Descriptor.NestedTypes[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 ConversationalSearchSpec() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConversationalSearchSpec(ConversationalSearchSpec other) : this() { + followupConversationRequested_ = other.followupConversationRequested_; + conversationId_ = other.conversationId_; + userAnswer_ = other.userAnswer_ != null ? other.userAnswer_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConversationalSearchSpec Clone() { + return new ConversationalSearchSpec(this); + } + + /// Field number for the "followup_conversation_requested" field. + public const int FollowupConversationRequestedFieldNumber = 1; + private bool followupConversationRequested_; + /// + /// This field specifies whether the customer would like to do conversational + /// search. If this field is set to true, conversational related extra + /// information will be returned from server side, including follow-up + /// question, answer options, etc. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FollowupConversationRequested { + get { return followupConversationRequested_; } + set { + followupConversationRequested_ = value; + } + } + + /// Field number for the "conversation_id" field. + public const int ConversationIdFieldNumber = 2; + private string conversationId_ = ""; + /// + /// This field specifies the conversation id, which maintains the state of + /// the conversation between client side and server side. Use the value from + /// the previous [ConversationalSearchResult.conversation_id][]. For the + /// initial request, this should be empty. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ConversationId { + get { return conversationId_; } + set { + conversationId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "user_answer" field. + public const int UserAnswerFieldNumber = 3; + private global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer userAnswer_; + /// + /// This field specifies the current user answer during the conversational + /// search. This can be either user selected from suggested answers or user + /// input plain text. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer UserAnswer { + get { return userAnswer_; } + set { + userAnswer_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ConversationalSearchSpec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConversationalSearchSpec other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FollowupConversationRequested != other.FollowupConversationRequested) return false; + if (ConversationId != other.ConversationId) return false; + if (!object.Equals(UserAnswer, other.UserAnswer)) 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 (FollowupConversationRequested != false) hash ^= FollowupConversationRequested.GetHashCode(); + if (ConversationId.Length != 0) hash ^= ConversationId.GetHashCode(); + if (userAnswer_ != null) hash ^= UserAnswer.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 (FollowupConversationRequested != false) { + output.WriteRawTag(8); + output.WriteBool(FollowupConversationRequested); + } + if (ConversationId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ConversationId); + } + if (userAnswer_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UserAnswer); + } + 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 (FollowupConversationRequested != false) { + output.WriteRawTag(8); + output.WriteBool(FollowupConversationRequested); + } + if (ConversationId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ConversationId); + } + if (userAnswer_ != null) { + output.WriteRawTag(26); + output.WriteMessage(UserAnswer); + } + 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 (FollowupConversationRequested != false) { + size += 1 + 1; + } + if (ConversationId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ConversationId); + } + if (userAnswer_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserAnswer); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConversationalSearchSpec other) { + if (other == null) { + return; + } + if (other.FollowupConversationRequested != false) { + FollowupConversationRequested = other.FollowupConversationRequested; + } + if (other.ConversationId.Length != 0) { + ConversationId = other.ConversationId; + } + if (other.userAnswer_ != null) { + if (userAnswer_ == null) { + UserAnswer = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer(); + } + UserAnswer.MergeFrom(other.UserAnswer); + } + _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 8: { + FollowupConversationRequested = input.ReadBool(); + break; + } + case 18: { + ConversationId = input.ReadString(); + break; + } + case 26: { + if (userAnswer_ == null) { + UserAnswer = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer(); + } + input.ReadMessage(UserAnswer); + 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 8: { + FollowupConversationRequested = input.ReadBool(); + break; + } + case 18: { + ConversationId = input.ReadString(); + break; + } + case 26: { + if (userAnswer_ == null) { + UserAnswer = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer(); + } + input.ReadMessage(UserAnswer); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ConversationalSearchSpec message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// This field specifies the current user answer during the conversational + /// search. This can be either user selected from suggested answers or user + /// input plain text. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserAnswer : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAnswer()); + 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.SearchRequest.Types.ConversationalSearchSpec.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 UserAnswer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAnswer(UserAnswer other) : this() { + switch (other.TypeCase) { + case TypeOneofCase.TextAnswer: + TextAnswer = other.TextAnswer; + break; + case TypeOneofCase.SelectedAnswer: + SelectedAnswer = other.SelectedAnswer.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAnswer Clone() { + return new UserAnswer(this); + } + + /// Field number for the "text_answer" field. + public const int TextAnswerFieldNumber = 1; + /// + /// This field specifies the incremental input text from the user during + /// the conversational search. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Query { - get { return query_; } + public string TextAnswer { + get { return HasTextAnswer ? (string) type_ : ""; } set { - query_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + typeCase_ = TypeOneofCase.TextAnswer; + } + } + /// Gets whether the "text_answer" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasTextAnswer { + get { return typeCase_ == TypeOneofCase.TextAnswer; } + } + /// Clears the value of the oneof if it's currently set to "text_answer" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearTextAnswer() { + if (HasTextAnswer) { + ClearType(); } } - /// Field number for the "return_min_max" field. - public const int ReturnMinMaxFieldNumber = 11; - private bool returnMinMax_; + /// Field number for the "selected_answer" field. + public const int SelectedAnswerFieldNumber = 2; /// - /// Returns the min and max value for each numerical facet intervals. - /// Ignored for textual facets. + /// This field specifies the selected attributes during the + /// conversational search. This should be a subset of + /// [ConversationalSearchResult.suggested_answers][]. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool ReturnMinMax { - get { return returnMinMax_; } + public global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer SelectedAnswer { + get { return typeCase_ == TypeOneofCase.SelectedAnswer ? (global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer) type_ : null; } set { - returnMinMax_ = value; + type_ = value; + typeCase_ = value == null ? TypeOneofCase.None : TypeOneofCase.SelectedAnswer; } } + private object type_; + /// Enum of possible cases for the "type" oneof. + public enum TypeOneofCase { + None = 0, + TextAnswer = 1, + SelectedAnswer = 2, + } + private TypeOneofCase typeCase_ = TypeOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TypeOneofCase TypeCase { + get { return typeCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearType() { + typeCase_ = TypeOneofCase.None; + type_ = null; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as FacetKey); + return Equals(other as UserAnswer); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(FacetKey other) { + public bool Equals(UserAnswer other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Key != other.Key) return false; - if(!intervals_.Equals(other.intervals_)) return false; - if(!restrictedValues_.Equals(other.restrictedValues_)) return false; - if(!prefixes_.Equals(other.prefixes_)) return false; - if(!contains_.Equals(other.contains_)) return false; - if (CaseInsensitive != other.CaseInsensitive) return false; - if (OrderBy != other.OrderBy) return false; - if (Query != other.Query) return false; - if (ReturnMinMax != other.ReturnMinMax) return false; + if (TextAnswer != other.TextAnswer) return false; + if (!object.Equals(SelectedAnswer, other.SelectedAnswer)) return false; + if (TypeCase != other.TypeCase) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2170,15 +5323,9 @@ public bool Equals(FacetKey other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Key.Length != 0) hash ^= Key.GetHashCode(); - hash ^= intervals_.GetHashCode(); - hash ^= restrictedValues_.GetHashCode(); - hash ^= prefixes_.GetHashCode(); - hash ^= contains_.GetHashCode(); - if (CaseInsensitive != false) hash ^= CaseInsensitive.GetHashCode(); - if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); - if (Query.Length != 0) hash ^= Query.GetHashCode(); - if (ReturnMinMax != false) hash ^= ReturnMinMax.GetHashCode(); + if (HasTextAnswer) hash ^= TextAnswer.GetHashCode(); + if (typeCase_ == TypeOneofCase.SelectedAnswer) hash ^= SelectedAnswer.GetHashCode(); + hash ^= (int) typeCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2197,29 +5344,13 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Key.Length != 0) { + if (HasTextAnswer) { output.WriteRawTag(10); - output.WriteString(Key); - } - intervals_.WriteTo(output, _repeated_intervals_codec); - restrictedValues_.WriteTo(output, _repeated_restrictedValues_codec); - if (OrderBy.Length != 0) { - output.WriteRawTag(34); - output.WriteString(OrderBy); - } - if (Query.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Query); - } - prefixes_.WriteTo(output, _repeated_prefixes_codec); - contains_.WriteTo(output, _repeated_contains_codec); - if (CaseInsensitive != false) { - output.WriteRawTag(80); - output.WriteBool(CaseInsensitive); + output.WriteString(TextAnswer); } - if (ReturnMinMax != false) { - output.WriteRawTag(88); - output.WriteBool(ReturnMinMax); + if (typeCase_ == TypeOneofCase.SelectedAnswer) { + output.WriteRawTag(18); + output.WriteMessage(SelectedAnswer); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -2231,29 +5362,13 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Key.Length != 0) { + if (HasTextAnswer) { output.WriteRawTag(10); - output.WriteString(Key); - } - intervals_.WriteTo(ref output, _repeated_intervals_codec); - restrictedValues_.WriteTo(ref output, _repeated_restrictedValues_codec); - if (OrderBy.Length != 0) { - output.WriteRawTag(34); - output.WriteString(OrderBy); - } - if (Query.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Query); - } - prefixes_.WriteTo(ref output, _repeated_prefixes_codec); - contains_.WriteTo(ref output, _repeated_contains_codec); - if (CaseInsensitive != false) { - output.WriteRawTag(80); - output.WriteBool(CaseInsensitive); + output.WriteString(TextAnswer); } - if (ReturnMinMax != false) { - output.WriteRawTag(88); - output.WriteBool(ReturnMinMax); + if (typeCase_ == TypeOneofCase.SelectedAnswer) { + output.WriteRawTag(18); + output.WriteMessage(SelectedAnswer); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -2265,24 +5380,11 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); - } - size += intervals_.CalculateSize(_repeated_intervals_codec); - size += restrictedValues_.CalculateSize(_repeated_restrictedValues_codec); - size += prefixes_.CalculateSize(_repeated_prefixes_codec); - size += contains_.CalculateSize(_repeated_contains_codec); - if (CaseInsensitive != false) { - size += 1 + 1; - } - if (OrderBy.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); - } - if (Query.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Query); + if (HasTextAnswer) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TextAnswer); } - if (ReturnMinMax != false) { - size += 1 + 1; + if (typeCase_ == TypeOneofCase.SelectedAnswer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SelectedAnswer); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -2292,78 +5394,48 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(FacetKey other) { + public void MergeFrom(UserAnswer other) { if (other == null) { - return; - } - if (other.Key.Length != 0) { - Key = other.Key; - } - intervals_.Add(other.intervals_); - restrictedValues_.Add(other.restrictedValues_); - prefixes_.Add(other.prefixes_); - contains_.Add(other.contains_); - if (other.CaseInsensitive != false) { - CaseInsensitive = other.CaseInsensitive; - } - if (other.OrderBy.Length != 0) { - OrderBy = other.OrderBy; - } - if (other.Query.Length != 0) { - Query = other.Query; - } - if (other.ReturnMinMax != false) { - ReturnMinMax = other.ReturnMinMax; - } - _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: { - Key = input.ReadString(); - break; - } - case 18: { - intervals_.AddEntriesFrom(input, _repeated_intervals_codec); - break; - } - case 26: { - restrictedValues_.AddEntriesFrom(input, _repeated_restrictedValues_codec); - break; - } - case 34: { - OrderBy = input.ReadString(); - break; - } - case 42: { - Query = input.ReadString(); - break; - } - case 66: { - prefixes_.AddEntriesFrom(input, _repeated_prefixes_codec); - break; + return; + } + switch (other.TypeCase) { + case TypeOneofCase.TextAnswer: + TextAnswer = other.TextAnswer; + break; + case TypeOneofCase.SelectedAnswer: + if (SelectedAnswer == null) { + SelectedAnswer = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer(); } - case 74: { - contains_.AddEntriesFrom(input, _repeated_contains_codec); + SelectedAnswer.MergeFrom(other.SelectedAnswer); + 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 80: { - CaseInsensitive = input.ReadBool(); + case 10: { + TextAnswer = input.ReadString(); break; } - case 88: { - ReturnMinMax = input.ReadBool(); + case 18: { + global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer subBuilder = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer(); + if (typeCase_ == TypeOneofCase.SelectedAnswer) { + subBuilder.MergeFrom(SelectedAnswer); + } + input.ReadMessage(subBuilder); + SelectedAnswer = subBuilder; break; } } @@ -2382,39 +5454,16 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - Key = input.ReadString(); + TextAnswer = input.ReadString(); break; } case 18: { - intervals_.AddEntriesFrom(ref input, _repeated_intervals_codec); - break; - } - case 26: { - restrictedValues_.AddEntriesFrom(ref input, _repeated_restrictedValues_codec); - break; - } - case 34: { - OrderBy = input.ReadString(); - break; - } - case 42: { - Query = input.ReadString(); - break; - } - case 66: { - prefixes_.AddEntriesFrom(ref input, _repeated_prefixes_codec); - break; - } - case 74: { - contains_.AddEntriesFrom(ref input, _repeated_contains_codec); - break; - } - case 80: { - CaseInsensitive = input.ReadBool(); - break; - } - case 88: { - ReturnMinMax = input.ReadBool(); + global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer subBuilder = new global::Google.Cloud.Retail.V2.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Types.SelectedAnswer(); + if (typeCase_ == TypeOneofCase.SelectedAnswer) { + subBuilder.MergeFrom(SelectedAnswer); + } + input.ReadMessage(subBuilder); + SelectedAnswer = subBuilder; break; } } @@ -2422,231 +5471,251 @@ public void MergeFrom(pb::CodedInputStream input) { } #endif - } - - } - #endregion - - } - - /// - /// The specifications of dynamically generated facets. - /// - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class DynamicFacetSpec : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DynamicFacetSpec()); - 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.SearchRequest.Descriptor.NestedTypes[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 DynamicFacetSpec() { - OnConstruction(); - } + #region Nested types + /// Container for nested types declared in the UserAnswer message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// This field specifies the selected answers during the conversational + /// search. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SelectedAnswer : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SelectedAnswer()); + 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.SearchRequest.Types.ConversationalSearchSpec.Types.UserAnswer.Descriptor.NestedTypes[0]; } + } - partial void OnConstruction(); + [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 DynamicFacetSpec(DynamicFacetSpec other) : this() { - mode_ = other.mode_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectedAnswer() { + OnConstruction(); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DynamicFacetSpec Clone() { - return new DynamicFacetSpec(this); - } + partial void OnConstruction(); - /// Field number for the "mode" field. - public const int ModeFieldNumber = 1; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode mode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified; - /// - /// Mode of the DynamicFacet feature. - /// Defaults to - /// [Mode.DISABLED][google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode.DISABLED] - /// if it's unset. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode Mode { - get { return mode_; } - set { - mode_ = value; - } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectedAnswer(SelectedAnswer other) : this() { + productAttributeValues_ = other.productAttributeValues_.Clone(); + productAttributeValue_ = other.productAttributeValue_ != null ? other.productAttributeValue_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as DynamicFacetSpec); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectedAnswer Clone() { + return new SelectedAnswer(this); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(DynamicFacetSpec other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Mode != other.Mode) return false; - return Equals(_unknownFields, other._unknownFields); - } + /// Field number for the "product_attribute_values" field. + public const int ProductAttributeValuesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_productAttributeValues_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.ProductAttributeValue.Parser); + private readonly pbc::RepeatedField productAttributeValues_ = new pbc::RepeatedField(); + /// + /// This field is deprecated and should not be set. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ProductAttributeValues { + get { return productAttributeValues_; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) hash ^= Mode.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } + /// Field number for the "product_attribute_value" field. + public const int ProductAttributeValueFieldNumber = 2; + private global::Google.Cloud.Retail.V2.ProductAttributeValue productAttributeValue_; + /// + /// This field specifies the selected answer which is a attribute + /// key-value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.ProductAttributeValue ProductAttributeValue { + get { return productAttributeValue_; } + set { + productAttributeValue_ = value; + } + } - [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 override bool Equals(object other) { + return Equals(other as SelectedAnswer); + } - [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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Mode); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SelectedAnswer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!productAttributeValues_.Equals(other.productAttributeValues_)) return false; + if (!object.Equals(ProductAttributeValue, other.ProductAttributeValue)) return false; + return Equals(_unknownFields, other._unknownFields); + } - #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 (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Mode); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= productAttributeValues_.GetHashCode(); + if (productAttributeValue_ != null) hash ^= ProductAttributeValue.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } + [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 MergeFrom(DynamicFacetSpec other) { - if (other == null) { - return; - } - if (other.Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode.Unspecified) { - Mode = other.Mode; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } + [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 + productAttributeValues_.WriteTo(output, _repeated_productAttributeValues_codec); + if (productAttributeValue_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ProductAttributeValue); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } - [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 8: { - Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode) input.ReadEnum(); - break; - } - } - } - #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) { + productAttributeValues_.WriteTo(ref output, _repeated_productAttributeValues_codec); + if (productAttributeValue_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ProductAttributeValue); + } + 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 += productAttributeValues_.CalculateSize(_repeated_productAttributeValues_codec); + if (productAttributeValue_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProductAttributeValue); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SelectedAnswer other) { + if (other == null) { + return; + } + productAttributeValues_.Add(other.productAttributeValues_); + if (other.productAttributeValue_ != null) { + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + ProductAttributeValue.MergeFrom(other.ProductAttributeValue); + } + _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: { + productAttributeValues_.AddEntriesFrom(input, _repeated_productAttributeValues_codec); + break; + } + case 18: { + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + input.ReadMessage(ProductAttributeValue); + 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: { + productAttributeValues_.AddEntriesFrom(ref input, _repeated_productAttributeValues_codec); + break; + } + case 18: { + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + input.ReadMessage(ProductAttributeValue); + 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 8: { - Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.DynamicFacetSpec.Types.Mode) input.ReadEnum(); - break; } + } - } - } - #endif + #endregion - #region Nested types - /// Container for nested types declared in the DynamicFacetSpec message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// Enum to control DynamicFacet mode - /// - public enum Mode { - /// - /// Default value. - /// - [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, - /// - /// Disable Dynamic Facet. - /// - [pbr::OriginalName("DISABLED")] Disabled = 1, - /// - /// Automatic mode built by Google Retail Search. - /// - [pbr::OriginalName("ENABLED")] Enabled = 2, } } @@ -2655,25 +5724,24 @@ public enum Mode { } /// - /// Boost specification to boost certain items. + /// This field specifies tile navigation related parameters. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class BoostSpec : pb::IMessage + public sealed partial class TileNavigationSpec : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoostSpec()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TileNavigationSpec()); private pb::UnknownFieldSet _unknownFields; - private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchRequest.Descriptor.NestedTypes[2]; } + get { return global::Google.Cloud.Retail.V2.SearchRequest.Descriptor.NestedTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2684,7 +5752,7 @@ public sealed partial class BoostSpec : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public BoostSpec() { + public TileNavigationSpec() { OnConstruction(); } @@ -2692,88 +5760,68 @@ public BoostSpec() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public BoostSpec(BoostSpec other) : this() { - _hasBits0 = other._hasBits0; - conditionBoostSpecs_ = other.conditionBoostSpecs_.Clone(); - skipBoostSpecValidation_ = other.skipBoostSpecValidation_; + public TileNavigationSpec(TileNavigationSpec other) : this() { + tileNavigationRequested_ = other.tileNavigationRequested_; + appliedTiles_ = other.appliedTiles_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public BoostSpec Clone() { - return new BoostSpec(this); + public TileNavigationSpec Clone() { + return new TileNavigationSpec(this); } - /// Field number for the "condition_boost_specs" field. - public const int ConditionBoostSpecsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_conditionBoostSpecs_codec - = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec.Parser); - private readonly pbc::RepeatedField conditionBoostSpecs_ = new pbc::RepeatedField(); + /// Field number for the "tile_navigation_requested" field. + public const int TileNavigationRequestedFieldNumber = 1; + private bool tileNavigationRequested_; /// - /// Condition boost specifications. If a product matches multiple conditions - /// in the specifictions, boost scores from these specifications are all - /// applied and combined in a non-linear way. Maximum number of - /// specifications is 20. + /// This field specifies whether the customer would like to request tile + /// navigation. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField ConditionBoostSpecs { - get { return conditionBoostSpecs_; } + public bool TileNavigationRequested { + get { return tileNavigationRequested_; } + set { + tileNavigationRequested_ = value; + } } - /// Field number for the "skip_boost_spec_validation" field. - public const int SkipBoostSpecValidationFieldNumber = 2; - private readonly static bool SkipBoostSpecValidationDefaultValue = false; - - private bool skipBoostSpecValidation_; + /// Field number for the "applied_tiles" field. + public const int AppliedTilesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_appliedTiles_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.Tile.Parser); + private readonly pbc::RepeatedField appliedTiles_ = new pbc::RepeatedField(); /// - /// Whether to skip boostspec validation. If this field is set to true, - /// invalid - /// [BoostSpec.condition_boost_specs][google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs] - /// will be ignored and valid - /// [BoostSpec.condition_boost_specs][google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs] - /// will still be applied. + /// This field specifies the tiles which are already clicked in client side. + /// NOTE: This field is not being used for filtering search products. Client + /// side should also put all the applied tiles in + /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter]. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool SkipBoostSpecValidation { - get { if ((_hasBits0 & 1) != 0) { return skipBoostSpecValidation_; } else { return SkipBoostSpecValidationDefaultValue; } } - set { - _hasBits0 |= 1; - skipBoostSpecValidation_ = value; - } - } - /// Gets whether the "skip_boost_spec_validation" field is set - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasSkipBoostSpecValidation { - get { return (_hasBits0 & 1) != 0; } - } - /// Clears the value of the "skip_boost_spec_validation" field - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearSkipBoostSpecValidation() { - _hasBits0 &= ~1; + public pbc::RepeatedField AppliedTiles { + get { return appliedTiles_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as BoostSpec); + return Equals(other as TileNavigationSpec); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(BoostSpec other) { + public bool Equals(TileNavigationSpec other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!conditionBoostSpecs_.Equals(other.conditionBoostSpecs_)) return false; - if (SkipBoostSpecValidation != other.SkipBoostSpecValidation) return false; + if (TileNavigationRequested != other.TileNavigationRequested) return false; + if(!appliedTiles_.Equals(other.appliedTiles_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2781,8 +5829,8 @@ public bool Equals(BoostSpec other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= conditionBoostSpecs_.GetHashCode(); - if (HasSkipBoostSpecValidation) hash ^= SkipBoostSpecValidation.GetHashCode(); + if (TileNavigationRequested != false) hash ^= TileNavigationRequested.GetHashCode(); + hash ^= appliedTiles_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2801,11 +5849,11 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - conditionBoostSpecs_.WriteTo(output, _repeated_conditionBoostSpecs_codec); - if (HasSkipBoostSpecValidation) { - output.WriteRawTag(16); - output.WriteBool(SkipBoostSpecValidation); + if (TileNavigationRequested != false) { + output.WriteRawTag(8); + output.WriteBool(TileNavigationRequested); } + appliedTiles_.WriteTo(output, _repeated_appliedTiles_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -2816,11 +5864,11 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - conditionBoostSpecs_.WriteTo(ref output, _repeated_conditionBoostSpecs_codec); - if (HasSkipBoostSpecValidation) { - output.WriteRawTag(16); - output.WriteBool(SkipBoostSpecValidation); + if (TileNavigationRequested != false) { + output.WriteRawTag(8); + output.WriteBool(TileNavigationRequested); } + appliedTiles_.WriteTo(ref output, _repeated_appliedTiles_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -2831,10 +5879,10 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += conditionBoostSpecs_.CalculateSize(_repeated_conditionBoostSpecs_codec); - if (HasSkipBoostSpecValidation) { + if (TileNavigationRequested != false) { size += 1 + 1; } + size += appliedTiles_.CalculateSize(_repeated_appliedTiles_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2843,14 +5891,14 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(BoostSpec other) { + public void MergeFrom(TileNavigationSpec other) { if (other == null) { return; } - conditionBoostSpecs_.Add(other.conditionBoostSpecs_); - if (other.HasSkipBoostSpecValidation) { - SkipBoostSpecValidation = other.SkipBoostSpecValidation; + if (other.TileNavigationRequested != false) { + TileNavigationRequested = other.TileNavigationRequested; } + appliedTiles_.Add(other.appliedTiles_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2866,12 +5914,12 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - conditionBoostSpecs_.AddEntriesFrom(input, _repeated_conditionBoostSpecs_codec); + case 8: { + TileNavigationRequested = input.ReadBool(); break; } - case 16: { - SkipBoostSpecValidation = input.ReadBool(); + case 18: { + appliedTiles_.AddEntriesFrom(input, _repeated_appliedTiles_codec); break; } } @@ -2889,12 +5937,12 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - conditionBoostSpecs_.AddEntriesFrom(ref input, _repeated_conditionBoostSpecs_codec); + case 8: { + TileNavigationRequested = input.ReadBool(); break; } - case 16: { - SkipBoostSpecValidation = input.ReadBool(); + case 18: { + appliedTiles_.AddEntriesFrom(ref input, _repeated_appliedTiles_codec); break; } } @@ -2902,568 +5950,705 @@ public void MergeFrom(pb::CodedInputStream input) { } #endif - #region Nested types - /// Container for nested types declared in the BoostSpec message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// Boost applies to products which match a condition. - /// - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class ConditionBoostSpec : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConditionBoostSpec()); - 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.SearchRequest.Types.BoostSpec.Descriptor.NestedTypes[0]; } - } + } + #endregion - [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 ConditionBoostSpec() { - OnConstruction(); - } + /// + /// Response message for + /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SearchResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SearchResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } - partial void OnConstruction(); + [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[4]; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ConditionBoostSpec(ConditionBoostSpec other) : this() { - condition_ = other.condition_; - boost_ = other.boost_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + [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 ConditionBoostSpec Clone() { - return new ConditionBoostSpec(this); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SearchResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SearchResponse(SearchResponse other) : this() { + results_ = other.results_.Clone(); + facets_ = other.facets_.Clone(); + totalSize_ = other.totalSize_; + correctedQuery_ = other.correctedQuery_; + attributionToken_ = other.attributionToken_; + nextPageToken_ = other.nextPageToken_; + queryExpansionInfo_ = other.queryExpansionInfo_ != null ? other.queryExpansionInfo_.Clone() : null; + redirectUri_ = other.redirectUri_; + appliedControls_ = other.appliedControls_.Clone(); + invalidConditionBoostSpecs_ = other.invalidConditionBoostSpecs_.Clone(); + experimentInfo_ = other.experimentInfo_.Clone(); + conversationalSearchResult_ = other.conversationalSearchResult_ != null ? other.conversationalSearchResult_.Clone() : null; + tileNavigationResult_ = other.tileNavigationResult_ != null ? other.tileNavigationResult_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SearchResponse Clone() { + return new SearchResponse(this); + } + + /// Field number for the "results" field. + public const int ResultsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_results_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult.Parser); + private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); + /// + /// A list of matched items. The order represents the ranking. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Results { + get { return results_; } + } - /// Field number for the "condition" field. - public const int ConditionFieldNumber = 1; - private string condition_ = ""; - /// - /// An expression which specifies a boost condition. The syntax and - /// supported fields are the same as a filter expression. See - /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter] for - /// detail syntax and limitations. - /// - /// Examples: - /// - /// * To boost products with product ID "product_1" or "product_2", and - /// color - /// "Red" or "Blue": - /// * (id: ANY("product_1", "product_2")) AND (colorFamilies: - /// ANY("Red","Blue")) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Condition { - get { return condition_; } - set { - condition_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + /// Field number for the "facets" field. + public const int FacetsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_facets_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Parser); + private readonly pbc::RepeatedField facets_ = new pbc::RepeatedField(); + /// + /// Results of facets requested by user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Facets { + get { return facets_; } + } - /// Field number for the "boost" field. - public const int BoostFieldNumber = 2; - private float boost_; - /// - /// Strength of the condition boost, which should be in [-1, 1]. Negative - /// boost means demotion. Default is 0.0. - /// - /// Setting to 1.0 gives the item a big promotion. However, it does not - /// necessarily mean that the boosted item will be the top result at all - /// times, nor that other items will be excluded. Results could still be - /// shown even when none of them matches the condition. And results that - /// are significantly more relevant to the search query can still trump - /// your heavily favored but irrelevant items. - /// - /// Setting to -1.0 gives the item a big demotion. However, results that - /// are deeply relevant might still be shown. The item will have an - /// upstream battle to get a fairly high ranking, but it is not blocked out - /// completely. - /// - /// Setting to 0.0 means no boost applied. The boosting condition is - /// ignored. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public float Boost { - get { return boost_; } - set { - boost_ = value; - } - } + /// Field number for the "total_size" field. + public const int TotalSizeFieldNumber = 3; + private int totalSize_; + /// + /// The estimated total count of matched items irrespective of pagination. The + /// count of [results][google.cloud.retail.v2.SearchResponse.results] returned + /// by pagination may be less than the + /// [total_size][google.cloud.retail.v2.SearchResponse.total_size] that + /// matches. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TotalSize { + get { return totalSize_; } + set { + totalSize_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as ConditionBoostSpec); - } + /// Field number for the "corrected_query" field. + public const int CorrectedQueryFieldNumber = 4; + private string correctedQuery_ = ""; + /// + /// Contains the spell corrected query, if found. If the spell correction type + /// is AUTOMATIC, then the search results are based on corrected_query. + /// Otherwise the original query is used for search. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CorrectedQuery { + get { return correctedQuery_; } + set { + correctedQuery_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ConditionBoostSpec other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Condition != other.Condition) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Boost, other.Boost)) return false; - return Equals(_unknownFields, other._unknownFields); - } + /// Field number for the "attribution_token" field. + public const int AttributionTokenFieldNumber = 5; + private string attributionToken_ = ""; + /// + /// A unique search token. This should be included in the + /// [UserEvent][google.cloud.retail.v2.UserEvent] logs resulting from this + /// search, which enables accurate attribution of search model performance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AttributionToken { + get { return attributionToken_; } + set { + attributionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Condition.Length != 0) hash ^= Condition.GetHashCode(); - if (Boost != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Boost); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 6; + private string nextPageToken_ = ""; + /// + /// A token that can be sent as + /// [SearchRequest.page_token][google.cloud.retail.v2.SearchRequest.page_token] + /// to retrieve the next page. If this field is omitted, there are no + /// subsequent pages. + /// + [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 string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } + /// Field number for the "query_expansion_info" field. + public const int QueryExpansionInfoFieldNumber = 7; + private global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo queryExpansionInfo_; + /// + /// Query expansion information for the returned results. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo QueryExpansionInfo { + get { return queryExpansionInfo_; } + set { + queryExpansionInfo_ = value; + } + } - [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 (Condition.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Condition); - } - if (Boost != 0F) { - output.WriteRawTag(21); - output.WriteFloat(Boost); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } + /// Field number for the "redirect_uri" field. + public const int RedirectUriFieldNumber = 10; + private string redirectUri_ = ""; + /// + /// The URI of a customer-defined redirect page. If redirect action is + /// triggered, no search is performed, and only + /// [redirect_uri][google.cloud.retail.v2.SearchResponse.redirect_uri] and + /// [attribution_token][google.cloud.retail.v2.SearchResponse.attribution_token] + /// are set in the response. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RedirectUri { + get { return redirectUri_; } + set { + redirectUri_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - #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 (Condition.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Condition); - } - if (Boost != 0F) { - output.WriteRawTag(21); - output.WriteFloat(Boost); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif + /// Field number for the "applied_controls" field. + public const int AppliedControlsFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_appliedControls_codec + = pb::FieldCodec.ForString(98); + private readonly pbc::RepeatedField appliedControls_ = new pbc::RepeatedField(); + /// + /// The fully qualified resource name of applied + /// [controls](https://cloud.google.com/retail/docs/serving-control-rules). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AppliedControls { + get { return appliedControls_; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Condition.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Condition); - } - if (Boost != 0F) { - size += 1 + 4; - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } + /// Field number for the "invalid_condition_boost_specs" field. + public const int InvalidConditionBoostSpecsFieldNumber = 14; + private static readonly pb::FieldCodec _repeated_invalidConditionBoostSpecs_codec + = pb::FieldCodec.ForMessage(114, global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec.Parser); + private readonly pbc::RepeatedField invalidConditionBoostSpecs_ = new pbc::RepeatedField(); + /// + /// The invalid + /// [SearchRequest.BoostSpec.condition_boost_specs][google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs] + /// that are not applied during serving. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField InvalidConditionBoostSpecs { + get { return invalidConditionBoostSpecs_; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ConditionBoostSpec other) { - if (other == null) { - return; - } - if (other.Condition.Length != 0) { - Condition = other.Condition; - } - if (other.Boost != 0F) { - Boost = other.Boost; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } + /// 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 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: { - Condition = input.ReadString(); - break; - } - case 21: { - Boost = input.ReadFloat(); - break; - } - } - } - #endif - } + /// Field number for the "conversational_search_result" field. + public const int ConversationalSearchResultFieldNumber = 18; + private global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult conversationalSearchResult_; + /// + /// This field specifies all related information that is needed on client + /// side for UI rendering of conversational retail search. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult ConversationalSearchResult { + get { return conversationalSearchResult_; } + set { + conversationalSearchResult_ = value; + } + } - #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: { - Condition = input.ReadString(); - break; - } - case 21: { - Boost = input.ReadFloat(); - break; - } - } - } - } - #endif + /// Field number for the "tile_navigation_result" field. + public const int TileNavigationResultFieldNumber = 19; + private global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult tileNavigationResult_; + /// + /// This field specifies all related information for tile navigation that will + /// be used in client side. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult TileNavigationResult { + get { return tileNavigationResult_; } + set { + tileNavigationResult_ = value; + } + } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SearchResponse); + } - } - #endregion + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SearchResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!results_.Equals(other.results_)) return false; + if(!facets_.Equals(other.facets_)) return false; + if (TotalSize != other.TotalSize) return false; + if (CorrectedQuery != other.CorrectedQuery) return false; + if (AttributionToken != other.AttributionToken) return false; + if (NextPageToken != other.NextPageToken) return false; + if (!object.Equals(QueryExpansionInfo, other.QueryExpansionInfo)) return false; + 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; + if (!object.Equals(ConversationalSearchResult, other.ConversationalSearchResult)) return false; + if (!object.Equals(TileNavigationResult, other.TileNavigationResult)) 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 ^= results_.GetHashCode(); + hash ^= facets_.GetHashCode(); + if (TotalSize != 0) hash ^= TotalSize.GetHashCode(); + if (CorrectedQuery.Length != 0) hash ^= CorrectedQuery.GetHashCode(); + if (AttributionToken.Length != 0) hash ^= AttributionToken.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + if (queryExpansionInfo_ != null) hash ^= QueryExpansionInfo.GetHashCode(); + if (RedirectUri.Length != 0) hash ^= RedirectUri.GetHashCode(); + hash ^= appliedControls_.GetHashCode(); + hash ^= invalidConditionBoostSpecs_.GetHashCode(); + hash ^= experimentInfo_.GetHashCode(); + if (conversationalSearchResult_ != null) hash ^= ConversationalSearchResult.GetHashCode(); + if (tileNavigationResult_ != null) hash ^= TileNavigationResult.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } + return hash; + } - /// - /// Specification to determine under which conditions query expansion should - /// occur. - /// - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class QueryExpansionSpec : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueryExpansionSpec()); - 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 override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Google.Cloud.Retail.V2.SearchRequest.Descriptor.NestedTypes[3]; } - } + [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 + results_.WriteTo(output, _repeated_results_codec); + facets_.WriteTo(output, _repeated_facets_codec); + if (TotalSize != 0) { + output.WriteRawTag(24); + output.WriteInt32(TotalSize); + } + if (CorrectedQuery.Length != 0) { + output.WriteRawTag(34); + output.WriteString(CorrectedQuery); + } + if (AttributionToken.Length != 0) { + output.WriteRawTag(42); + output.WriteString(AttributionToken); + } + if (NextPageToken.Length != 0) { + output.WriteRawTag(50); + output.WriteString(NextPageToken); + } + if (queryExpansionInfo_ != null) { + output.WriteRawTag(58); + output.WriteMessage(QueryExpansionInfo); + } + if (RedirectUri.Length != 0) { + output.WriteRawTag(82); + output.WriteString(RedirectUri); + } + appliedControls_.WriteTo(output, _repeated_appliedControls_codec); + invalidConditionBoostSpecs_.WriteTo(output, _repeated_invalidConditionBoostSpecs_codec); + experimentInfo_.WriteTo(output, _repeated_experimentInfo_codec); + if (conversationalSearchResult_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(ConversationalSearchResult); + } + if (tileNavigationResult_ != null) { + output.WriteRawTag(154, 1); + output.WriteMessage(TileNavigationResult); + } + 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) { + results_.WriteTo(ref output, _repeated_results_codec); + facets_.WriteTo(ref output, _repeated_facets_codec); + if (TotalSize != 0) { + output.WriteRawTag(24); + output.WriteInt32(TotalSize); + } + if (CorrectedQuery.Length != 0) { + output.WriteRawTag(34); + output.WriteString(CorrectedQuery); + } + if (AttributionToken.Length != 0) { + output.WriteRawTag(42); + output.WriteString(AttributionToken); + } + if (NextPageToken.Length != 0) { + output.WriteRawTag(50); + output.WriteString(NextPageToken); + } + if (queryExpansionInfo_ != null) { + output.WriteRawTag(58); + output.WriteMessage(QueryExpansionInfo); + } + if (RedirectUri.Length != 0) { + output.WriteRawTag(82); + output.WriteString(RedirectUri); + } + appliedControls_.WriteTo(ref output, _repeated_appliedControls_codec); + invalidConditionBoostSpecs_.WriteTo(ref output, _repeated_invalidConditionBoostSpecs_codec); + experimentInfo_.WriteTo(ref output, _repeated_experimentInfo_codec); + if (conversationalSearchResult_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(ConversationalSearchResult); + } + if (tileNavigationResult_ != null) { + output.WriteRawTag(154, 1); + output.WriteMessage(TileNavigationResult); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif - [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 int CalculateSize() { + int size = 0; + size += results_.CalculateSize(_repeated_results_codec); + size += facets_.CalculateSize(_repeated_facets_codec); + if (TotalSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TotalSize); + } + if (CorrectedQuery.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CorrectedQuery); + } + if (AttributionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AttributionToken); + } + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + if (queryExpansionInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryExpansionInfo); + } + if (RedirectUri.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RedirectUri); + } + size += appliedControls_.CalculateSize(_repeated_appliedControls_codec); + size += invalidConditionBoostSpecs_.CalculateSize(_repeated_invalidConditionBoostSpecs_codec); + size += experimentInfo_.CalculateSize(_repeated_experimentInfo_codec); + if (conversationalSearchResult_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ConversationalSearchResult); + } + if (tileNavigationResult_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(TileNavigationResult); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public QueryExpansionSpec() { - OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SearchResponse other) { + if (other == null) { + return; + } + results_.Add(other.results_); + facets_.Add(other.facets_); + if (other.TotalSize != 0) { + TotalSize = other.TotalSize; + } + if (other.CorrectedQuery.Length != 0) { + CorrectedQuery = other.CorrectedQuery; + } + if (other.AttributionToken.Length != 0) { + AttributionToken = other.AttributionToken; + } + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + if (other.queryExpansionInfo_ != null) { + if (queryExpansionInfo_ == null) { + QueryExpansionInfo = new global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo(); } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public QueryExpansionSpec(QueryExpansionSpec other) : this() { - condition_ = other.condition_; - pinUnexpandedResults_ = other.pinUnexpandedResults_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + QueryExpansionInfo.MergeFrom(other.QueryExpansionInfo); + } + if (other.RedirectUri.Length != 0) { + RedirectUri = other.RedirectUri; + } + appliedControls_.Add(other.appliedControls_); + invalidConditionBoostSpecs_.Add(other.invalidConditionBoostSpecs_); + experimentInfo_.Add(other.experimentInfo_); + if (other.conversationalSearchResult_ != null) { + if (conversationalSearchResult_ == null) { + ConversationalSearchResult = new global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult(); } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public QueryExpansionSpec Clone() { - return new QueryExpansionSpec(this); + ConversationalSearchResult.MergeFrom(other.ConversationalSearchResult); + } + if (other.tileNavigationResult_ != null) { + if (tileNavigationResult_ == null) { + TileNavigationResult = new global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult(); } + TileNavigationResult.MergeFrom(other.TileNavigationResult); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } - /// Field number for the "condition" field. - public const int ConditionFieldNumber = 1; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition condition_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified; - /// - /// The condition under which query expansion should occur. Default to - /// [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition Condition { - get { return condition_; } - set { - condition_ = value; + [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: { + results_.AddEntriesFrom(input, _repeated_results_codec); + break; } - } - - /// Field number for the "pin_unexpanded_results" field. - public const int PinUnexpandedResultsFieldNumber = 2; - private bool pinUnexpandedResults_; - /// - /// Whether to pin unexpanded results. If this field is set to true, - /// unexpanded products are always at the top of the search results, followed - /// by the expanded results. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool PinUnexpandedResults { - get { return pinUnexpandedResults_; } - set { - pinUnexpandedResults_ = value; + case 18: { + facets_.AddEntriesFrom(input, _repeated_facets_codec); + break; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as QueryExpansionSpec); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(QueryExpansionSpec other) { - if (ReferenceEquals(other, null)) { - return false; + case 24: { + TotalSize = input.ReadInt32(); + break; } - if (ReferenceEquals(other, this)) { - return true; + case 34: { + CorrectedQuery = input.ReadString(); + break; } - if (Condition != other.Condition) return false; - if (PinUnexpandedResults != other.PinUnexpandedResults) 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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) hash ^= Condition.GetHashCode(); - if (PinUnexpandedResults != false) hash ^= PinUnexpandedResults.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); + case 42: { + AttributionToken = input.ReadString(); + break; } - 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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Condition); + case 50: { + NextPageToken = input.ReadString(); + break; } - if (PinUnexpandedResults != false) { - output.WriteRawTag(16); - output.WriteBool(PinUnexpandedResults); + case 58: { + if (queryExpansionInfo_ == null) { + QueryExpansionInfo = new global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo(); + } + input.ReadMessage(QueryExpansionInfo); + break; } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); + case 82: { + RedirectUri = input.ReadString(); + break; } - #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 (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Condition); + case 98: { + appliedControls_.AddEntriesFrom(input, _repeated_appliedControls_codec); + break; } - if (PinUnexpandedResults != false) { - output.WriteRawTag(16); - output.WriteBool(PinUnexpandedResults); + case 114: { + invalidConditionBoostSpecs_.AddEntriesFrom(input, _repeated_invalidConditionBoostSpecs_codec); + break; + } + case 138: { + experimentInfo_.AddEntriesFrom(input, _repeated_experimentInfo_codec); + break; + } + case 146: { + if (conversationalSearchResult_ == null) { + ConversationalSearchResult = new global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult(); + } + input.ReadMessage(ConversationalSearchResult); + break; } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); + case 154: { + if (tileNavigationResult_ == null) { + TileNavigationResult = new global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult(); + } + input.ReadMessage(TileNavigationResult); + break; } } - #endif + } + #endif + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Condition); + #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: { + results_.AddEntriesFrom(ref input, _repeated_results_codec); + break; } - if (PinUnexpandedResults != false) { - size += 1 + 1; + case 18: { + facets_.AddEntriesFrom(ref input, _repeated_facets_codec); + break; } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + case 24: { + TotalSize = input.ReadInt32(); + break; } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(QueryExpansionSpec other) { - if (other == null) { - return; + case 34: { + CorrectedQuery = input.ReadString(); + break; } - if (other.Condition != global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition.Unspecified) { - Condition = other.Condition; + case 42: { + AttributionToken = input.ReadString(); + break; } - if (other.PinUnexpandedResults != false) { - PinUnexpandedResults = other.PinUnexpandedResults; + case 50: { + NextPageToken = input.ReadString(); + 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 8: { - Condition = (global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition) input.ReadEnum(); - break; - } - case 16: { - PinUnexpandedResults = input.ReadBool(); - break; - } + case 58: { + if (queryExpansionInfo_ == null) { + QueryExpansionInfo = new global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo(); } + input.ReadMessage(QueryExpansionInfo); + 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 8: { - Condition = (global::Google.Cloud.Retail.V2.SearchRequest.Types.QueryExpansionSpec.Types.Condition) input.ReadEnum(); - break; - } - case 16: { - PinUnexpandedResults = input.ReadBool(); - break; - } + case 82: { + RedirectUri = input.ReadString(); + break; + } + case 98: { + appliedControls_.AddEntriesFrom(ref input, _repeated_appliedControls_codec); + break; + } + case 114: { + invalidConditionBoostSpecs_.AddEntriesFrom(ref input, _repeated_invalidConditionBoostSpecs_codec); + break; + } + case 138: { + experimentInfo_.AddEntriesFrom(ref input, _repeated_experimentInfo_codec); + break; + } + case 146: { + if (conversationalSearchResult_ == null) { + ConversationalSearchResult = new global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult(); } + input.ReadMessage(ConversationalSearchResult); + break; } - } - #endif - - #region Nested types - /// Container for nested types declared in the QueryExpansionSpec message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// Enum describing under which condition query expansion should occur. - /// - public enum Condition { - /// - /// Unspecified query expansion condition. In this case, server behavior - /// defaults to - /// [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. - /// - [pbr::OriginalName("CONDITION_UNSPECIFIED")] Unspecified = 0, - /// - /// Disabled query expansion. Only the exact search query is used, even if - /// [SearchResponse.total_size][google.cloud.retail.v2.SearchResponse.total_size] - /// is zero. - /// - [pbr::OriginalName("DISABLED")] Disabled = 1, - /// - /// Automatic query expansion built by Google Retail Search. - /// - [pbr::OriginalName("AUTO")] Auto = 3, + case 154: { + if (tileNavigationResult_ == null) { + TileNavigationResult = new global::Google.Cloud.Retail.V2.SearchResponse.Types.TileNavigationResult(); + } + input.ReadMessage(TileNavigationResult); + break; } - } - #endregion - } + } + #endif + #region Nested types + /// Container for nested types declared in the SearchResponse message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { /// - /// The specification for personalization. + /// Represents the search results. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class PersonalizationSpec : pb::IMessage + public sealed partial class SearchResult : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PersonalizationSpec()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SearchResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchRequest.Descriptor.NestedTypes[4]; } + get { return global::Google.Cloud.Retail.V2.SearchResponse.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3474,7 +6659,7 @@ public sealed partial class PersonalizationSpec : pb::IMessageField number for the "id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + /// + /// [Product.id][google.cloud.retail.v2.Product.id] of the searched + /// [Product][google.cloud.retail.v2.Product]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "product" field. + public const int ProductFieldNumber = 2; + private global::Google.Cloud.Retail.V2.Product product_; + /// + /// The product data snippet in the search response. Only + /// [Product.name][google.cloud.retail.v2.Product.name] is guaranteed to be + /// populated. + /// + /// [Product.variants][google.cloud.retail.v2.Product.variants] contains the + /// product variants that match the search query. If there are multiple + /// product variants matching the query, top 5 most relevant product variants + /// are returned and ordered by relevancy. + /// + /// If relevancy can be deternmined, use + /// [matching_variant_fields][google.cloud.retail.v2.SearchResponse.SearchResult.matching_variant_fields] + /// to look up matched product variants fields. If relevancy cannot be + /// determined, e.g. when searching "shoe" all products in a shoe product can + /// be a match, 5 product variants are returned but order is meaningless. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Product Product { + get { return product_; } + set { + product_ = value; + } + } + + /// Field number for the "matching_variant_count" field. + public const int MatchingVariantCountFieldNumber = 3; + private int matchingVariantCount_; + /// + /// The count of matched + /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] + /// [Product][google.cloud.retail.v2.Product]s. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MatchingVariantCount { + get { return matchingVariantCount_; } + set { + matchingVariantCount_ = value; + } + } + + /// Field number for the "matching_variant_fields" field. + public const int MatchingVariantFieldsFieldNumber = 4; + private static readonly pbc::MapField.Codec _map_matchingVariantFields_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser), 34); + private readonly pbc::MapField matchingVariantFields_ = new pbc::MapField(); + /// + /// If a [variant][google.cloud.retail.v2.Product.Type.VARIANT] + /// [Product][google.cloud.retail.v2.Product] matches the search query, this + /// map indicates which [Product][google.cloud.retail.v2.Product] fields are + /// matched. The key is the + /// [Product.name][google.cloud.retail.v2.Product.name], the value is a field + /// mask of the matched [Product][google.cloud.retail.v2.Product] fields. If + /// matched attributes cannot be determined, this map will be empty. + /// + /// For example, a key "sku1" with field mask + /// "products.color_info" indicates there is a match between + /// "sku1" [ColorInfo][google.cloud.retail.v2.ColorInfo] and the query. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField MatchingVariantFields { + get { return matchingVariantFields_; } } + /// Field number for the "variant_rollup_values" field. + public const int VariantRollupValuesFieldNumber = 5; + private static readonly pbc::MapField.Codec _map_variantRollupValues_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser), 42); + private readonly pbc::MapField variantRollupValues_ = new pbc::MapField(); + /// + /// The rollup matching + /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] + /// [Product][google.cloud.retail.v2.Product] attributes. The key is one of + /// the + /// [SearchRequest.variant_rollup_keys][google.cloud.retail.v2.SearchRequest.variant_rollup_keys]. + /// The values are the merged and de-duplicated + /// [Product][google.cloud.retail.v2.Product] attributes. Notice that the + /// rollup values are respect filter. For example, when filtering by + /// "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is + /// returned. + /// + /// For textual and numerical attributes, the rollup values is a list of + /// string or double values with type + /// [google.protobuf.ListValue][google.protobuf.ListValue]. For example, if + /// there are two variants with colors "red" and "blue", the rollup values + /// are + /// + /// { key: "colorFamilies" + /// value { + /// list_value { + /// values { string_value: "red" } + /// values { string_value: "blue" } + /// } + /// } + /// } + /// + /// For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], the rollup + /// values is a double value with type + /// [google.protobuf.Value][google.protobuf.Value]. For example, + /// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there + /// are 10 variants in this product are available in the store "store1". + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public PersonalizationSpec Clone() { - return new PersonalizationSpec(this); + public pbc::MapField VariantRollupValues { + get { return variantRollupValues_; } } - /// Field number for the "mode" field. - public const int ModeFieldNumber = 1; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode mode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified; + /// Field number for the "personal_labels" field. + public const int PersonalLabelsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_personalLabels_codec + = pb::FieldCodec.ForString(58); + private readonly pbc::RepeatedField personalLabels_ = new pbc::RepeatedField(); /// - /// Defaults to - /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. + /// Specifies previous events related to this product for this user based on + /// [UserEvent][google.cloud.retail.v2.UserEvent] with same + /// [SearchRequest.visitor_id][google.cloud.retail.v2.SearchRequest.visitor_id] + /// or [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id]. + /// + /// This is set only when + /// [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.mode] + /// is + /// [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. + /// + /// Possible values: + /// + /// * `purchased`: Indicates that this product has been purchased before. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode Mode { - get { return mode_; } - set { - mode_ = value; - } + public pbc::RepeatedField PersonalLabels { + get { return personalLabels_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as PersonalizationSpec); + return Equals(other as SearchResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(PersonalizationSpec other) { + public bool Equals(SearchResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Mode != other.Mode) return false; + if (Id != other.Id) return false; + if (!object.Equals(Product, other.Product)) return false; + if (MatchingVariantCount != other.MatchingVariantCount) return false; + if (!MatchingVariantFields.Equals(other.MatchingVariantFields)) return false; + if (!VariantRollupValues.Equals(other.VariantRollupValues)) return false; + if(!personalLabels_.Equals(other.personalLabels_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3532,7 +6866,12 @@ public bool Equals(PersonalizationSpec other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) hash ^= Mode.GetHashCode(); + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (product_ != null) hash ^= Product.GetHashCode(); + if (MatchingVariantCount != 0) hash ^= MatchingVariantCount.GetHashCode(); + hash ^= MatchingVariantFields.GetHashCode(); + hash ^= VariantRollupValues.GetHashCode(); + hash ^= personalLabels_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3551,10 +6890,21 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Mode); + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (product_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Product); + } + if (MatchingVariantCount != 0) { + output.WriteRawTag(24); + output.WriteInt32(MatchingVariantCount); } + matchingVariantFields_.WriteTo(output, _map_matchingVariantFields_codec); + variantRollupValues_.WriteTo(output, _map_variantRollupValues_codec); + personalLabels_.WriteTo(output, _repeated_personalLabels_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3565,10 +6915,21 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Mode); + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (product_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Product); + } + if (MatchingVariantCount != 0) { + output.WriteRawTag(24); + output.WriteInt32(MatchingVariantCount); } + matchingVariantFields_.WriteTo(ref output, _map_matchingVariantFields_codec); + variantRollupValues_.WriteTo(ref output, _map_variantRollupValues_codec); + personalLabels_.WriteTo(ref output, _repeated_personalLabels_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -3579,9 +6940,18 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); } + if (product_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Product); + } + if (MatchingVariantCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MatchingVariantCount); + } + size += matchingVariantFields_.CalculateSize(_map_matchingVariantFields_codec); + size += variantRollupValues_.CalculateSize(_map_variantRollupValues_codec); + size += personalLabels_.CalculateSize(_repeated_personalLabels_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3590,13 +6960,25 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(PersonalizationSpec other) { + public void MergeFrom(SearchResult other) { if (other == null) { return; } - if (other.Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode.Unspecified) { - Mode = other.Mode; + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.product_ != null) { + if (product_ == null) { + Product = new global::Google.Cloud.Retail.V2.Product(); + } + Product.MergeFrom(other.Product); + } + if (other.MatchingVariantCount != 0) { + MatchingVariantCount = other.MatchingVariantCount; } + matchingVariantFields_.MergeFrom(other.matchingVariantFields_); + variantRollupValues_.MergeFrom(other.variantRollupValues_); + personalLabels_.Add(other.personalLabels_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3612,8 +6994,31 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode) input.ReadEnum(); + case 10: { + Id = input.ReadString(); + break; + } + case 18: { + if (product_ == null) { + Product = new global::Google.Cloud.Retail.V2.Product(); + } + input.ReadMessage(Product); + break; + } + case 24: { + MatchingVariantCount = input.ReadInt32(); + break; + } + case 34: { + matchingVariantFields_.AddEntriesFrom(input, _map_matchingVariantFields_codec); + break; + } + case 42: { + variantRollupValues_.AddEntriesFrom(input, _map_variantRollupValues_codec); + break; + } + case 58: { + personalLabels_.AddEntriesFrom(input, _repeated_personalLabels_codec); break; } } @@ -3631,64 +7036,59 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.PersonalizationSpec.Types.Mode) input.ReadEnum(); + case 10: { + Id = input.ReadString(); break; } - } - } - } - #endif - - #region Nested types - /// Container for nested types declared in the PersonalizationSpec message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// The personalization mode of each search request. - /// - public enum Mode { - /// - /// Default value. In this case, server behavior defaults to - /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. - /// - [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, - /// - /// Let CRS decide whether to use personalization based on quality of user - /// event data. - /// - [pbr::OriginalName("AUTO")] Auto = 1, - /// - /// Disable personalization. - /// - [pbr::OriginalName("DISABLED")] Disabled = 2, + case 18: { + if (product_ == null) { + Product = new global::Google.Cloud.Retail.V2.Product(); + } + input.ReadMessage(Product); + break; + } + case 24: { + MatchingVariantCount = input.ReadInt32(); + break; + } + case 34: { + matchingVariantFields_.AddEntriesFrom(ref input, _map_matchingVariantFields_codec); + break; + } + case 42: { + variantRollupValues_.AddEntriesFrom(ref input, _map_variantRollupValues_codec); + break; + } + case 58: { + personalLabels_.AddEntriesFrom(ref input, _repeated_personalLabels_codec); + break; + } + } } - } - #endregion + #endif } /// - /// The specification for query spell correction. + /// A facet result. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class SpellCorrectionSpec : pb::IMessage + public sealed partial class Facet : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SpellCorrectionSpec()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Facet()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchRequest.Descriptor.NestedTypes[5]; } + get { return global::Google.Cloud.Retail.V2.SearchResponse.Descriptor.NestedTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3699,7 +7099,7 @@ public sealed partial class SpellCorrectionSpec : pb::IMessageField number for the "mode" field. - public const int ModeFieldNumber = 1; - private global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode mode_ = global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified; + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private string key_ = ""; /// - /// The mode under which spell correction should take effect to - /// replace the original search query. Default to - /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + /// The key for this facet. E.g., "colorFamilies" or "price" or + /// "attributes.attr1". /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode Mode { - get { return mode_; } + public string Key { + get { return key_; } set { - mode_ = value; + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "values" field. + public const int ValuesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_values_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Types.FacetValue.Parser); + private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + /// + /// The facet values for this field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Values { + get { return values_; } + } + + /// Field number for the "dynamic_facet" field. + public const int DynamicFacetFieldNumber = 3; + private bool dynamicFacet_; + /// + /// Whether the facet is dynamically generated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DynamicFacet { + get { return dynamicFacet_; } + set { + dynamicFacet_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SpellCorrectionSpec); + return Equals(other as Facet); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(SpellCorrectionSpec other) { + public bool Equals(Facet other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Mode != other.Mode) return false; + if (Key != other.Key) return false; + if(!values_.Equals(other.values_)) return false; + if (DynamicFacet != other.DynamicFacet) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3758,7 +7190,9 @@ public bool Equals(SpellCorrectionSpec other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) hash ^= Mode.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + hash ^= values_.GetHashCode(); + if (DynamicFacet != false) hash ^= DynamicFacet.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3777,9 +7211,14 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Mode); + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + values_.WriteTo(output, _repeated_values_codec); + if (DynamicFacet != false) { + output.WriteRawTag(24); + output.WriteBool(DynamicFacet); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -3791,9 +7230,14 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { - output.WriteRawTag(8); - output.WriteEnum((int) Mode); + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + values_.WriteTo(ref output, _repeated_values_codec); + if (DynamicFacet != false) { + output.WriteRawTag(24); + output.WriteBool(DynamicFacet); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -3805,8 +7249,12 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + size += values_.CalculateSize(_repeated_values_codec); + if (DynamicFacet != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -3816,12 +7264,16 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(SpellCorrectionSpec other) { + public void MergeFrom(Facet other) { if (other == null) { return; } - if (other.Mode != global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode.Unspecified) { - Mode = other.Mode; + if (other.Key.Length != 0) { + Key = other.Key; + } + values_.Add(other.values_); + if (other.DynamicFacet != false) { + DynamicFacet = other.DynamicFacet; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3838,8 +7290,16 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode) input.ReadEnum(); + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + values_.AddEntriesFrom(input, _repeated_values_codec); + break; + } + case 24: { + DynamicFacet = input.ReadBool(); break; } } @@ -3857,8 +7317,16 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - Mode = (global::Google.Cloud.Retail.V2.SearchRequest.Types.SpellCorrectionSpec.Types.Mode) input.ReadEnum(); + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + values_.AddEntriesFrom(ref input, _repeated_values_codec); + break; + } + case 24: { + DynamicFacet = input.ReadBool(); break; } } @@ -3867,636 +7335,459 @@ public void MergeFrom(pb::CodedInputStream input) { #endif #region Nested types - /// Container for nested types declared in the SpellCorrectionSpec message type. + /// Container for nested types declared in the Facet message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { /// - /// Enum describing under which mode spell correction should occur. + /// A facet value which contains value names and their count. /// - public enum Mode { - /// - /// Unspecified spell correction mode. In this case, server behavior - /// defaults to - /// [Mode.AUTO][google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. - /// - [pbr::OriginalName("MODE_UNSPECIFIED")] Unspecified = 0, - /// - /// Google Retail Search will try to find a spell suggestion if there - /// is any and put in the - /// [SearchResponse.corrected_query][google.cloud.retail.v2.SearchResponse.corrected_query]. - /// The spell suggestion will not be used as the search query. - /// - [pbr::OriginalName("SUGGESTION_ONLY")] SuggestionOnly = 1, - /// - /// Automatic spell correction built by Google Retail Search. Search will - /// be based on the corrected query if found. - /// - [pbr::OriginalName("AUTO")] Auto = 2, - } - - } - #endregion - - } - - } - #endregion - - } - - /// - /// Response message for - /// [SearchService.Search][google.cloud.retail.v2.SearchService.Search] method. - /// - [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class SearchResponse : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SearchResponse()); - 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[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 SearchResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchResponse(SearchResponse other) : this() { - results_ = other.results_.Clone(); - facets_ = other.facets_.Clone(); - totalSize_ = other.totalSize_; - correctedQuery_ = other.correctedQuery_; - attributionToken_ = other.attributionToken_; - nextPageToken_ = other.nextPageToken_; - queryExpansionInfo_ = other.queryExpansionInfo_ != null ? other.queryExpansionInfo_.Clone() : null; - redirectUri_ = other.redirectUri_; - appliedControls_ = other.appliedControls_.Clone(); - invalidConditionBoostSpecs_ = other.invalidConditionBoostSpecs_.Clone(); - experimentInfo_ = other.experimentInfo_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FacetValue : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FacetValue()); + 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 SearchResponse Clone() { - return new SearchResponse(this); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Descriptor.NestedTypes[0]; } + } - /// Field number for the "results" field. - public const int ResultsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_results_codec - = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.SearchResponse.Types.SearchResult.Parser); - private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); - /// - /// A list of matched items. The order represents the ranking. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Results { - get { return results_; } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } - /// Field number for the "facets" field. - public const int FacetsFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_facets_codec - = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Parser); - private readonly pbc::RepeatedField facets_ = new pbc::RepeatedField(); - /// - /// Results of facets requested by user. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Facets { - get { return facets_; } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetValue() { + OnConstruction(); + } - /// Field number for the "total_size" field. - public const int TotalSizeFieldNumber = 3; - private int totalSize_; - /// - /// The estimated total count of matched items irrespective of pagination. The - /// count of [results][google.cloud.retail.v2.SearchResponse.results] returned - /// by pagination may be less than the - /// [total_size][google.cloud.retail.v2.SearchResponse.total_size] that - /// matches. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int TotalSize { - get { return totalSize_; } - set { - totalSize_ = value; - } - } + partial void OnConstruction(); - /// Field number for the "corrected_query" field. - public const int CorrectedQueryFieldNumber = 4; - private string correctedQuery_ = ""; - /// - /// Contains the spell corrected query, if found. If the spell correction type - /// is AUTOMATIC, then the search results are based on corrected_query. - /// Otherwise the original query is used for search. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string CorrectedQuery { - get { return correctedQuery_; } - set { - correctedQuery_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetValue(FacetValue other) : this() { + count_ = other.count_; + minValue_ = other.minValue_; + maxValue_ = other.maxValue_; + switch (other.FacetValueCase) { + case FacetValueOneofCase.Value: + Value = other.Value; + break; + case FacetValueOneofCase.Interval: + Interval = other.Interval.Clone(); + break; + } - /// Field number for the "attribution_token" field. - public const int AttributionTokenFieldNumber = 5; - private string attributionToken_ = ""; - /// - /// A unique search token. This should be included in the - /// [UserEvent][google.cloud.retail.v2.UserEvent] logs resulting from this - /// search, which enables accurate attribution of search model performance. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string AttributionToken { - get { return attributionToken_; } - set { - attributionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } - /// Field number for the "next_page_token" field. - public const int NextPageTokenFieldNumber = 6; - private string nextPageToken_ = ""; - /// - /// A token that can be sent as - /// [SearchRequest.page_token][google.cloud.retail.v2.SearchRequest.page_token] - /// to retrieve the next page. If this field is omitted, there are no - /// subsequent pages. - /// - [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 FacetValue Clone() { + return new FacetValue(this); + } - /// Field number for the "query_expansion_info" field. - public const int QueryExpansionInfoFieldNumber = 7; - private global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo queryExpansionInfo_; - /// - /// Query expansion information for the returned results. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo QueryExpansionInfo { - get { return queryExpansionInfo_; } - set { - queryExpansionInfo_ = value; - } - } + /// Field number for the "value" field. + public const int ValueFieldNumber = 1; + /// + /// Text value of a facet, such as "Black" for facet "colorFamilies". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return HasValue ? (string) facetValue_ : ""; } + set { + facetValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + facetValueCase_ = FacetValueOneofCase.Value; + } + } + /// Gets whether the "value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasValue { + get { return facetValueCase_ == FacetValueOneofCase.Value; } + } + /// Clears the value of the oneof if it's currently set to "value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearValue() { + if (HasValue) { + ClearFacetValue(); + } + } - /// Field number for the "redirect_uri" field. - public const int RedirectUriFieldNumber = 10; - private string redirectUri_ = ""; - /// - /// The URI of a customer-defined redirect page. If redirect action is - /// triggered, no search is performed, and only - /// [redirect_uri][google.cloud.retail.v2.SearchResponse.redirect_uri] and - /// [attribution_token][google.cloud.retail.v2.SearchResponse.attribution_token] - /// are set in the response. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string RedirectUri { - get { return redirectUri_; } - set { - redirectUri_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + /// Field number for the "interval" field. + public const int IntervalFieldNumber = 2; + /// + /// Interval value for a facet, such as [10, 20) for facet "price". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.Interval Interval { + get { return facetValueCase_ == FacetValueOneofCase.Interval ? (global::Google.Cloud.Retail.V2.Interval) facetValue_ : null; } + set { + facetValue_ = value; + facetValueCase_ = value == null ? FacetValueOneofCase.None : FacetValueOneofCase.Interval; + } + } - /// Field number for the "applied_controls" field. - public const int AppliedControlsFieldNumber = 12; - private static readonly pb::FieldCodec _repeated_appliedControls_codec - = pb::FieldCodec.ForString(98); - private readonly pbc::RepeatedField appliedControls_ = new pbc::RepeatedField(); - /// - /// The fully qualified resource name of applied - /// [controls](https://cloud.google.com/retail/docs/serving-control-rules). - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField AppliedControls { - get { return appliedControls_; } - } + /// Field number for the "count" field. + public const int CountFieldNumber = 3; + private long count_; + /// + /// Number of items that have this facet value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Count { + get { return count_; } + set { + count_ = value; + } + } - /// Field number for the "invalid_condition_boost_specs" field. - public const int InvalidConditionBoostSpecsFieldNumber = 14; - private static readonly pb::FieldCodec _repeated_invalidConditionBoostSpecs_codec - = pb::FieldCodec.ForMessage(114, global::Google.Cloud.Retail.V2.SearchRequest.Types.BoostSpec.Types.ConditionBoostSpec.Parser); - private readonly pbc::RepeatedField invalidConditionBoostSpecs_ = new pbc::RepeatedField(); - /// - /// The invalid - /// [SearchRequest.BoostSpec.condition_boost_specs][google.cloud.retail.v2.SearchRequest.BoostSpec.condition_boost_specs] - /// that are not applied during serving. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField InvalidConditionBoostSpecs { - get { return invalidConditionBoostSpecs_; } - } + /// Field number for the "min_value" field. + public const int MinValueFieldNumber = 5; + private double minValue_; + /// + /// The minimum value in the + /// [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval]. + /// Only supported on numerical facets and returned if + /// [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max] + /// is true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double MinValue { + get { return minValue_; } + set { + minValue_ = value; + } + } - /// 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_; } - } + /// Field number for the "max_value" field. + public const int MaxValueFieldNumber = 6; + private double maxValue_; + /// + /// The maximum value in the + /// [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval]. + /// Only supported on numerical facets and returned if + /// [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max] + /// is true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double MaxValue { + get { return maxValue_; } + set { + maxValue_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as SearchResponse); - } + private object facetValue_; + /// Enum of possible cases for the "facet_value" oneof. + public enum FacetValueOneofCase { + None = 0, + Value = 1, + Interval = 2, + } + private FacetValueOneofCase facetValueCase_ = FacetValueOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FacetValueOneofCase FacetValueCase { + get { return facetValueCase_; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(SearchResponse other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if(!results_.Equals(other.results_)) return false; - if(!facets_.Equals(other.facets_)) return false; - if (TotalSize != other.TotalSize) return false; - if (CorrectedQuery != other.CorrectedQuery) return false; - if (AttributionToken != other.AttributionToken) return false; - if (NextPageToken != other.NextPageToken) return false; - if (!object.Equals(QueryExpansionInfo, other.QueryExpansionInfo)) return false; - 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); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFacetValue() { + facetValueCase_ = FacetValueOneofCase.None; + facetValue_ = null; + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - hash ^= results_.GetHashCode(); - hash ^= facets_.GetHashCode(); - if (TotalSize != 0) hash ^= TotalSize.GetHashCode(); - if (CorrectedQuery.Length != 0) hash ^= CorrectedQuery.GetHashCode(); - if (AttributionToken.Length != 0) hash ^= AttributionToken.GetHashCode(); - if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); - if (queryExpansionInfo_ != null) hash ^= QueryExpansionInfo.GetHashCode(); - if (RedirectUri.Length != 0) hash ^= RedirectUri.GetHashCode(); - hash ^= appliedControls_.GetHashCode(); - hash ^= invalidConditionBoostSpecs_.GetHashCode(); - hash ^= experimentInfo_.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FacetValue); + } - [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 bool Equals(FacetValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Value != other.Value) return false; + if (!object.Equals(Interval, other.Interval)) return false; + if (Count != other.Count) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MinValue, other.MinValue)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MaxValue, other.MaxValue)) return false; + if (FacetValueCase != other.FacetValueCase) return false; + return Equals(_unknownFields, other._unknownFields); + } - [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 - results_.WriteTo(output, _repeated_results_codec); - facets_.WriteTo(output, _repeated_facets_codec); - if (TotalSize != 0) { - output.WriteRawTag(24); - output.WriteInt32(TotalSize); - } - if (CorrectedQuery.Length != 0) { - output.WriteRawTag(34); - output.WriteString(CorrectedQuery); - } - if (AttributionToken.Length != 0) { - output.WriteRawTag(42); - output.WriteString(AttributionToken); - } - if (NextPageToken.Length != 0) { - output.WriteRawTag(50); - output.WriteString(NextPageToken); - } - if (queryExpansionInfo_ != null) { - output.WriteRawTag(58); - output.WriteMessage(QueryExpansionInfo); - } - if (RedirectUri.Length != 0) { - output.WriteRawTag(82); - output.WriteString(RedirectUri); - } - appliedControls_.WriteTo(output, _repeated_appliedControls_codec); - invalidConditionBoostSpecs_.WriteTo(output, _repeated_invalidConditionBoostSpecs_codec); - experimentInfo_.WriteTo(output, _repeated_experimentInfo_codec); - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasValue) hash ^= Value.GetHashCode(); + if (facetValueCase_ == FacetValueOneofCase.Interval) hash ^= Interval.GetHashCode(); + if (Count != 0L) hash ^= Count.GetHashCode(); + if (MinValue != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MinValue); + if (MaxValue != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MaxValue); + hash ^= (int) facetValueCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } - #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) { - results_.WriteTo(ref output, _repeated_results_codec); - facets_.WriteTo(ref output, _repeated_facets_codec); - if (TotalSize != 0) { - output.WriteRawTag(24); - output.WriteInt32(TotalSize); - } - if (CorrectedQuery.Length != 0) { - output.WriteRawTag(34); - output.WriteString(CorrectedQuery); - } - if (AttributionToken.Length != 0) { - output.WriteRawTag(42); - output.WriteString(AttributionToken); - } - if (NextPageToken.Length != 0) { - output.WriteRawTag(50); - output.WriteString(NextPageToken); - } - if (queryExpansionInfo_ != null) { - output.WriteRawTag(58); - output.WriteMessage(QueryExpansionInfo); - } - if (RedirectUri.Length != 0) { - output.WriteRawTag(82); - output.WriteString(RedirectUri); - } - 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); - } - } - #endif + [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 (HasValue) { + output.WriteRawTag(10); + output.WriteString(Value); + } + if (facetValueCase_ == FacetValueOneofCase.Interval) { + output.WriteRawTag(18); + output.WriteMessage(Interval); + } + if (Count != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Count); + } + if (MinValue != 0D) { + output.WriteRawTag(41); + output.WriteDouble(MinValue); + } + if (MaxValue != 0D) { + output.WriteRawTag(49); + output.WriteDouble(MaxValue); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - size += results_.CalculateSize(_repeated_results_codec); - size += facets_.CalculateSize(_repeated_facets_codec); - if (TotalSize != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(TotalSize); - } - if (CorrectedQuery.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(CorrectedQuery); - } - if (AttributionToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(AttributionToken); - } - if (NextPageToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); - } - if (queryExpansionInfo_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(QueryExpansionInfo); - } - if (RedirectUri.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(RedirectUri); - } - size += appliedControls_.CalculateSize(_repeated_appliedControls_codec); - size += invalidConditionBoostSpecs_.CalculateSize(_repeated_invalidConditionBoostSpecs_codec); - size += experimentInfo_.CalculateSize(_repeated_experimentInfo_codec); - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } + #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 (HasValue) { + output.WriteRawTag(10); + output.WriteString(Value); + } + if (facetValueCase_ == FacetValueOneofCase.Interval) { + output.WriteRawTag(18); + output.WriteMessage(Interval); + } + if (Count != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Count); + } + if (MinValue != 0D) { + output.WriteRawTag(41); + output.WriteDouble(MinValue); + } + if (MaxValue != 0D) { + output.WriteRawTag(49); + output.WriteDouble(MaxValue); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(SearchResponse other) { - if (other == null) { - return; - } - results_.Add(other.results_); - facets_.Add(other.facets_); - if (other.TotalSize != 0) { - TotalSize = other.TotalSize; - } - if (other.CorrectedQuery.Length != 0) { - CorrectedQuery = other.CorrectedQuery; - } - if (other.AttributionToken.Length != 0) { - AttributionToken = other.AttributionToken; - } - if (other.NextPageToken.Length != 0) { - NextPageToken = other.NextPageToken; - } - if (other.queryExpansionInfo_ != null) { - if (queryExpansionInfo_ == null) { - QueryExpansionInfo = new global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo(); - } - QueryExpansionInfo.MergeFrom(other.QueryExpansionInfo); - } - if (other.RedirectUri.Length != 0) { - RedirectUri = other.RedirectUri; - } - appliedControls_.Add(other.appliedControls_); - invalidConditionBoostSpecs_.Add(other.invalidConditionBoostSpecs_); - experimentInfo_.Add(other.experimentInfo_); - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasValue) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (facetValueCase_ == FacetValueOneofCase.Interval) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Interval); + } + if (Count != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count); + } + if (MinValue != 0D) { + size += 1 + 8; + } + if (MaxValue != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } - [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: { - results_.AddEntriesFrom(input, _repeated_results_codec); - break; - } - case 18: { - facets_.AddEntriesFrom(input, _repeated_facets_codec); - break; - } - case 24: { - TotalSize = input.ReadInt32(); - break; - } - case 34: { - CorrectedQuery = input.ReadString(); - break; - } - case 42: { - AttributionToken = input.ReadString(); - break; - } - case 50: { - NextPageToken = input.ReadString(); - break; - } - case 58: { - if (queryExpansionInfo_ == null) { - QueryExpansionInfo = new global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FacetValue other) { + if (other == null) { + return; + } + if (other.Count != 0L) { + Count = other.Count; + } + if (other.MinValue != 0D) { + MinValue = other.MinValue; + } + if (other.MaxValue != 0D) { + MaxValue = other.MaxValue; + } + switch (other.FacetValueCase) { + case FacetValueOneofCase.Value: + Value = other.Value; + break; + case FacetValueOneofCase.Interval: + if (Interval == null) { + Interval = new global::Google.Cloud.Retail.V2.Interval(); + } + Interval.MergeFrom(other.Interval); + 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: { + Value = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Retail.V2.Interval subBuilder = new global::Google.Cloud.Retail.V2.Interval(); + if (facetValueCase_ == FacetValueOneofCase.Interval) { + subBuilder.MergeFrom(Interval); + } + input.ReadMessage(subBuilder); + Interval = subBuilder; + break; + } + case 24: { + Count = input.ReadInt64(); + break; + } + case 41: { + MinValue = input.ReadDouble(); + break; + } + case 49: { + MaxValue = input.ReadDouble(); + break; + } + } + } + #endif } - input.ReadMessage(QueryExpansionInfo); - break; - } - case 82: { - RedirectUri = input.ReadString(); - break; - } - case 98: { - appliedControls_.AddEntriesFrom(input, _repeated_appliedControls_codec); - break; - } - case 114: { - invalidConditionBoostSpecs_.AddEntriesFrom(input, _repeated_invalidConditionBoostSpecs_codec); - break; - } - case 138: { - experimentInfo_.AddEntriesFrom(input, _repeated_experimentInfo_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: { - results_.AddEntriesFrom(ref input, _repeated_results_codec); - break; - } - case 18: { - facets_.AddEntriesFrom(ref input, _repeated_facets_codec); - break; - } - case 24: { - TotalSize = input.ReadInt32(); - break; - } - case 34: { - CorrectedQuery = input.ReadString(); - break; - } - case 42: { - AttributionToken = input.ReadString(); - break; - } - case 50: { - NextPageToken = input.ReadString(); - break; - } - case 58: { - if (queryExpansionInfo_ == null) { - QueryExpansionInfo = new global::Google.Cloud.Retail.V2.SearchResponse.Types.QueryExpansionInfo(); + #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: { + Value = input.ReadString(); + break; + } + case 18: { + global::Google.Cloud.Retail.V2.Interval subBuilder = new global::Google.Cloud.Retail.V2.Interval(); + if (facetValueCase_ == FacetValueOneofCase.Interval) { + subBuilder.MergeFrom(Interval); + } + input.ReadMessage(subBuilder); + Interval = subBuilder; + break; + } + case 24: { + Count = input.ReadInt64(); + break; + } + case 41: { + MinValue = input.ReadDouble(); + break; + } + case 49: { + MaxValue = input.ReadDouble(); + break; + } + } + } } - input.ReadMessage(QueryExpansionInfo); - break; - } - case 82: { - RedirectUri = input.ReadString(); - break; - } - case 98: { - appliedControls_.AddEntriesFrom(ref input, _repeated_appliedControls_codec); - break; - } - case 114: { - invalidConditionBoostSpecs_.AddEntriesFrom(ref input, _repeated_invalidConditionBoostSpecs_codec); - break; - } - case 138: { - experimentInfo_.AddEntriesFrom(ref input, _repeated_experimentInfo_codec); - break; + #endif + } + } + #endregion + } - } - #endif - #region Nested types - /// Container for nested types declared in the SearchResponse message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { /// - /// Represents the search results. + /// Information describing query expansion including whether expansion has + /// occurred. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class SearchResult : pb::IMessage + public sealed partial class QueryExpansionInfo : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SearchResult()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueryExpansionInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchResponse.Descriptor.NestedTypes[0]; } + get { return global::Google.Cloud.Retail.V2.SearchResponse.Descriptor.NestedTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4507,7 +7798,7 @@ public sealed partial class SearchResult : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchResult() { + public QueryExpansionInfo() { OnConstruction(); } @@ -4515,198 +7806,68 @@ public SearchResult() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchResult(SearchResult other) : this() { - id_ = other.id_; - product_ = other.product_ != null ? other.product_.Clone() : null; - matchingVariantCount_ = other.matchingVariantCount_; - matchingVariantFields_ = other.matchingVariantFields_.Clone(); - variantRollupValues_ = other.variantRollupValues_.Clone(); - personalLabels_ = other.personalLabels_.Clone(); + public QueryExpansionInfo(QueryExpansionInfo other) : this() { + expandedQuery_ = other.expandedQuery_; + pinnedResultCount_ = other.pinnedResultCount_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public SearchResult Clone() { - return new SearchResult(this); - } - - /// Field number for the "id" field. - public const int IdFieldNumber = 1; - private string id_ = ""; - /// - /// [Product.id][google.cloud.retail.v2.Product.id] of the searched - /// [Product][google.cloud.retail.v2.Product]. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Id { - get { return id_; } - set { - id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "product" field. - public const int ProductFieldNumber = 2; - private global::Google.Cloud.Retail.V2.Product product_; - /// - /// The product data snippet in the search response. Only - /// [Product.name][google.cloud.retail.v2.Product.name] is guaranteed to be - /// populated. - /// - /// [Product.variants][google.cloud.retail.v2.Product.variants] contains the - /// product variants that match the search query. If there are multiple - /// product variants matching the query, top 5 most relevant product variants - /// are returned and ordered by relevancy. - /// - /// If relevancy can be deternmined, use - /// [matching_variant_fields][google.cloud.retail.v2.SearchResponse.SearchResult.matching_variant_fields] - /// to look up matched product variants fields. If relevancy cannot be - /// determined, e.g. when searching "shoe" all products in a shoe product can - /// be a match, 5 product variants are returned but order is meaningless. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.Product Product { - get { return product_; } - set { - product_ = value; - } - } - - /// Field number for the "matching_variant_count" field. - public const int MatchingVariantCountFieldNumber = 3; - private int matchingVariantCount_; - /// - /// The count of matched - /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] - /// [Product][google.cloud.retail.v2.Product]s. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int MatchingVariantCount { - get { return matchingVariantCount_; } - set { - matchingVariantCount_ = value; - } - } - - /// Field number for the "matching_variant_fields" field. - public const int MatchingVariantFieldsFieldNumber = 4; - private static readonly pbc::MapField.Codec _map_matchingVariantFields_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser), 34); - private readonly pbc::MapField matchingVariantFields_ = new pbc::MapField(); - /// - /// If a [variant][google.cloud.retail.v2.Product.Type.VARIANT] - /// [Product][google.cloud.retail.v2.Product] matches the search query, this - /// map indicates which [Product][google.cloud.retail.v2.Product] fields are - /// matched. The key is the - /// [Product.name][google.cloud.retail.v2.Product.name], the value is a field - /// mask of the matched [Product][google.cloud.retail.v2.Product] fields. If - /// matched attributes cannot be determined, this map will be empty. - /// - /// For example, a key "sku1" with field mask - /// "products.color_info" indicates there is a match between - /// "sku1" [ColorInfo][google.cloud.retail.v2.ColorInfo] and the query. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::MapField MatchingVariantFields { - get { return matchingVariantFields_; } - } - - /// Field number for the "variant_rollup_values" field. - public const int VariantRollupValuesFieldNumber = 5; - private static readonly pbc::MapField.Codec _map_variantRollupValues_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Value.Parser), 42); - private readonly pbc::MapField variantRollupValues_ = new pbc::MapField(); - /// - /// The rollup matching - /// [variant][google.cloud.retail.v2.Product.Type.VARIANT] - /// [Product][google.cloud.retail.v2.Product] attributes. The key is one of - /// the - /// [SearchRequest.variant_rollup_keys][google.cloud.retail.v2.SearchRequest.variant_rollup_keys]. - /// The values are the merged and de-duplicated - /// [Product][google.cloud.retail.v2.Product] attributes. Notice that the - /// rollup values are respect filter. For example, when filtering by - /// "colorFamilies:ANY(\"red\")" and rollup "colorFamilies", only "red" is - /// returned. - /// - /// For textual and numerical attributes, the rollup values is a list of - /// string or double values with type - /// [google.protobuf.ListValue][google.protobuf.ListValue]. For example, if - /// there are two variants with colors "red" and "blue", the rollup values - /// are - /// - /// { key: "colorFamilies" - /// value { - /// list_value { - /// values { string_value: "red" } - /// values { string_value: "blue" } - /// } - /// } - /// } - /// - /// For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], the rollup - /// values is a double value with type - /// [google.protobuf.Value][google.protobuf.Value]. For example, - /// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there - /// are 10 variants in this product are available in the store "store1". + public QueryExpansionInfo Clone() { + return new QueryExpansionInfo(this); + } + + /// Field number for the "expanded_query" field. + public const int ExpandedQueryFieldNumber = 1; + private bool expandedQuery_; + /// + /// Bool describing whether query expansion has occurred. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::MapField VariantRollupValues { - get { return variantRollupValues_; } + public bool ExpandedQuery { + get { return expandedQuery_; } + set { + expandedQuery_ = value; + } } - /// Field number for the "personal_labels" field. - public const int PersonalLabelsFieldNumber = 7; - private static readonly pb::FieldCodec _repeated_personalLabels_codec - = pb::FieldCodec.ForString(58); - private readonly pbc::RepeatedField personalLabels_ = new pbc::RepeatedField(); + /// Field number for the "pinned_result_count" field. + public const int PinnedResultCountFieldNumber = 2; + private long pinnedResultCount_; /// - /// Specifies previous events related to this product for this user based on - /// [UserEvent][google.cloud.retail.v2.UserEvent] with same - /// [SearchRequest.visitor_id][google.cloud.retail.v2.SearchRequest.visitor_id] - /// or [UserInfo.user_id][google.cloud.retail.v2.UserInfo.user_id]. - /// - /// This is set only when - /// [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.mode] - /// is - /// [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode.AUTO]. - /// - /// Possible values: - /// - /// * `purchased`: Indicates that this product has been purchased before. + /// Number of pinned results. This field will only be set when expansion + /// happens and + /// [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.pin_unexpanded_results] + /// is set to true. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField PersonalLabels { - get { return personalLabels_; } + public long PinnedResultCount { + get { return pinnedResultCount_; } + set { + pinnedResultCount_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SearchResult); + return Equals(other as QueryExpansionInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(SearchResult other) { + public bool Equals(QueryExpansionInfo other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Id != other.Id) return false; - if (!object.Equals(Product, other.Product)) return false; - if (MatchingVariantCount != other.MatchingVariantCount) return false; - if (!MatchingVariantFields.Equals(other.MatchingVariantFields)) return false; - if (!VariantRollupValues.Equals(other.VariantRollupValues)) return false; - if(!personalLabels_.Equals(other.personalLabels_)) return false; + if (ExpandedQuery != other.ExpandedQuery) return false; + if (PinnedResultCount != other.PinnedResultCount) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4714,12 +7875,8 @@ public bool Equals(SearchResult other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Id.Length != 0) hash ^= Id.GetHashCode(); - if (product_ != null) hash ^= Product.GetHashCode(); - if (MatchingVariantCount != 0) hash ^= MatchingVariantCount.GetHashCode(); - hash ^= MatchingVariantFields.GetHashCode(); - hash ^= VariantRollupValues.GetHashCode(); - hash ^= personalLabels_.GetHashCode(); + if (ExpandedQuery != false) hash ^= ExpandedQuery.GetHashCode(); + if (PinnedResultCount != 0L) hash ^= PinnedResultCount.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4738,21 +7895,14 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Id.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Id); - } - if (product_ != null) { - output.WriteRawTag(18); - output.WriteMessage(Product); + if (ExpandedQuery != false) { + output.WriteRawTag(8); + output.WriteBool(ExpandedQuery); } - if (MatchingVariantCount != 0) { - output.WriteRawTag(24); - output.WriteInt32(MatchingVariantCount); + if (PinnedResultCount != 0L) { + output.WriteRawTag(16); + output.WriteInt64(PinnedResultCount); } - matchingVariantFields_.WriteTo(output, _map_matchingVariantFields_codec); - variantRollupValues_.WriteTo(output, _map_variantRollupValues_codec); - personalLabels_.WriteTo(output, _repeated_personalLabels_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -4763,21 +7913,14 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Id.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Id); - } - if (product_ != null) { - output.WriteRawTag(18); - output.WriteMessage(Product); + if (ExpandedQuery != false) { + output.WriteRawTag(8); + output.WriteBool(ExpandedQuery); } - if (MatchingVariantCount != 0) { - output.WriteRawTag(24); - output.WriteInt32(MatchingVariantCount); + if (PinnedResultCount != 0L) { + output.WriteRawTag(16); + output.WriteInt64(PinnedResultCount); } - matchingVariantFields_.WriteTo(ref output, _map_matchingVariantFields_codec); - variantRollupValues_.WriteTo(ref output, _map_variantRollupValues_codec); - personalLabels_.WriteTo(ref output, _repeated_personalLabels_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -4788,18 +7931,12 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Id.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); - } - if (product_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Product); + if (ExpandedQuery != false) { + size += 1 + 1; } - if (MatchingVariantCount != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MatchingVariantCount); + if (PinnedResultCount != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(PinnedResultCount); } - size += matchingVariantFields_.CalculateSize(_map_matchingVariantFields_codec); - size += variantRollupValues_.CalculateSize(_map_variantRollupValues_codec); - size += personalLabels_.CalculateSize(_repeated_personalLabels_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4808,25 +7945,16 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(SearchResult other) { + public void MergeFrom(QueryExpansionInfo other) { if (other == null) { return; } - if (other.Id.Length != 0) { - Id = other.Id; - } - if (other.product_ != null) { - if (product_ == null) { - Product = new global::Google.Cloud.Retail.V2.Product(); - } - Product.MergeFrom(other.Product); + if (other.ExpandedQuery != false) { + ExpandedQuery = other.ExpandedQuery; } - if (other.MatchingVariantCount != 0) { - MatchingVariantCount = other.MatchingVariantCount; + if (other.PinnedResultCount != 0L) { + PinnedResultCount = other.PinnedResultCount; } - matchingVariantFields_.MergeFrom(other.matchingVariantFields_); - variantRollupValues_.MergeFrom(other.variantRollupValues_); - personalLabels_.Add(other.personalLabels_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4842,31 +7970,12 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Id = input.ReadString(); - break; - } - case 18: { - if (product_ == null) { - Product = new global::Google.Cloud.Retail.V2.Product(); - } - input.ReadMessage(Product); - break; - } - case 24: { - MatchingVariantCount = input.ReadInt32(); - break; - } - case 34: { - matchingVariantFields_.AddEntriesFrom(input, _map_matchingVariantFields_codec); - break; - } - case 42: { - variantRollupValues_.AddEntriesFrom(input, _map_variantRollupValues_codec); + case 8: { + ExpandedQuery = input.ReadBool(); break; } - case 58: { - personalLabels_.AddEntriesFrom(input, _repeated_personalLabels_codec); + case 16: { + PinnedResultCount = input.ReadInt64(); break; } } @@ -4884,31 +7993,12 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - Id = input.ReadString(); - break; - } - case 18: { - if (product_ == null) { - Product = new global::Google.Cloud.Retail.V2.Product(); - } - input.ReadMessage(Product); - break; - } - case 24: { - MatchingVariantCount = input.ReadInt32(); - break; - } - case 34: { - matchingVariantFields_.AddEntriesFrom(ref input, _map_matchingVariantFields_codec); - break; - } - case 42: { - variantRollupValues_.AddEntriesFrom(ref input, _map_variantRollupValues_codec); + case 8: { + ExpandedQuery = input.ReadBool(); break; } - case 58: { - personalLabels_.AddEntriesFrom(ref input, _repeated_personalLabels_codec); + case 16: { + PinnedResultCount = input.ReadInt64(); break; } } @@ -4919,24 +8009,25 @@ public void MergeFrom(pb::CodedInputStream input) { } /// - /// A facet result. + /// This field specifies all related information that is needed on client + /// side for UI rendering of conversational retail search. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class Facet : pb::IMessage + public sealed partial class ConversationalSearchResult : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Facet()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConversationalSearchResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchResponse.Descriptor.NestedTypes[1]; } + get { return global::Google.Cloud.Retail.V2.SearchResponse.Descriptor.NestedTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4947,7 +8038,7 @@ public sealed partial class Facet : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Facet() { + public ConversationalSearchResult() { OnConstruction(); } @@ -4955,82 +8046,149 @@ public Facet() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Facet(Facet other) : this() { - key_ = other.key_; - values_ = other.values_.Clone(); - dynamicFacet_ = other.dynamicFacet_; + public ConversationalSearchResult(ConversationalSearchResult other) : this() { + conversationId_ = other.conversationId_; + refinedQuery_ = other.refinedQuery_; + additionalFilters_ = other.additionalFilters_.Clone(); + followupQuestion_ = other.followupQuestion_; + suggestedAnswers_ = other.suggestedAnswers_.Clone(); + additionalFilter_ = other.additionalFilter_ != null ? other.additionalFilter_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Facet Clone() { - return new Facet(this); + public ConversationalSearchResult Clone() { + return new ConversationalSearchResult(this); } - /// Field number for the "key" field. - public const int KeyFieldNumber = 1; - private string key_ = ""; + /// Field number for the "conversation_id" field. + public const int ConversationIdFieldNumber = 1; + private string conversationId_ = ""; /// - /// The key for this facet. E.g., "colorFamilies" or "price" or - /// "attributes.attr1". + /// Conversation UUID. This field will be stored in client side storage to + /// maintain the conversation session with server and will be used for next + /// search request's + /// [SearchRequest.ConversationalSearchSpec.conversation_id][google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.conversation_id] + /// to restore conversation state in server. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Key { - get { return key_; } + public string ConversationId { + get { return conversationId_; } set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + conversationId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "values" field. - public const int ValuesFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_values_codec - = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Retail.V2.SearchResponse.Types.Facet.Types.FacetValue.Parser); - private readonly pbc::RepeatedField values_ = new pbc::RepeatedField(); + /// Field number for the "refined_query" field. + public const int RefinedQueryFieldNumber = 2; + private string refinedQuery_ = ""; /// - /// The facet values for this field. + /// The current refined query for the conversational search. This field + /// will be used in customer UI that the query in the search bar should be + /// replaced with the refined query. For example, if + /// [SearchRequest.query][google.cloud.retail.v2.SearchRequest.query] is + /// `dress` and next + /// [SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer][google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer] + /// is `red color`, which does not match any product attribute value filters, + /// the refined query will be `dress, red color`. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Values { - get { return values_; } + public string RefinedQuery { + get { return refinedQuery_; } + set { + refinedQuery_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "dynamic_facet" field. - public const int DynamicFacetFieldNumber = 3; - private bool dynamicFacet_; + /// Field number for the "additional_filters" field. + public const int AdditionalFiltersFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_additionalFilters_codec + = pb::FieldCodec.ForMessage(26, global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter.Parser); + private readonly pbc::RepeatedField additionalFilters_ = new pbc::RepeatedField(); /// - /// Whether the facet is dynamically generated. + /// This field is deprecated but will be kept for backward compatibility. + /// There is expected to have only one additional filter and the value will + /// be the same to the same as field `additional_filter`. /// + [global::System.ObsoleteAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool DynamicFacet { - get { return dynamicFacet_; } + public pbc::RepeatedField AdditionalFilters { + get { return additionalFilters_; } + } + + /// Field number for the "followup_question" field. + public const int FollowupQuestionFieldNumber = 4; + private string followupQuestion_ = ""; + /// + /// The follow-up question. e.g., `What is the color?` + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FollowupQuestion { + get { return followupQuestion_; } set { - dynamicFacet_ = value; + followupQuestion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "suggested_answers" field. + public const int SuggestedAnswersFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_suggestedAnswers_codec + = pb::FieldCodec.ForMessage(42, global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.SuggestedAnswer.Parser); + private readonly pbc::RepeatedField suggestedAnswers_ = new pbc::RepeatedField(); + /// + /// The answer options provided to client for the follow-up question. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SuggestedAnswers { + get { return suggestedAnswers_; } + } + + /// Field number for the "additional_filter" field. + public const int AdditionalFilterFieldNumber = 6; + private global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter additionalFilter_; + /// + /// This is the incremental additional filters implied from the current + /// user answer. User should add the suggested addition filters to the + /// previous + /// [SearchRequest.filter][google.cloud.retail.v2.SearchRequest.filter], and + /// use the merged filter in the follow up search request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter AdditionalFilter { + get { return additionalFilter_; } + set { + additionalFilter_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Facet); + return Equals(other as ConversationalSearchResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(Facet other) { + public bool Equals(ConversationalSearchResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; - } - if (Key != other.Key) return false; - if(!values_.Equals(other.values_)) return false; - if (DynamicFacet != other.DynamicFacet) return false; + } + if (ConversationId != other.ConversationId) return false; + if (RefinedQuery != other.RefinedQuery) return false; + if(!additionalFilters_.Equals(other.additionalFilters_)) return false; + if (FollowupQuestion != other.FollowupQuestion) return false; + if(!suggestedAnswers_.Equals(other.suggestedAnswers_)) return false; + if (!object.Equals(AdditionalFilter, other.AdditionalFilter)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -5038,9 +8196,12 @@ public bool Equals(Facet other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Key.Length != 0) hash ^= Key.GetHashCode(); - hash ^= values_.GetHashCode(); - if (DynamicFacet != false) hash ^= DynamicFacet.GetHashCode(); + if (ConversationId.Length != 0) hash ^= ConversationId.GetHashCode(); + if (RefinedQuery.Length != 0) hash ^= RefinedQuery.GetHashCode(); + hash ^= additionalFilters_.GetHashCode(); + if (FollowupQuestion.Length != 0) hash ^= FollowupQuestion.GetHashCode(); + hash ^= suggestedAnswers_.GetHashCode(); + if (additionalFilter_ != null) hash ^= AdditionalFilter.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5059,14 +8220,23 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Key.Length != 0) { + if (ConversationId.Length != 0) { output.WriteRawTag(10); - output.WriteString(Key); + output.WriteString(ConversationId); } - values_.WriteTo(output, _repeated_values_codec); - if (DynamicFacet != false) { - output.WriteRawTag(24); - output.WriteBool(DynamicFacet); + if (RefinedQuery.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RefinedQuery); + } + additionalFilters_.WriteTo(output, _repeated_additionalFilters_codec); + if (FollowupQuestion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(FollowupQuestion); + } + suggestedAnswers_.WriteTo(output, _repeated_suggestedAnswers_codec); + if (additionalFilter_ != null) { + output.WriteRawTag(50); + output.WriteMessage(AdditionalFilter); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -5078,14 +8248,23 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Key.Length != 0) { + if (ConversationId.Length != 0) { output.WriteRawTag(10); - output.WriteString(Key); + output.WriteString(ConversationId); } - values_.WriteTo(ref output, _repeated_values_codec); - if (DynamicFacet != false) { - output.WriteRawTag(24); - output.WriteBool(DynamicFacet); + if (RefinedQuery.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RefinedQuery); + } + additionalFilters_.WriteTo(ref output, _repeated_additionalFilters_codec); + if (FollowupQuestion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(FollowupQuestion); + } + suggestedAnswers_.WriteTo(ref output, _repeated_suggestedAnswers_codec); + if (additionalFilter_ != null) { + output.WriteRawTag(50); + output.WriteMessage(AdditionalFilter); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -5097,12 +8276,19 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + if (ConversationId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ConversationId); } - size += values_.CalculateSize(_repeated_values_codec); - if (DynamicFacet != false) { - size += 1 + 1; + if (RefinedQuery.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RefinedQuery); + } + size += additionalFilters_.CalculateSize(_repeated_additionalFilters_codec); + if (FollowupQuestion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FollowupQuestion); + } + size += suggestedAnswers_.CalculateSize(_repeated_suggestedAnswers_codec); + if (additionalFilter_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AdditionalFilter); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -5112,16 +8298,26 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(Facet other) { + public void MergeFrom(ConversationalSearchResult other) { if (other == null) { return; } - if (other.Key.Length != 0) { - Key = other.Key; + if (other.ConversationId.Length != 0) { + ConversationId = other.ConversationId; } - values_.Add(other.values_); - if (other.DynamicFacet != false) { - DynamicFacet = other.DynamicFacet; + if (other.RefinedQuery.Length != 0) { + RefinedQuery = other.RefinedQuery; + } + additionalFilters_.Add(other.additionalFilters_); + if (other.FollowupQuestion.Length != 0) { + FollowupQuestion = other.FollowupQuestion; + } + suggestedAnswers_.Add(other.suggestedAnswers_); + if (other.additionalFilter_ != null) { + if (additionalFilter_ == null) { + AdditionalFilter = new global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter(); + } + AdditionalFilter.MergeFrom(other.AdditionalFilter); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -5139,15 +8335,30 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Key = input.ReadString(); + ConversationId = input.ReadString(); break; } case 18: { - values_.AddEntriesFrom(input, _repeated_values_codec); + RefinedQuery = input.ReadString(); break; } - case 24: { - DynamicFacet = input.ReadBool(); + case 26: { + additionalFilters_.AddEntriesFrom(input, _repeated_additionalFilters_codec); + break; + } + case 34: { + FollowupQuestion = input.ReadString(); + break; + } + case 42: { + suggestedAnswers_.AddEntriesFrom(input, _repeated_suggestedAnswers_codec); + break; + } + case 50: { + if (additionalFilter_ == null) { + AdditionalFilter = new global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter(); + } + input.ReadMessage(AdditionalFilter); break; } } @@ -5166,15 +8377,30 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - Key = input.ReadString(); + ConversationId = input.ReadString(); break; } case 18: { - values_.AddEntriesFrom(ref input, _repeated_values_codec); + RefinedQuery = input.ReadString(); break; } - case 24: { - DynamicFacet = input.ReadBool(); + case 26: { + additionalFilters_.AddEntriesFrom(ref input, _repeated_additionalFilters_codec); + break; + } + case 34: { + FollowupQuestion = input.ReadString(); + break; + } + case 42: { + suggestedAnswers_.AddEntriesFrom(ref input, _repeated_suggestedAnswers_codec); + break; + } + case 50: { + if (additionalFilter_ == null) { + AdditionalFilter = new global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Types.AdditionalFilter(); + } + input.ReadMessage(AdditionalFilter); break; } } @@ -5183,29 +8409,29 @@ public void MergeFrom(pb::CodedInputStream input) { #endif #region Nested types - /// Container for nested types declared in the Facet message type. + /// Container for nested types declared in the ConversationalSearchResult message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { /// - /// A facet value which contains value names and their count. + /// Suggested answers to the follow-up question. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class FacetValue : pb::IMessage + public sealed partial class SuggestedAnswer : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FacetValue()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SuggestedAnswer()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchResponse.Types.Facet.Descriptor.NestedTypes[0]; } + get { return global::Google.Cloud.Retail.V2.SearchResponse.Types.ConversationalSearchResult.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -5216,7 +8442,7 @@ public sealed partial class FacetValue : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetValue() { + public SuggestedAnswer() { OnConstruction(); } @@ -5224,167 +8450,255 @@ public FacetValue() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetValue(FacetValue other) : this() { - count_ = other.count_; - minValue_ = other.minValue_; - maxValue_ = other.maxValue_; - switch (other.FacetValueCase) { - case FacetValueOneofCase.Value: - Value = other.Value; - break; - case FacetValueOneofCase.Interval: - Interval = other.Interval.Clone(); - break; - } - + public SuggestedAnswer(SuggestedAnswer other) : this() { + productAttributeValue_ = other.productAttributeValue_ != null ? other.productAttributeValue_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetValue Clone() { - return new FacetValue(this); + public SuggestedAnswer Clone() { + return new SuggestedAnswer(this); } - /// Field number for the "value" field. - public const int ValueFieldNumber = 1; + /// Field number for the "product_attribute_value" field. + public const int ProductAttributeValueFieldNumber = 1; + private global::Google.Cloud.Retail.V2.ProductAttributeValue productAttributeValue_; /// - /// Text value of a facet, such as "Black" for facet "colorFamilies". + /// Product attribute value, including an attribute key and an + /// attribute value. Other types can be added here in the future. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Value { - get { return HasValue ? (string) facetValue_ : ""; } + public global::Google.Cloud.Retail.V2.ProductAttributeValue ProductAttributeValue { + get { return productAttributeValue_; } set { - facetValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - facetValueCase_ = FacetValueOneofCase.Value; + productAttributeValue_ = value; } } - /// Gets whether the "value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool HasValue { - get { return facetValueCase_ == FacetValueOneofCase.Value; } + public override bool Equals(object other) { + return Equals(other as SuggestedAnswer); } - /// Clears the value of the oneof if it's currently set to "value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearValue() { - if (HasValue) { - ClearFacetValue(); + public bool Equals(SuggestedAnswer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; } + if (!object.Equals(ProductAttributeValue, other.ProductAttributeValue)) return false; + return Equals(_unknownFields, other._unknownFields); } - /// Field number for the "interval" field. - public const int IntervalFieldNumber = 2; - /// - /// Interval value for a facet, such as [10, 20) for facet "price". - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Google.Cloud.Retail.V2.Interval Interval { - get { return facetValueCase_ == FacetValueOneofCase.Interval ? (global::Google.Cloud.Retail.V2.Interval) facetValue_ : null; } - set { - facetValue_ = value; - facetValueCase_ = value == null ? FacetValueOneofCase.None : FacetValueOneofCase.Interval; + public override int GetHashCode() { + int hash = 1; + if (productAttributeValue_ != null) hash ^= ProductAttributeValue.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } + return hash; } - /// Field number for the "count" field. - public const int CountFieldNumber = 3; - private long count_; - /// - /// Number of items that have this facet value. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Count { - get { return count_; } - set { - count_ = value; + 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 (productAttributeValue_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ProductAttributeValue); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } + #endif } - /// Field number for the "min_value" field. - public const int MinValueFieldNumber = 5; - private double minValue_; - /// - /// The minimum value in the - /// [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval]. - /// Only supported on numerical facets and returned if - /// [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max] - /// is true. - /// + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public double MinValue { - get { return minValue_; } - set { - minValue_ = value; + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (productAttributeValue_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ProductAttributeValue); + } + 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 (productAttributeValue_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProductAttributeValue); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SuggestedAnswer other) { + if (other == null) { + return; + } + if (other.productAttributeValue_ != null) { + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + ProductAttributeValue.MergeFrom(other.ProductAttributeValue); } + _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 (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + input.ReadMessage(ProductAttributeValue); + 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 (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + input.ReadMessage(ProductAttributeValue); + break; + } + } + } + } + #endif + + } + + /// + /// Additional filter that client side need to apply. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AdditionalFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AdditionalFilter()); + 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.SearchResponse.Types.ConversationalSearchResult.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "max_value" field. - public const int MaxValueFieldNumber = 6; - private double maxValue_; - /// - /// The maximum value in the - /// [FacetValue.interval][google.cloud.retail.v2.SearchResponse.Facet.FacetValue.interval]. - /// Only supported on numerical facets and returned if - /// [SearchRequest.FacetSpec.FacetKey.return_min_max][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.return_min_max] - /// is true. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public double MaxValue { - get { return maxValue_; } - set { - maxValue_ = value; - } + public AdditionalFilter() { + OnConstruction(); } - private object facetValue_; - /// Enum of possible cases for the "facet_value" oneof. - public enum FacetValueOneofCase { - None = 0, - Value = 1, - Interval = 2, + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AdditionalFilter(AdditionalFilter other) : this() { + productAttributeValue_ = other.productAttributeValue_ != null ? other.productAttributeValue_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - private FacetValueOneofCase facetValueCase_ = FacetValueOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public FacetValueOneofCase FacetValueCase { - get { return facetValueCase_; } + public AdditionalFilter Clone() { + return new AdditionalFilter(this); } + /// Field number for the "product_attribute_value" field. + public const int ProductAttributeValueFieldNumber = 1; + private global::Google.Cloud.Retail.V2.ProductAttributeValue productAttributeValue_; + /// + /// Product attribute value, including an attribute key and an + /// attribute value. Other types can be added here in the future. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void ClearFacetValue() { - facetValueCase_ = FacetValueOneofCase.None; - facetValue_ = null; + public global::Google.Cloud.Retail.V2.ProductAttributeValue ProductAttributeValue { + get { return productAttributeValue_; } + set { + productAttributeValue_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as FacetValue); + return Equals(other as AdditionalFilter); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(FacetValue other) { + public bool Equals(AdditionalFilter other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Value != other.Value) return false; - if (!object.Equals(Interval, other.Interval)) return false; - if (Count != other.Count) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MinValue, other.MinValue)) return false; - if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(MaxValue, other.MaxValue)) return false; - if (FacetValueCase != other.FacetValueCase) return false; + if (!object.Equals(ProductAttributeValue, other.ProductAttributeValue)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -5392,12 +8706,7 @@ public bool Equals(FacetValue other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (HasValue) hash ^= Value.GetHashCode(); - if (facetValueCase_ == FacetValueOneofCase.Interval) hash ^= Interval.GetHashCode(); - if (Count != 0L) hash ^= Count.GetHashCode(); - if (MinValue != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MinValue); - if (MaxValue != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MaxValue); - hash ^= (int) facetValueCase_; + if (productAttributeValue_ != null) hash ^= ProductAttributeValue.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5416,25 +8725,9 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (HasValue) { + if (productAttributeValue_ != null) { output.WriteRawTag(10); - output.WriteString(Value); - } - if (facetValueCase_ == FacetValueOneofCase.Interval) { - output.WriteRawTag(18); - output.WriteMessage(Interval); - } - if (Count != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Count); - } - if (MinValue != 0D) { - output.WriteRawTag(41); - output.WriteDouble(MinValue); - } - if (MaxValue != 0D) { - output.WriteRawTag(49); - output.WriteDouble(MaxValue); + output.WriteMessage(ProductAttributeValue); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -5446,25 +8739,9 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (HasValue) { + if (productAttributeValue_ != null) { output.WriteRawTag(10); - output.WriteString(Value); - } - if (facetValueCase_ == FacetValueOneofCase.Interval) { - output.WriteRawTag(18); - output.WriteMessage(Interval); - } - if (Count != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Count); - } - if (MinValue != 0D) { - output.WriteRawTag(41); - output.WriteDouble(MinValue); - } - if (MaxValue != 0D) { - output.WriteRawTag(49); - output.WriteDouble(MaxValue); + output.WriteMessage(ProductAttributeValue); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -5476,20 +8753,8 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (HasValue) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); - } - if (facetValueCase_ == FacetValueOneofCase.Interval) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Interval); - } - if (Count != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count); - } - if (MinValue != 0D) { - size += 1 + 8; - } - if (MaxValue != 0D) { - size += 1 + 8; + if (productAttributeValue_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProductAttributeValue); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -5499,31 +8764,16 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(FacetValue other) { + public void MergeFrom(AdditionalFilter other) { if (other == null) { return; } - if (other.Count != 0L) { - Count = other.Count; - } - if (other.MinValue != 0D) { - MinValue = other.MinValue; - } - if (other.MaxValue != 0D) { - MaxValue = other.MaxValue; - } - switch (other.FacetValueCase) { - case FacetValueOneofCase.Value: - Value = other.Value; - break; - case FacetValueOneofCase.Interval: - if (Interval == null) { - Interval = new global::Google.Cloud.Retail.V2.Interval(); - } - Interval.MergeFrom(other.Interval); - break; + if (other.productAttributeValue_ != null) { + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); + } + ProductAttributeValue.MergeFrom(other.ProductAttributeValue); } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -5540,28 +8790,10 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Value = input.ReadString(); - break; - } - case 18: { - global::Google.Cloud.Retail.V2.Interval subBuilder = new global::Google.Cloud.Retail.V2.Interval(); - if (facetValueCase_ == FacetValueOneofCase.Interval) { - subBuilder.MergeFrom(Interval); + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); } - input.ReadMessage(subBuilder); - Interval = subBuilder; - break; - } - case 24: { - Count = input.ReadInt64(); - break; - } - case 41: { - MinValue = input.ReadDouble(); - break; - } - case 49: { - MaxValue = input.ReadDouble(); + input.ReadMessage(ProductAttributeValue); break; } } @@ -5580,28 +8812,10 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - Value = input.ReadString(); - break; - } - case 18: { - global::Google.Cloud.Retail.V2.Interval subBuilder = new global::Google.Cloud.Retail.V2.Interval(); - if (facetValueCase_ == FacetValueOneofCase.Interval) { - subBuilder.MergeFrom(Interval); + if (productAttributeValue_ == null) { + ProductAttributeValue = new global::Google.Cloud.Retail.V2.ProductAttributeValue(); } - input.ReadMessage(subBuilder); - Interval = subBuilder; - break; - } - case 24: { - Count = input.ReadInt64(); - break; - } - case 41: { - MinValue = input.ReadDouble(); - break; - } - case 49: { - MaxValue = input.ReadDouble(); + input.ReadMessage(ProductAttributeValue); break; } } @@ -5617,25 +8831,25 @@ public void MergeFrom(pb::CodedInputStream input) { } /// - /// Information describing query expansion including whether expansion has - /// occurred. + /// This field specifies all related information for tile navigation that will + /// be used in client side. /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class QueryExpansionInfo : pb::IMessage + public sealed partial class TileNavigationResult : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueryExpansionInfo()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TileNavigationResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + 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.SearchResponse.Descriptor.NestedTypes[2]; } + get { return global::Google.Cloud.Retail.V2.SearchResponse.Descriptor.NestedTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -5646,7 +8860,7 @@ public sealed partial class QueryExpansionInfo : pb::IMessageField number for the "expanded_query" field. - public const int ExpandedQueryFieldNumber = 1; - private bool expandedQuery_; - /// - /// Bool describing whether query expansion has occurred. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool ExpandedQuery { - get { return expandedQuery_; } - set { - expandedQuery_ = value; - } + public TileNavigationResult Clone() { + return new TileNavigationResult(this); } - /// Field number for the "pinned_result_count" field. - public const int PinnedResultCountFieldNumber = 2; - private long pinnedResultCount_; + /// Field number for the "tiles" field. + public const int TilesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_tiles_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.Retail.V2.Tile.Parser); + private readonly pbc::RepeatedField tiles_ = new pbc::RepeatedField(); /// - /// Number of pinned results. This field will only be set when expansion - /// happens and - /// [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.pin_unexpanded_results] - /// is set to true. + /// The current tiles that are used for tile navigation, sorted by + /// engagement. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long PinnedResultCount { - get { return pinnedResultCount_; } - set { - pinnedResultCount_ = value; - } + public pbc::RepeatedField Tiles { + get { return tiles_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as QueryExpansionInfo); + return Equals(other as TileNavigationResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(QueryExpansionInfo other) { + public bool Equals(TileNavigationResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ExpandedQuery != other.ExpandedQuery) return false; - if (PinnedResultCount != other.PinnedResultCount) return false; + if(!tiles_.Equals(other.tiles_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -5723,8 +8917,7 @@ public bool Equals(QueryExpansionInfo other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ExpandedQuery != false) hash ^= ExpandedQuery.GetHashCode(); - if (PinnedResultCount != 0L) hash ^= PinnedResultCount.GetHashCode(); + hash ^= tiles_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5743,14 +8936,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (ExpandedQuery != false) { - output.WriteRawTag(8); - output.WriteBool(ExpandedQuery); - } - if (PinnedResultCount != 0L) { - output.WriteRawTag(16); - output.WriteInt64(PinnedResultCount); - } + tiles_.WriteTo(output, _repeated_tiles_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -5761,14 +8947,7 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (ExpandedQuery != false) { - output.WriteRawTag(8); - output.WriteBool(ExpandedQuery); - } - if (PinnedResultCount != 0L) { - output.WriteRawTag(16); - output.WriteInt64(PinnedResultCount); - } + tiles_.WriteTo(ref output, _repeated_tiles_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -5779,12 +8958,7 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ExpandedQuery != false) { - size += 1 + 1; - } - if (PinnedResultCount != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(PinnedResultCount); - } + size += tiles_.CalculateSize(_repeated_tiles_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -5793,16 +8967,11 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(QueryExpansionInfo other) { + public void MergeFrom(TileNavigationResult other) { if (other == null) { return; } - if (other.ExpandedQuery != false) { - ExpandedQuery = other.ExpandedQuery; - } - if (other.PinnedResultCount != 0L) { - PinnedResultCount = other.PinnedResultCount; - } + tiles_.Add(other.tiles_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -5818,12 +8987,8 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ExpandedQuery = input.ReadBool(); - break; - } - case 16: { - PinnedResultCount = input.ReadInt64(); + case 10: { + tiles_.AddEntriesFrom(input, _repeated_tiles_codec); break; } } @@ -5841,12 +9006,8 @@ public void MergeFrom(pb::CodedInputStream input) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - ExpandedQuery = input.ReadBool(); - break; - } - case 16: { - PinnedResultCount = input.ReadInt64(); + case 10: { + tiles_.AddEntriesFrom(ref input, _repeated_tiles_codec); break; } } @@ -5879,7 +9040,7 @@ public sealed partial class ExperimentInfo : pb::IMessage [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]; } + get { return global::Google.Cloud.Retail.V2.SearchServiceReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 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 9c89150c586d..4ab21b747471 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 @@ -165,6 +165,42 @@ public static IServiceCollection AddControlServiceClient(this IServiceCollection 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 AddGenerativeQuestionServiceClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcrv::GenerativeQuestionServiceClientBuilder builder = new gcrv::GenerativeQuestionServiceClientBuilder(); + action?.Invoke(builder); + 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 AddGenerativeQuestionServiceClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcrv::GenerativeQuestionServiceClientBuilder builder = new gcrv::GenerativeQuestionServiceClientBuilder(); + action?.Invoke(provider, builder); + 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. diff --git a/apis/Google.Cloud.Retail.V2/gapic_metadata.json b/apis/Google.Cloud.Retail.V2/gapic_metadata.json index 5c8a1d3c9597..16cecb5b1131 100644 --- a/apis/Google.Cloud.Retail.V2/gapic_metadata.json +++ b/apis/Google.Cloud.Retail.V2/gapic_metadata.json @@ -155,6 +155,45 @@ } } }, + "GenerativeQuestionService": { + "clients": { + "grpc": { + "libraryClient": "GenerativeQuestionServiceClient", + "rpcs": { + "BatchUpdateGenerativeQuestionConfigs": { + "methods": [ + "BatchUpdateGenerativeQuestionConfigs", + "BatchUpdateGenerativeQuestionConfigsAsync" + ] + }, + "GetGenerativeQuestionsFeatureConfig": { + "methods": [ + "GetGenerativeQuestionsFeatureConfig", + "GetGenerativeQuestionsFeatureConfigAsync" + ] + }, + "ListGenerativeQuestionConfigs": { + "methods": [ + "ListGenerativeQuestionConfigs", + "ListGenerativeQuestionConfigsAsync" + ] + }, + "UpdateGenerativeQuestionConfig": { + "methods": [ + "UpdateGenerativeQuestionConfig", + "UpdateGenerativeQuestionConfigAsync" + ] + }, + "UpdateGenerativeQuestionsFeatureConfig": { + "methods": [ + "UpdateGenerativeQuestionsFeatureConfig", + "UpdateGenerativeQuestionsFeatureConfigAsync" + ] + } + } + } + } + }, "ModelService": { "clients": { "grpc": {