@google-cloud/discoveryengine 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +459 -134
- package/build/protos/protos.d.ts +1400 -103
- package/build/protos/protos.js +3602 -201
- package/build/protos/protos.json +331 -35
- package/build/src/v1/assistant_service_client.js +1 -1
- package/build/src/v1/cmek_config_service_client.js +1 -1
- package/build/src/v1/completion_service_client.js +1 -1
- package/build/src/v1/control_service_client.js +1 -1
- package/build/src/v1/conversational_search_service_client.js +1 -1
- package/build/src/v1/data_store_service_client.js +1 -1
- package/build/src/v1/document_service_client.js +1 -1
- package/build/src/v1/engine_service_client.js +1 -1
- package/build/src/v1/grounded_generation_service_client.js +1 -1
- package/build/src/v1/identity_mapping_store_service_client.js +1 -1
- package/build/src/v1/index.js +1 -1
- package/build/src/v1/project_service_client.js +1 -1
- package/build/src/v1/rank_service_client.js +1 -1
- package/build/src/v1/recommendation_service_client.js +1 -1
- package/build/src/v1/schema_service_client.js +1 -1
- package/build/src/v1/search_service_client.d.ts +672 -432
- package/build/src/v1/search_service_client.js +449 -289
- package/build/src/v1/search_tuning_service_client.js +1 -1
- package/build/src/v1/serving_config_service_client.js +1 -1
- package/build/src/v1/session_service_client.js +1 -1
- package/build/src/v1/site_search_engine_service_client.js +1 -1
- package/build/src/v1/user_event_service_client.js +1 -1
- package/build/src/v1/user_license_service_client.js +1 -1
- package/build/src/v1alpha/acl_config_service_client.js +1 -1
- package/build/src/v1alpha/chunk_service_client.js +1 -1
- package/build/src/v1alpha/completion_service_client.js +1 -1
- package/build/src/v1alpha/control_service_client.js +1 -1
- package/build/src/v1alpha/conversational_search_service_client.js +1 -1
- package/build/src/v1alpha/data_store_service_client.js +1 -1
- package/build/src/v1alpha/document_service_client.js +1 -1
- package/build/src/v1alpha/engine_service_client.js +1 -1
- package/build/src/v1alpha/estimate_billing_service_client.js +1 -1
- package/build/src/v1alpha/evaluation_service_client.js +1 -1
- package/build/src/v1alpha/grounded_generation_service_client.js +1 -1
- package/build/src/v1alpha/index.js +1 -1
- package/build/src/v1alpha/project_service_client.js +1 -1
- package/build/src/v1alpha/rank_service_client.js +1 -1
- package/build/src/v1alpha/recommendation_service_client.js +1 -1
- package/build/src/v1alpha/sample_query_service_client.js +1 -1
- package/build/src/v1alpha/sample_query_set_service_client.js +1 -1
- package/build/src/v1alpha/schema_service_client.js +1 -1
- package/build/src/v1alpha/search_service_client.js +1 -1
- package/build/src/v1alpha/search_tuning_service_client.js +1 -1
- package/build/src/v1alpha/serving_config_service_client.js +1 -1
- package/build/src/v1alpha/session_service_client.js +1 -1
- package/build/src/v1alpha/site_search_engine_service_client.js +1 -1
- package/build/src/v1alpha/user_event_service_client.js +1 -1
- package/build/src/v1beta/completion_service_client.js +1 -1
- package/build/src/v1beta/control_service_client.js +1 -1
- package/build/src/v1beta/conversational_search_service_client.js +1 -1
- package/build/src/v1beta/data_store_service_client.js +1 -1
- package/build/src/v1beta/document_service_client.js +1 -1
- package/build/src/v1beta/engine_service_client.js +1 -1
- package/build/src/v1beta/evaluation_service_client.js +1 -1
- package/build/src/v1beta/grounded_generation_service_client.js +1 -1
- package/build/src/v1beta/index.js +1 -1
- package/build/src/v1beta/project_service_client.js +1 -1
- package/build/src/v1beta/rank_service_client.js +1 -1
- package/build/src/v1beta/recommendation_service_client.js +1 -1
- package/build/src/v1beta/sample_query_service_client.js +1 -1
- package/build/src/v1beta/sample_query_set_service_client.js +1 -1
- package/build/src/v1beta/schema_service_client.js +1 -1
- package/build/src/v1beta/search_service_client.js +1 -1
- package/build/src/v1beta/search_tuning_service_client.js +1 -1
- package/build/src/v1beta/serving_config_service_client.js +1 -1
- package/build/src/v1beta/session_service_client.js +1 -1
- package/build/src/v1beta/site_search_engine_service_client.js +1 -1
- package/build/src/v1beta/user_event_service_client.js +1 -1
- package/package.json +2 -2
package/build/protos/protos.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -12623,6 +12623,7 @@
|
|
|
12623
12623
|
* @property {string|null} [servingConfig] SearchRequest servingConfig
|
|
12624
12624
|
* @property {string|null} [branch] SearchRequest branch
|
|
12625
12625
|
* @property {string|null} [query] SearchRequest query
|
|
12626
|
+
* @property {Array.<string>|null} [pageCategories] SearchRequest pageCategories
|
|
12626
12627
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.IImageQuery|null} [imageQuery] SearchRequest imageQuery
|
|
12627
12628
|
* @property {number|null} [pageSize] SearchRequest pageSize
|
|
12628
12629
|
* @property {string|null} [pageToken] SearchRequest pageToken
|
|
@@ -12641,16 +12642,18 @@
|
|
|
12641
12642
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.ISpellCorrectionSpec|null} [spellCorrectionSpec] SearchRequest spellCorrectionSpec
|
|
12642
12643
|
* @property {string|null} [userPseudoId] SearchRequest userPseudoId
|
|
12643
12644
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.IContentSearchSpec|null} [contentSearchSpec] SearchRequest contentSearchSpec
|
|
12645
|
+
* @property {string|null} [rankingExpression] SearchRequest rankingExpression
|
|
12646
|
+
* @property {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend|null} [rankingExpressionBackend] SearchRequest rankingExpressionBackend
|
|
12644
12647
|
* @property {boolean|null} [safeSearch] SearchRequest safeSearch
|
|
12645
12648
|
* @property {Object.<string,string>|null} [userLabels] SearchRequest userLabels
|
|
12649
|
+
* @property {google.cloud.discoveryengine.v1.SearchRequest.INaturalLanguageQueryUnderstandingSpec|null} [naturalLanguageQueryUnderstandingSpec] SearchRequest naturalLanguageQueryUnderstandingSpec
|
|
12646
12650
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null} [searchAsYouTypeSpec] SearchRequest searchAsYouTypeSpec
|
|
12647
12651
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.IDisplaySpec|null} [displaySpec] SearchRequest displaySpec
|
|
12652
|
+
* @property {Array.<google.cloud.discoveryengine.v1.SearchRequest.ICrowdingSpec>|null} [crowdingSpecs] SearchRequest crowdingSpecs
|
|
12648
12653
|
* @property {string|null} [session] SearchRequest session
|
|
12649
12654
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null} [sessionSpec] SearchRequest sessionSpec
|
|
12650
12655
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold|null} [relevanceThreshold] SearchRequest relevanceThreshold
|
|
12651
12656
|
* @property {google.cloud.discoveryengine.v1.SearchRequest.IRelevanceScoreSpec|null} [relevanceScoreSpec] SearchRequest relevanceScoreSpec
|
|
12652
|
-
* @property {string|null} [rankingExpression] SearchRequest rankingExpression
|
|
12653
|
-
* @property {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend|null} [rankingExpressionBackend] SearchRequest rankingExpressionBackend
|
|
12654
12657
|
*/
|
|
12655
12658
|
|
|
12656
12659
|
/**
|
|
@@ -12662,10 +12665,12 @@
|
|
|
12662
12665
|
* @param {google.cloud.discoveryengine.v1.ISearchRequest=} [properties] Properties to set
|
|
12663
12666
|
*/
|
|
12664
12667
|
function SearchRequest(properties) {
|
|
12668
|
+
this.pageCategories = [];
|
|
12665
12669
|
this.dataStoreSpecs = [];
|
|
12666
12670
|
this.facetSpecs = [];
|
|
12667
12671
|
this.params = {};
|
|
12668
12672
|
this.userLabels = {};
|
|
12673
|
+
this.crowdingSpecs = [];
|
|
12669
12674
|
if (properties)
|
|
12670
12675
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
12671
12676
|
if (properties[keys[i]] != null)
|
|
@@ -12696,6 +12701,14 @@
|
|
|
12696
12701
|
*/
|
|
12697
12702
|
SearchRequest.prototype.query = "";
|
|
12698
12703
|
|
|
12704
|
+
/**
|
|
12705
|
+
* SearchRequest pageCategories.
|
|
12706
|
+
* @member {Array.<string>} pageCategories
|
|
12707
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12708
|
+
* @instance
|
|
12709
|
+
*/
|
|
12710
|
+
SearchRequest.prototype.pageCategories = $util.emptyArray;
|
|
12711
|
+
|
|
12699
12712
|
/**
|
|
12700
12713
|
* SearchRequest imageQuery.
|
|
12701
12714
|
* @member {google.cloud.discoveryengine.v1.SearchRequest.IImageQuery|null|undefined} imageQuery
|
|
@@ -12840,6 +12853,22 @@
|
|
|
12840
12853
|
*/
|
|
12841
12854
|
SearchRequest.prototype.contentSearchSpec = null;
|
|
12842
12855
|
|
|
12856
|
+
/**
|
|
12857
|
+
* SearchRequest rankingExpression.
|
|
12858
|
+
* @member {string} rankingExpression
|
|
12859
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12860
|
+
* @instance
|
|
12861
|
+
*/
|
|
12862
|
+
SearchRequest.prototype.rankingExpression = "";
|
|
12863
|
+
|
|
12864
|
+
/**
|
|
12865
|
+
* SearchRequest rankingExpressionBackend.
|
|
12866
|
+
* @member {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} rankingExpressionBackend
|
|
12867
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12868
|
+
* @instance
|
|
12869
|
+
*/
|
|
12870
|
+
SearchRequest.prototype.rankingExpressionBackend = 0;
|
|
12871
|
+
|
|
12843
12872
|
/**
|
|
12844
12873
|
* SearchRequest safeSearch.
|
|
12845
12874
|
* @member {boolean} safeSearch
|
|
@@ -12856,6 +12885,14 @@
|
|
|
12856
12885
|
*/
|
|
12857
12886
|
SearchRequest.prototype.userLabels = $util.emptyObject;
|
|
12858
12887
|
|
|
12888
|
+
/**
|
|
12889
|
+
* SearchRequest naturalLanguageQueryUnderstandingSpec.
|
|
12890
|
+
* @member {google.cloud.discoveryengine.v1.SearchRequest.INaturalLanguageQueryUnderstandingSpec|null|undefined} naturalLanguageQueryUnderstandingSpec
|
|
12891
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12892
|
+
* @instance
|
|
12893
|
+
*/
|
|
12894
|
+
SearchRequest.prototype.naturalLanguageQueryUnderstandingSpec = null;
|
|
12895
|
+
|
|
12859
12896
|
/**
|
|
12860
12897
|
* SearchRequest searchAsYouTypeSpec.
|
|
12861
12898
|
* @member {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null|undefined} searchAsYouTypeSpec
|
|
@@ -12872,6 +12909,14 @@
|
|
|
12872
12909
|
*/
|
|
12873
12910
|
SearchRequest.prototype.displaySpec = null;
|
|
12874
12911
|
|
|
12912
|
+
/**
|
|
12913
|
+
* SearchRequest crowdingSpecs.
|
|
12914
|
+
* @member {Array.<google.cloud.discoveryengine.v1.SearchRequest.ICrowdingSpec>} crowdingSpecs
|
|
12915
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12916
|
+
* @instance
|
|
12917
|
+
*/
|
|
12918
|
+
SearchRequest.prototype.crowdingSpecs = $util.emptyArray;
|
|
12919
|
+
|
|
12875
12920
|
/**
|
|
12876
12921
|
* SearchRequest session.
|
|
12877
12922
|
* @member {string} session
|
|
@@ -12904,22 +12949,6 @@
|
|
|
12904
12949
|
*/
|
|
12905
12950
|
SearchRequest.prototype.relevanceScoreSpec = null;
|
|
12906
12951
|
|
|
12907
|
-
/**
|
|
12908
|
-
* SearchRequest rankingExpression.
|
|
12909
|
-
* @member {string} rankingExpression
|
|
12910
|
-
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12911
|
-
* @instance
|
|
12912
|
-
*/
|
|
12913
|
-
SearchRequest.prototype.rankingExpression = "";
|
|
12914
|
-
|
|
12915
|
-
/**
|
|
12916
|
-
* SearchRequest rankingExpressionBackend.
|
|
12917
|
-
* @member {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} rankingExpressionBackend
|
|
12918
|
-
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
12919
|
-
* @instance
|
|
12920
|
-
*/
|
|
12921
|
-
SearchRequest.prototype.rankingExpressionBackend = 0;
|
|
12922
|
-
|
|
12923
12952
|
/**
|
|
12924
12953
|
* Creates a new SearchRequest instance using the specified properties.
|
|
12925
12954
|
* @function create
|
|
@@ -12989,6 +13018,8 @@
|
|
|
12989
13018
|
$root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.encode(message.contentSearchSpec, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
|
|
12990
13019
|
if (message.rankingExpression != null && Object.hasOwnProperty.call(message, "rankingExpression"))
|
|
12991
13020
|
writer.uint32(/* id 26, wireType 2 =*/210).string(message.rankingExpression);
|
|
13021
|
+
if (message.naturalLanguageQueryUnderstandingSpec != null && Object.hasOwnProperty.call(message, "naturalLanguageQueryUnderstandingSpec"))
|
|
13022
|
+
$root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.encode(message.naturalLanguageQueryUnderstandingSpec, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
|
|
12992
13023
|
if (message.canonicalFilter != null && Object.hasOwnProperty.call(message, "canonicalFilter"))
|
|
12993
13024
|
writer.uint32(/* id 29, wireType 2 =*/234).string(message.canonicalFilter);
|
|
12994
13025
|
if (message.searchAsYouTypeSpec != null && Object.hasOwnProperty.call(message, "searchAsYouTypeSpec"))
|
|
@@ -13000,6 +13031,9 @@
|
|
|
13000
13031
|
writer.uint32(/* id 35, wireType 2 =*/282).string(message.languageCode);
|
|
13001
13032
|
if (message.displaySpec != null && Object.hasOwnProperty.call(message, "displaySpec"))
|
|
13002
13033
|
$root.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.encode(message.displaySpec, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
|
|
13034
|
+
if (message.crowdingSpecs != null && message.crowdingSpecs.length)
|
|
13035
|
+
for (var i = 0; i < message.crowdingSpecs.length; ++i)
|
|
13036
|
+
$root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.encode(message.crowdingSpecs[i], writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
|
|
13003
13037
|
if (message.session != null && Object.hasOwnProperty.call(message, "session"))
|
|
13004
13038
|
writer.uint32(/* id 41, wireType 2 =*/330).string(message.session);
|
|
13005
13039
|
if (message.sessionSpec != null && Object.hasOwnProperty.call(message, "sessionSpec"))
|
|
@@ -13012,6 +13046,9 @@
|
|
|
13012
13046
|
$root.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec.encode(message.relevanceScoreSpec, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim();
|
|
13013
13047
|
if (message.rankingExpressionBackend != null && Object.hasOwnProperty.call(message, "rankingExpressionBackend"))
|
|
13014
13048
|
writer.uint32(/* id 53, wireType 0 =*/424).int32(message.rankingExpressionBackend);
|
|
13049
|
+
if (message.pageCategories != null && message.pageCategories.length)
|
|
13050
|
+
for (var i = 0; i < message.pageCategories.length; ++i)
|
|
13051
|
+
writer.uint32(/* id 63, wireType 2 =*/506).string(message.pageCategories[i]);
|
|
13015
13052
|
return writer;
|
|
13016
13053
|
};
|
|
13017
13054
|
|
|
@@ -13060,6 +13097,12 @@
|
|
|
13060
13097
|
message.query = reader.string();
|
|
13061
13098
|
break;
|
|
13062
13099
|
}
|
|
13100
|
+
case 63: {
|
|
13101
|
+
if (!(message.pageCategories && message.pageCategories.length))
|
|
13102
|
+
message.pageCategories = [];
|
|
13103
|
+
message.pageCategories.push(reader.string());
|
|
13104
|
+
break;
|
|
13105
|
+
}
|
|
13063
13106
|
case 19: {
|
|
13064
13107
|
message.imageQuery = $root.google.cloud.discoveryengine.v1.SearchRequest.ImageQuery.decode(reader, reader.uint32());
|
|
13065
13108
|
break;
|
|
@@ -13155,6 +13198,14 @@
|
|
|
13155
13198
|
message.contentSearchSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.decode(reader, reader.uint32());
|
|
13156
13199
|
break;
|
|
13157
13200
|
}
|
|
13201
|
+
case 26: {
|
|
13202
|
+
message.rankingExpression = reader.string();
|
|
13203
|
+
break;
|
|
13204
|
+
}
|
|
13205
|
+
case 53: {
|
|
13206
|
+
message.rankingExpressionBackend = reader.int32();
|
|
13207
|
+
break;
|
|
13208
|
+
}
|
|
13158
13209
|
case 20: {
|
|
13159
13210
|
message.safeSearch = reader.bool();
|
|
13160
13211
|
break;
|
|
@@ -13182,6 +13233,10 @@
|
|
|
13182
13233
|
message.userLabels[key] = value;
|
|
13183
13234
|
break;
|
|
13184
13235
|
}
|
|
13236
|
+
case 28: {
|
|
13237
|
+
message.naturalLanguageQueryUnderstandingSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.decode(reader, reader.uint32());
|
|
13238
|
+
break;
|
|
13239
|
+
}
|
|
13185
13240
|
case 31: {
|
|
13186
13241
|
message.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.decode(reader, reader.uint32());
|
|
13187
13242
|
break;
|
|
@@ -13190,6 +13245,12 @@
|
|
|
13190
13245
|
message.displaySpec = $root.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.decode(reader, reader.uint32());
|
|
13191
13246
|
break;
|
|
13192
13247
|
}
|
|
13248
|
+
case 40: {
|
|
13249
|
+
if (!(message.crowdingSpecs && message.crowdingSpecs.length))
|
|
13250
|
+
message.crowdingSpecs = [];
|
|
13251
|
+
message.crowdingSpecs.push($root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.decode(reader, reader.uint32()));
|
|
13252
|
+
break;
|
|
13253
|
+
}
|
|
13193
13254
|
case 41: {
|
|
13194
13255
|
message.session = reader.string();
|
|
13195
13256
|
break;
|
|
@@ -13206,14 +13267,6 @@
|
|
|
13206
13267
|
message.relevanceScoreSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec.decode(reader, reader.uint32());
|
|
13207
13268
|
break;
|
|
13208
13269
|
}
|
|
13209
|
-
case 26: {
|
|
13210
|
-
message.rankingExpression = reader.string();
|
|
13211
|
-
break;
|
|
13212
|
-
}
|
|
13213
|
-
case 53: {
|
|
13214
|
-
message.rankingExpressionBackend = reader.int32();
|
|
13215
|
-
break;
|
|
13216
|
-
}
|
|
13217
13270
|
default:
|
|
13218
13271
|
reader.skipType(tag & 7);
|
|
13219
13272
|
break;
|
|
@@ -13258,6 +13311,13 @@
|
|
|
13258
13311
|
if (message.query != null && message.hasOwnProperty("query"))
|
|
13259
13312
|
if (!$util.isString(message.query))
|
|
13260
13313
|
return "query: string expected";
|
|
13314
|
+
if (message.pageCategories != null && message.hasOwnProperty("pageCategories")) {
|
|
13315
|
+
if (!Array.isArray(message.pageCategories))
|
|
13316
|
+
return "pageCategories: array expected";
|
|
13317
|
+
for (var i = 0; i < message.pageCategories.length; ++i)
|
|
13318
|
+
if (!$util.isString(message.pageCategories[i]))
|
|
13319
|
+
return "pageCategories: string[] expected";
|
|
13320
|
+
}
|
|
13261
13321
|
if (message.imageQuery != null && message.hasOwnProperty("imageQuery")) {
|
|
13262
13322
|
var error = $root.google.cloud.discoveryengine.v1.SearchRequest.ImageQuery.verify(message.imageQuery);
|
|
13263
13323
|
if (error)
|
|
@@ -13343,6 +13403,20 @@
|
|
|
13343
13403
|
if (error)
|
|
13344
13404
|
return "contentSearchSpec." + error;
|
|
13345
13405
|
}
|
|
13406
|
+
if (message.rankingExpression != null && message.hasOwnProperty("rankingExpression"))
|
|
13407
|
+
if (!$util.isString(message.rankingExpression))
|
|
13408
|
+
return "rankingExpression: string expected";
|
|
13409
|
+
if (message.rankingExpressionBackend != null && message.hasOwnProperty("rankingExpressionBackend"))
|
|
13410
|
+
switch (message.rankingExpressionBackend) {
|
|
13411
|
+
default:
|
|
13412
|
+
return "rankingExpressionBackend: enum value expected";
|
|
13413
|
+
case 0:
|
|
13414
|
+
case 1:
|
|
13415
|
+
case 2:
|
|
13416
|
+
case 3:
|
|
13417
|
+
case 4:
|
|
13418
|
+
break;
|
|
13419
|
+
}
|
|
13346
13420
|
if (message.safeSearch != null && message.hasOwnProperty("safeSearch"))
|
|
13347
13421
|
if (typeof message.safeSearch !== "boolean")
|
|
13348
13422
|
return "safeSearch: boolean expected";
|
|
@@ -13354,6 +13428,11 @@
|
|
|
13354
13428
|
if (!$util.isString(message.userLabels[key[i]]))
|
|
13355
13429
|
return "userLabels: string{k:string} expected";
|
|
13356
13430
|
}
|
|
13431
|
+
if (message.naturalLanguageQueryUnderstandingSpec != null && message.hasOwnProperty("naturalLanguageQueryUnderstandingSpec")) {
|
|
13432
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.verify(message.naturalLanguageQueryUnderstandingSpec);
|
|
13433
|
+
if (error)
|
|
13434
|
+
return "naturalLanguageQueryUnderstandingSpec." + error;
|
|
13435
|
+
}
|
|
13357
13436
|
if (message.searchAsYouTypeSpec != null && message.hasOwnProperty("searchAsYouTypeSpec")) {
|
|
13358
13437
|
var error = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify(message.searchAsYouTypeSpec);
|
|
13359
13438
|
if (error)
|
|
@@ -13364,6 +13443,15 @@
|
|
|
13364
13443
|
if (error)
|
|
13365
13444
|
return "displaySpec." + error;
|
|
13366
13445
|
}
|
|
13446
|
+
if (message.crowdingSpecs != null && message.hasOwnProperty("crowdingSpecs")) {
|
|
13447
|
+
if (!Array.isArray(message.crowdingSpecs))
|
|
13448
|
+
return "crowdingSpecs: array expected";
|
|
13449
|
+
for (var i = 0; i < message.crowdingSpecs.length; ++i) {
|
|
13450
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.verify(message.crowdingSpecs[i]);
|
|
13451
|
+
if (error)
|
|
13452
|
+
return "crowdingSpecs." + error;
|
|
13453
|
+
}
|
|
13454
|
+
}
|
|
13367
13455
|
if (message.session != null && message.hasOwnProperty("session"))
|
|
13368
13456
|
if (!$util.isString(message.session))
|
|
13369
13457
|
return "session: string expected";
|
|
@@ -13388,18 +13476,6 @@
|
|
|
13388
13476
|
if (error)
|
|
13389
13477
|
return "relevanceScoreSpec." + error;
|
|
13390
13478
|
}
|
|
13391
|
-
if (message.rankingExpression != null && message.hasOwnProperty("rankingExpression"))
|
|
13392
|
-
if (!$util.isString(message.rankingExpression))
|
|
13393
|
-
return "rankingExpression: string expected";
|
|
13394
|
-
if (message.rankingExpressionBackend != null && message.hasOwnProperty("rankingExpressionBackend"))
|
|
13395
|
-
switch (message.rankingExpressionBackend) {
|
|
13396
|
-
default:
|
|
13397
|
-
return "rankingExpressionBackend: enum value expected";
|
|
13398
|
-
case 0:
|
|
13399
|
-
case 3:
|
|
13400
|
-
case 4:
|
|
13401
|
-
break;
|
|
13402
|
-
}
|
|
13403
13479
|
return null;
|
|
13404
13480
|
};
|
|
13405
13481
|
|
|
@@ -13421,6 +13497,13 @@
|
|
|
13421
13497
|
message.branch = String(object.branch);
|
|
13422
13498
|
if (object.query != null)
|
|
13423
13499
|
message.query = String(object.query);
|
|
13500
|
+
if (object.pageCategories) {
|
|
13501
|
+
if (!Array.isArray(object.pageCategories))
|
|
13502
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.pageCategories: array expected");
|
|
13503
|
+
message.pageCategories = [];
|
|
13504
|
+
for (var i = 0; i < object.pageCategories.length; ++i)
|
|
13505
|
+
message.pageCategories[i] = String(object.pageCategories[i]);
|
|
13506
|
+
}
|
|
13424
13507
|
if (object.imageQuery != null) {
|
|
13425
13508
|
if (typeof object.imageQuery !== "object")
|
|
13426
13509
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.imageQuery: object expected");
|
|
@@ -13499,6 +13582,36 @@
|
|
|
13499
13582
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.contentSearchSpec: object expected");
|
|
13500
13583
|
message.contentSearchSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.fromObject(object.contentSearchSpec);
|
|
13501
13584
|
}
|
|
13585
|
+
if (object.rankingExpression != null)
|
|
13586
|
+
message.rankingExpression = String(object.rankingExpression);
|
|
13587
|
+
switch (object.rankingExpressionBackend) {
|
|
13588
|
+
default:
|
|
13589
|
+
if (typeof object.rankingExpressionBackend === "number") {
|
|
13590
|
+
message.rankingExpressionBackend = object.rankingExpressionBackend;
|
|
13591
|
+
break;
|
|
13592
|
+
}
|
|
13593
|
+
break;
|
|
13594
|
+
case "RANKING_EXPRESSION_BACKEND_UNSPECIFIED":
|
|
13595
|
+
case 0:
|
|
13596
|
+
message.rankingExpressionBackend = 0;
|
|
13597
|
+
break;
|
|
13598
|
+
case "BYOE":
|
|
13599
|
+
case 1:
|
|
13600
|
+
message.rankingExpressionBackend = 1;
|
|
13601
|
+
break;
|
|
13602
|
+
case "CLEARBOX":
|
|
13603
|
+
case 2:
|
|
13604
|
+
message.rankingExpressionBackend = 2;
|
|
13605
|
+
break;
|
|
13606
|
+
case "RANK_BY_EMBEDDING":
|
|
13607
|
+
case 3:
|
|
13608
|
+
message.rankingExpressionBackend = 3;
|
|
13609
|
+
break;
|
|
13610
|
+
case "RANK_BY_FORMULA":
|
|
13611
|
+
case 4:
|
|
13612
|
+
message.rankingExpressionBackend = 4;
|
|
13613
|
+
break;
|
|
13614
|
+
}
|
|
13502
13615
|
if (object.safeSearch != null)
|
|
13503
13616
|
message.safeSearch = Boolean(object.safeSearch);
|
|
13504
13617
|
if (object.userLabels) {
|
|
@@ -13508,6 +13621,11 @@
|
|
|
13508
13621
|
for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i)
|
|
13509
13622
|
message.userLabels[keys[i]] = String(object.userLabels[keys[i]]);
|
|
13510
13623
|
}
|
|
13624
|
+
if (object.naturalLanguageQueryUnderstandingSpec != null) {
|
|
13625
|
+
if (typeof object.naturalLanguageQueryUnderstandingSpec !== "object")
|
|
13626
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.naturalLanguageQueryUnderstandingSpec: object expected");
|
|
13627
|
+
message.naturalLanguageQueryUnderstandingSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.fromObject(object.naturalLanguageQueryUnderstandingSpec);
|
|
13628
|
+
}
|
|
13511
13629
|
if (object.searchAsYouTypeSpec != null) {
|
|
13512
13630
|
if (typeof object.searchAsYouTypeSpec !== "object")
|
|
13513
13631
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.searchAsYouTypeSpec: object expected");
|
|
@@ -13518,6 +13636,16 @@
|
|
|
13518
13636
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.displaySpec: object expected");
|
|
13519
13637
|
message.displaySpec = $root.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.fromObject(object.displaySpec);
|
|
13520
13638
|
}
|
|
13639
|
+
if (object.crowdingSpecs) {
|
|
13640
|
+
if (!Array.isArray(object.crowdingSpecs))
|
|
13641
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.crowdingSpecs: array expected");
|
|
13642
|
+
message.crowdingSpecs = [];
|
|
13643
|
+
for (var i = 0; i < object.crowdingSpecs.length; ++i) {
|
|
13644
|
+
if (typeof object.crowdingSpecs[i] !== "object")
|
|
13645
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.crowdingSpecs: object expected");
|
|
13646
|
+
message.crowdingSpecs[i] = $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.fromObject(object.crowdingSpecs[i]);
|
|
13647
|
+
}
|
|
13648
|
+
}
|
|
13521
13649
|
if (object.session != null)
|
|
13522
13650
|
message.session = String(object.session);
|
|
13523
13651
|
if (object.sessionSpec != null) {
|
|
@@ -13558,28 +13686,6 @@
|
|
|
13558
13686
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.relevanceScoreSpec: object expected");
|
|
13559
13687
|
message.relevanceScoreSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec.fromObject(object.relevanceScoreSpec);
|
|
13560
13688
|
}
|
|
13561
|
-
if (object.rankingExpression != null)
|
|
13562
|
-
message.rankingExpression = String(object.rankingExpression);
|
|
13563
|
-
switch (object.rankingExpressionBackend) {
|
|
13564
|
-
default:
|
|
13565
|
-
if (typeof object.rankingExpressionBackend === "number") {
|
|
13566
|
-
message.rankingExpressionBackend = object.rankingExpressionBackend;
|
|
13567
|
-
break;
|
|
13568
|
-
}
|
|
13569
|
-
break;
|
|
13570
|
-
case "RANKING_EXPRESSION_BACKEND_UNSPECIFIED":
|
|
13571
|
-
case 0:
|
|
13572
|
-
message.rankingExpressionBackend = 0;
|
|
13573
|
-
break;
|
|
13574
|
-
case "RANK_BY_EMBEDDING":
|
|
13575
|
-
case 3:
|
|
13576
|
-
message.rankingExpressionBackend = 3;
|
|
13577
|
-
break;
|
|
13578
|
-
case "RANK_BY_FORMULA":
|
|
13579
|
-
case 4:
|
|
13580
|
-
message.rankingExpressionBackend = 4;
|
|
13581
|
-
break;
|
|
13582
|
-
}
|
|
13583
13689
|
return message;
|
|
13584
13690
|
};
|
|
13585
13691
|
|
|
@@ -13599,6 +13705,8 @@
|
|
|
13599
13705
|
if (options.arrays || options.defaults) {
|
|
13600
13706
|
object.facetSpecs = [];
|
|
13601
13707
|
object.dataStoreSpecs = [];
|
|
13708
|
+
object.crowdingSpecs = [];
|
|
13709
|
+
object.pageCategories = [];
|
|
13602
13710
|
}
|
|
13603
13711
|
if (options.objects || options.defaults) {
|
|
13604
13712
|
object.params = {};
|
|
@@ -13622,6 +13730,7 @@
|
|
|
13622
13730
|
object.userInfo = null;
|
|
13623
13731
|
object.contentSearchSpec = null;
|
|
13624
13732
|
object.rankingExpression = "";
|
|
13733
|
+
object.naturalLanguageQueryUnderstandingSpec = null;
|
|
13625
13734
|
object.canonicalFilter = "";
|
|
13626
13735
|
object.searchAsYouTypeSpec = null;
|
|
13627
13736
|
object.languageCode = "";
|
|
@@ -13683,6 +13792,8 @@
|
|
|
13683
13792
|
object.contentSearchSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.toObject(message.contentSearchSpec, options);
|
|
13684
13793
|
if (message.rankingExpression != null && message.hasOwnProperty("rankingExpression"))
|
|
13685
13794
|
object.rankingExpression = message.rankingExpression;
|
|
13795
|
+
if (message.naturalLanguageQueryUnderstandingSpec != null && message.hasOwnProperty("naturalLanguageQueryUnderstandingSpec"))
|
|
13796
|
+
object.naturalLanguageQueryUnderstandingSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.toObject(message.naturalLanguageQueryUnderstandingSpec, options);
|
|
13686
13797
|
if (message.canonicalFilter != null && message.hasOwnProperty("canonicalFilter"))
|
|
13687
13798
|
object.canonicalFilter = message.canonicalFilter;
|
|
13688
13799
|
if (message.searchAsYouTypeSpec != null && message.hasOwnProperty("searchAsYouTypeSpec"))
|
|
@@ -13696,6 +13807,11 @@
|
|
|
13696
13807
|
object.languageCode = message.languageCode;
|
|
13697
13808
|
if (message.displaySpec != null && message.hasOwnProperty("displaySpec"))
|
|
13698
13809
|
object.displaySpec = $root.google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec.toObject(message.displaySpec, options);
|
|
13810
|
+
if (message.crowdingSpecs && message.crowdingSpecs.length) {
|
|
13811
|
+
object.crowdingSpecs = [];
|
|
13812
|
+
for (var j = 0; j < message.crowdingSpecs.length; ++j)
|
|
13813
|
+
object.crowdingSpecs[j] = $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.toObject(message.crowdingSpecs[j], options);
|
|
13814
|
+
}
|
|
13699
13815
|
if (message.session != null && message.hasOwnProperty("session"))
|
|
13700
13816
|
object.session = message.session;
|
|
13701
13817
|
if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec"))
|
|
@@ -13708,6 +13824,11 @@
|
|
|
13708
13824
|
object.relevanceScoreSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec.toObject(message.relevanceScoreSpec, options);
|
|
13709
13825
|
if (message.rankingExpressionBackend != null && message.hasOwnProperty("rankingExpressionBackend"))
|
|
13710
13826
|
object.rankingExpressionBackend = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend[message.rankingExpressionBackend] === undefined ? message.rankingExpressionBackend : $root.google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend[message.rankingExpressionBackend] : message.rankingExpressionBackend;
|
|
13827
|
+
if (message.pageCategories && message.pageCategories.length) {
|
|
13828
|
+
object.pageCategories = [];
|
|
13829
|
+
for (var j = 0; j < message.pageCategories.length; ++j)
|
|
13830
|
+
object.pageCategories[j] = message.pageCategories[j];
|
|
13831
|
+
}
|
|
13711
13832
|
return object;
|
|
13712
13833
|
};
|
|
13713
13834
|
|
|
@@ -18518,6 +18639,395 @@
|
|
|
18518
18639
|
return ContentSearchSpec;
|
|
18519
18640
|
})();
|
|
18520
18641
|
|
|
18642
|
+
SearchRequest.NaturalLanguageQueryUnderstandingSpec = (function() {
|
|
18643
|
+
|
|
18644
|
+
/**
|
|
18645
|
+
* Properties of a NaturalLanguageQueryUnderstandingSpec.
|
|
18646
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
18647
|
+
* @interface INaturalLanguageQueryUnderstandingSpec
|
|
18648
|
+
* @property {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition|null} [filterExtractionCondition] NaturalLanguageQueryUnderstandingSpec filterExtractionCondition
|
|
18649
|
+
* @property {Array.<string>|null} [geoSearchQueryDetectionFieldNames] NaturalLanguageQueryUnderstandingSpec geoSearchQueryDetectionFieldNames
|
|
18650
|
+
* @property {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior|null} [extractedFilterBehavior] NaturalLanguageQueryUnderstandingSpec extractedFilterBehavior
|
|
18651
|
+
* @property {Array.<string>|null} [allowedFieldNames] NaturalLanguageQueryUnderstandingSpec allowedFieldNames
|
|
18652
|
+
*/
|
|
18653
|
+
|
|
18654
|
+
/**
|
|
18655
|
+
* Constructs a new NaturalLanguageQueryUnderstandingSpec.
|
|
18656
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
18657
|
+
* @classdesc Represents a NaturalLanguageQueryUnderstandingSpec.
|
|
18658
|
+
* @implements INaturalLanguageQueryUnderstandingSpec
|
|
18659
|
+
* @constructor
|
|
18660
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.INaturalLanguageQueryUnderstandingSpec=} [properties] Properties to set
|
|
18661
|
+
*/
|
|
18662
|
+
function NaturalLanguageQueryUnderstandingSpec(properties) {
|
|
18663
|
+
this.geoSearchQueryDetectionFieldNames = [];
|
|
18664
|
+
this.allowedFieldNames = [];
|
|
18665
|
+
if (properties)
|
|
18666
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
18667
|
+
if (properties[keys[i]] != null)
|
|
18668
|
+
this[keys[i]] = properties[keys[i]];
|
|
18669
|
+
}
|
|
18670
|
+
|
|
18671
|
+
/**
|
|
18672
|
+
* NaturalLanguageQueryUnderstandingSpec filterExtractionCondition.
|
|
18673
|
+
* @member {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition} filterExtractionCondition
|
|
18674
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18675
|
+
* @instance
|
|
18676
|
+
*/
|
|
18677
|
+
NaturalLanguageQueryUnderstandingSpec.prototype.filterExtractionCondition = 0;
|
|
18678
|
+
|
|
18679
|
+
/**
|
|
18680
|
+
* NaturalLanguageQueryUnderstandingSpec geoSearchQueryDetectionFieldNames.
|
|
18681
|
+
* @member {Array.<string>} geoSearchQueryDetectionFieldNames
|
|
18682
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18683
|
+
* @instance
|
|
18684
|
+
*/
|
|
18685
|
+
NaturalLanguageQueryUnderstandingSpec.prototype.geoSearchQueryDetectionFieldNames = $util.emptyArray;
|
|
18686
|
+
|
|
18687
|
+
/**
|
|
18688
|
+
* NaturalLanguageQueryUnderstandingSpec extractedFilterBehavior.
|
|
18689
|
+
* @member {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior} extractedFilterBehavior
|
|
18690
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18691
|
+
* @instance
|
|
18692
|
+
*/
|
|
18693
|
+
NaturalLanguageQueryUnderstandingSpec.prototype.extractedFilterBehavior = 0;
|
|
18694
|
+
|
|
18695
|
+
/**
|
|
18696
|
+
* NaturalLanguageQueryUnderstandingSpec allowedFieldNames.
|
|
18697
|
+
* @member {Array.<string>} allowedFieldNames
|
|
18698
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18699
|
+
* @instance
|
|
18700
|
+
*/
|
|
18701
|
+
NaturalLanguageQueryUnderstandingSpec.prototype.allowedFieldNames = $util.emptyArray;
|
|
18702
|
+
|
|
18703
|
+
/**
|
|
18704
|
+
* Creates a new NaturalLanguageQueryUnderstandingSpec instance using the specified properties.
|
|
18705
|
+
* @function create
|
|
18706
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18707
|
+
* @static
|
|
18708
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.INaturalLanguageQueryUnderstandingSpec=} [properties] Properties to set
|
|
18709
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} NaturalLanguageQueryUnderstandingSpec instance
|
|
18710
|
+
*/
|
|
18711
|
+
NaturalLanguageQueryUnderstandingSpec.create = function create(properties) {
|
|
18712
|
+
return new NaturalLanguageQueryUnderstandingSpec(properties);
|
|
18713
|
+
};
|
|
18714
|
+
|
|
18715
|
+
/**
|
|
18716
|
+
* Encodes the specified NaturalLanguageQueryUnderstandingSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.verify|verify} messages.
|
|
18717
|
+
* @function encode
|
|
18718
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18719
|
+
* @static
|
|
18720
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.INaturalLanguageQueryUnderstandingSpec} message NaturalLanguageQueryUnderstandingSpec message or plain object to encode
|
|
18721
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
18722
|
+
* @returns {$protobuf.Writer} Writer
|
|
18723
|
+
*/
|
|
18724
|
+
NaturalLanguageQueryUnderstandingSpec.encode = function encode(message, writer) {
|
|
18725
|
+
if (!writer)
|
|
18726
|
+
writer = $Writer.create();
|
|
18727
|
+
if (message.filterExtractionCondition != null && Object.hasOwnProperty.call(message, "filterExtractionCondition"))
|
|
18728
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.filterExtractionCondition);
|
|
18729
|
+
if (message.geoSearchQueryDetectionFieldNames != null && message.geoSearchQueryDetectionFieldNames.length)
|
|
18730
|
+
for (var i = 0; i < message.geoSearchQueryDetectionFieldNames.length; ++i)
|
|
18731
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.geoSearchQueryDetectionFieldNames[i]);
|
|
18732
|
+
if (message.extractedFilterBehavior != null && Object.hasOwnProperty.call(message, "extractedFilterBehavior"))
|
|
18733
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.extractedFilterBehavior);
|
|
18734
|
+
if (message.allowedFieldNames != null && message.allowedFieldNames.length)
|
|
18735
|
+
for (var i = 0; i < message.allowedFieldNames.length; ++i)
|
|
18736
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedFieldNames[i]);
|
|
18737
|
+
return writer;
|
|
18738
|
+
};
|
|
18739
|
+
|
|
18740
|
+
/**
|
|
18741
|
+
* Encodes the specified NaturalLanguageQueryUnderstandingSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.verify|verify} messages.
|
|
18742
|
+
* @function encodeDelimited
|
|
18743
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18744
|
+
* @static
|
|
18745
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.INaturalLanguageQueryUnderstandingSpec} message NaturalLanguageQueryUnderstandingSpec message or plain object to encode
|
|
18746
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
18747
|
+
* @returns {$protobuf.Writer} Writer
|
|
18748
|
+
*/
|
|
18749
|
+
NaturalLanguageQueryUnderstandingSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
18750
|
+
return this.encode(message, writer).ldelim();
|
|
18751
|
+
};
|
|
18752
|
+
|
|
18753
|
+
/**
|
|
18754
|
+
* Decodes a NaturalLanguageQueryUnderstandingSpec message from the specified reader or buffer.
|
|
18755
|
+
* @function decode
|
|
18756
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18757
|
+
* @static
|
|
18758
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
18759
|
+
* @param {number} [length] Message length if known beforehand
|
|
18760
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} NaturalLanguageQueryUnderstandingSpec
|
|
18761
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
18762
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
18763
|
+
*/
|
|
18764
|
+
NaturalLanguageQueryUnderstandingSpec.decode = function decode(reader, length, error) {
|
|
18765
|
+
if (!(reader instanceof $Reader))
|
|
18766
|
+
reader = $Reader.create(reader);
|
|
18767
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec();
|
|
18768
|
+
while (reader.pos < end) {
|
|
18769
|
+
var tag = reader.uint32();
|
|
18770
|
+
if (tag === error)
|
|
18771
|
+
break;
|
|
18772
|
+
switch (tag >>> 3) {
|
|
18773
|
+
case 1: {
|
|
18774
|
+
message.filterExtractionCondition = reader.int32();
|
|
18775
|
+
break;
|
|
18776
|
+
}
|
|
18777
|
+
case 2: {
|
|
18778
|
+
if (!(message.geoSearchQueryDetectionFieldNames && message.geoSearchQueryDetectionFieldNames.length))
|
|
18779
|
+
message.geoSearchQueryDetectionFieldNames = [];
|
|
18780
|
+
message.geoSearchQueryDetectionFieldNames.push(reader.string());
|
|
18781
|
+
break;
|
|
18782
|
+
}
|
|
18783
|
+
case 3: {
|
|
18784
|
+
message.extractedFilterBehavior = reader.int32();
|
|
18785
|
+
break;
|
|
18786
|
+
}
|
|
18787
|
+
case 4: {
|
|
18788
|
+
if (!(message.allowedFieldNames && message.allowedFieldNames.length))
|
|
18789
|
+
message.allowedFieldNames = [];
|
|
18790
|
+
message.allowedFieldNames.push(reader.string());
|
|
18791
|
+
break;
|
|
18792
|
+
}
|
|
18793
|
+
default:
|
|
18794
|
+
reader.skipType(tag & 7);
|
|
18795
|
+
break;
|
|
18796
|
+
}
|
|
18797
|
+
}
|
|
18798
|
+
return message;
|
|
18799
|
+
};
|
|
18800
|
+
|
|
18801
|
+
/**
|
|
18802
|
+
* Decodes a NaturalLanguageQueryUnderstandingSpec message from the specified reader or buffer, length delimited.
|
|
18803
|
+
* @function decodeDelimited
|
|
18804
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18805
|
+
* @static
|
|
18806
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
18807
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} NaturalLanguageQueryUnderstandingSpec
|
|
18808
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
18809
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
18810
|
+
*/
|
|
18811
|
+
NaturalLanguageQueryUnderstandingSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
18812
|
+
if (!(reader instanceof $Reader))
|
|
18813
|
+
reader = new $Reader(reader);
|
|
18814
|
+
return this.decode(reader, reader.uint32());
|
|
18815
|
+
};
|
|
18816
|
+
|
|
18817
|
+
/**
|
|
18818
|
+
* Verifies a NaturalLanguageQueryUnderstandingSpec message.
|
|
18819
|
+
* @function verify
|
|
18820
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18821
|
+
* @static
|
|
18822
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
18823
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
18824
|
+
*/
|
|
18825
|
+
NaturalLanguageQueryUnderstandingSpec.verify = function verify(message) {
|
|
18826
|
+
if (typeof message !== "object" || message === null)
|
|
18827
|
+
return "object expected";
|
|
18828
|
+
if (message.filterExtractionCondition != null && message.hasOwnProperty("filterExtractionCondition"))
|
|
18829
|
+
switch (message.filterExtractionCondition) {
|
|
18830
|
+
default:
|
|
18831
|
+
return "filterExtractionCondition: enum value expected";
|
|
18832
|
+
case 0:
|
|
18833
|
+
case 1:
|
|
18834
|
+
case 2:
|
|
18835
|
+
break;
|
|
18836
|
+
}
|
|
18837
|
+
if (message.geoSearchQueryDetectionFieldNames != null && message.hasOwnProperty("geoSearchQueryDetectionFieldNames")) {
|
|
18838
|
+
if (!Array.isArray(message.geoSearchQueryDetectionFieldNames))
|
|
18839
|
+
return "geoSearchQueryDetectionFieldNames: array expected";
|
|
18840
|
+
for (var i = 0; i < message.geoSearchQueryDetectionFieldNames.length; ++i)
|
|
18841
|
+
if (!$util.isString(message.geoSearchQueryDetectionFieldNames[i]))
|
|
18842
|
+
return "geoSearchQueryDetectionFieldNames: string[] expected";
|
|
18843
|
+
}
|
|
18844
|
+
if (message.extractedFilterBehavior != null && message.hasOwnProperty("extractedFilterBehavior"))
|
|
18845
|
+
switch (message.extractedFilterBehavior) {
|
|
18846
|
+
default:
|
|
18847
|
+
return "extractedFilterBehavior: enum value expected";
|
|
18848
|
+
case 0:
|
|
18849
|
+
case 1:
|
|
18850
|
+
case 2:
|
|
18851
|
+
break;
|
|
18852
|
+
}
|
|
18853
|
+
if (message.allowedFieldNames != null && message.hasOwnProperty("allowedFieldNames")) {
|
|
18854
|
+
if (!Array.isArray(message.allowedFieldNames))
|
|
18855
|
+
return "allowedFieldNames: array expected";
|
|
18856
|
+
for (var i = 0; i < message.allowedFieldNames.length; ++i)
|
|
18857
|
+
if (!$util.isString(message.allowedFieldNames[i]))
|
|
18858
|
+
return "allowedFieldNames: string[] expected";
|
|
18859
|
+
}
|
|
18860
|
+
return null;
|
|
18861
|
+
};
|
|
18862
|
+
|
|
18863
|
+
/**
|
|
18864
|
+
* Creates a NaturalLanguageQueryUnderstandingSpec message from a plain object. Also converts values to their respective internal types.
|
|
18865
|
+
* @function fromObject
|
|
18866
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18867
|
+
* @static
|
|
18868
|
+
* @param {Object.<string,*>} object Plain object
|
|
18869
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} NaturalLanguageQueryUnderstandingSpec
|
|
18870
|
+
*/
|
|
18871
|
+
NaturalLanguageQueryUnderstandingSpec.fromObject = function fromObject(object) {
|
|
18872
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec)
|
|
18873
|
+
return object;
|
|
18874
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec();
|
|
18875
|
+
switch (object.filterExtractionCondition) {
|
|
18876
|
+
default:
|
|
18877
|
+
if (typeof object.filterExtractionCondition === "number") {
|
|
18878
|
+
message.filterExtractionCondition = object.filterExtractionCondition;
|
|
18879
|
+
break;
|
|
18880
|
+
}
|
|
18881
|
+
break;
|
|
18882
|
+
case "CONDITION_UNSPECIFIED":
|
|
18883
|
+
case 0:
|
|
18884
|
+
message.filterExtractionCondition = 0;
|
|
18885
|
+
break;
|
|
18886
|
+
case "DISABLED":
|
|
18887
|
+
case 1:
|
|
18888
|
+
message.filterExtractionCondition = 1;
|
|
18889
|
+
break;
|
|
18890
|
+
case "ENABLED":
|
|
18891
|
+
case 2:
|
|
18892
|
+
message.filterExtractionCondition = 2;
|
|
18893
|
+
break;
|
|
18894
|
+
}
|
|
18895
|
+
if (object.geoSearchQueryDetectionFieldNames) {
|
|
18896
|
+
if (!Array.isArray(object.geoSearchQueryDetectionFieldNames))
|
|
18897
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.geoSearchQueryDetectionFieldNames: array expected");
|
|
18898
|
+
message.geoSearchQueryDetectionFieldNames = [];
|
|
18899
|
+
for (var i = 0; i < object.geoSearchQueryDetectionFieldNames.length; ++i)
|
|
18900
|
+
message.geoSearchQueryDetectionFieldNames[i] = String(object.geoSearchQueryDetectionFieldNames[i]);
|
|
18901
|
+
}
|
|
18902
|
+
switch (object.extractedFilterBehavior) {
|
|
18903
|
+
default:
|
|
18904
|
+
if (typeof object.extractedFilterBehavior === "number") {
|
|
18905
|
+
message.extractedFilterBehavior = object.extractedFilterBehavior;
|
|
18906
|
+
break;
|
|
18907
|
+
}
|
|
18908
|
+
break;
|
|
18909
|
+
case "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED":
|
|
18910
|
+
case 0:
|
|
18911
|
+
message.extractedFilterBehavior = 0;
|
|
18912
|
+
break;
|
|
18913
|
+
case "HARD_FILTER":
|
|
18914
|
+
case 1:
|
|
18915
|
+
message.extractedFilterBehavior = 1;
|
|
18916
|
+
break;
|
|
18917
|
+
case "SOFT_BOOST":
|
|
18918
|
+
case 2:
|
|
18919
|
+
message.extractedFilterBehavior = 2;
|
|
18920
|
+
break;
|
|
18921
|
+
}
|
|
18922
|
+
if (object.allowedFieldNames) {
|
|
18923
|
+
if (!Array.isArray(object.allowedFieldNames))
|
|
18924
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.allowedFieldNames: array expected");
|
|
18925
|
+
message.allowedFieldNames = [];
|
|
18926
|
+
for (var i = 0; i < object.allowedFieldNames.length; ++i)
|
|
18927
|
+
message.allowedFieldNames[i] = String(object.allowedFieldNames[i]);
|
|
18928
|
+
}
|
|
18929
|
+
return message;
|
|
18930
|
+
};
|
|
18931
|
+
|
|
18932
|
+
/**
|
|
18933
|
+
* Creates a plain object from a NaturalLanguageQueryUnderstandingSpec message. Also converts values to other types if specified.
|
|
18934
|
+
* @function toObject
|
|
18935
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18936
|
+
* @static
|
|
18937
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} message NaturalLanguageQueryUnderstandingSpec
|
|
18938
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
18939
|
+
* @returns {Object.<string,*>} Plain object
|
|
18940
|
+
*/
|
|
18941
|
+
NaturalLanguageQueryUnderstandingSpec.toObject = function toObject(message, options) {
|
|
18942
|
+
if (!options)
|
|
18943
|
+
options = {};
|
|
18944
|
+
var object = {};
|
|
18945
|
+
if (options.arrays || options.defaults) {
|
|
18946
|
+
object.geoSearchQueryDetectionFieldNames = [];
|
|
18947
|
+
object.allowedFieldNames = [];
|
|
18948
|
+
}
|
|
18949
|
+
if (options.defaults) {
|
|
18950
|
+
object.filterExtractionCondition = options.enums === String ? "CONDITION_UNSPECIFIED" : 0;
|
|
18951
|
+
object.extractedFilterBehavior = options.enums === String ? "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED" : 0;
|
|
18952
|
+
}
|
|
18953
|
+
if (message.filterExtractionCondition != null && message.hasOwnProperty("filterExtractionCondition"))
|
|
18954
|
+
object.filterExtractionCondition = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition[message.filterExtractionCondition] === undefined ? message.filterExtractionCondition : $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition[message.filterExtractionCondition] : message.filterExtractionCondition;
|
|
18955
|
+
if (message.geoSearchQueryDetectionFieldNames && message.geoSearchQueryDetectionFieldNames.length) {
|
|
18956
|
+
object.geoSearchQueryDetectionFieldNames = [];
|
|
18957
|
+
for (var j = 0; j < message.geoSearchQueryDetectionFieldNames.length; ++j)
|
|
18958
|
+
object.geoSearchQueryDetectionFieldNames[j] = message.geoSearchQueryDetectionFieldNames[j];
|
|
18959
|
+
}
|
|
18960
|
+
if (message.extractedFilterBehavior != null && message.hasOwnProperty("extractedFilterBehavior"))
|
|
18961
|
+
object.extractedFilterBehavior = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior[message.extractedFilterBehavior] === undefined ? message.extractedFilterBehavior : $root.google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior[message.extractedFilterBehavior] : message.extractedFilterBehavior;
|
|
18962
|
+
if (message.allowedFieldNames && message.allowedFieldNames.length) {
|
|
18963
|
+
object.allowedFieldNames = [];
|
|
18964
|
+
for (var j = 0; j < message.allowedFieldNames.length; ++j)
|
|
18965
|
+
object.allowedFieldNames[j] = message.allowedFieldNames[j];
|
|
18966
|
+
}
|
|
18967
|
+
return object;
|
|
18968
|
+
};
|
|
18969
|
+
|
|
18970
|
+
/**
|
|
18971
|
+
* Converts this NaturalLanguageQueryUnderstandingSpec to JSON.
|
|
18972
|
+
* @function toJSON
|
|
18973
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18974
|
+
* @instance
|
|
18975
|
+
* @returns {Object.<string,*>} JSON object
|
|
18976
|
+
*/
|
|
18977
|
+
NaturalLanguageQueryUnderstandingSpec.prototype.toJSON = function toJSON() {
|
|
18978
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
18979
|
+
};
|
|
18980
|
+
|
|
18981
|
+
/**
|
|
18982
|
+
* Gets the default type url for NaturalLanguageQueryUnderstandingSpec
|
|
18983
|
+
* @function getTypeUrl
|
|
18984
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec
|
|
18985
|
+
* @static
|
|
18986
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
18987
|
+
* @returns {string} The default type url
|
|
18988
|
+
*/
|
|
18989
|
+
NaturalLanguageQueryUnderstandingSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
18990
|
+
if (typeUrlPrefix === undefined) {
|
|
18991
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
18992
|
+
}
|
|
18993
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec";
|
|
18994
|
+
};
|
|
18995
|
+
|
|
18996
|
+
/**
|
|
18997
|
+
* FilterExtractionCondition enum.
|
|
18998
|
+
* @name google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition
|
|
18999
|
+
* @enum {number}
|
|
19000
|
+
* @property {number} CONDITION_UNSPECIFIED=0 CONDITION_UNSPECIFIED value
|
|
19001
|
+
* @property {number} DISABLED=1 DISABLED value
|
|
19002
|
+
* @property {number} ENABLED=2 ENABLED value
|
|
19003
|
+
*/
|
|
19004
|
+
NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition = (function() {
|
|
19005
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
19006
|
+
values[valuesById[0] = "CONDITION_UNSPECIFIED"] = 0;
|
|
19007
|
+
values[valuesById[1] = "DISABLED"] = 1;
|
|
19008
|
+
values[valuesById[2] = "ENABLED"] = 2;
|
|
19009
|
+
return values;
|
|
19010
|
+
})();
|
|
19011
|
+
|
|
19012
|
+
/**
|
|
19013
|
+
* ExtractedFilterBehavior enum.
|
|
19014
|
+
* @name google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior
|
|
19015
|
+
* @enum {number}
|
|
19016
|
+
* @property {number} EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED=0 EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED value
|
|
19017
|
+
* @property {number} HARD_FILTER=1 HARD_FILTER value
|
|
19018
|
+
* @property {number} SOFT_BOOST=2 SOFT_BOOST value
|
|
19019
|
+
*/
|
|
19020
|
+
NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior = (function() {
|
|
19021
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
19022
|
+
values[valuesById[0] = "EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED"] = 0;
|
|
19023
|
+
values[valuesById[1] = "HARD_FILTER"] = 1;
|
|
19024
|
+
values[valuesById[2] = "SOFT_BOOST"] = 2;
|
|
19025
|
+
return values;
|
|
19026
|
+
})();
|
|
19027
|
+
|
|
19028
|
+
return NaturalLanguageQueryUnderstandingSpec;
|
|
19029
|
+
})();
|
|
19030
|
+
|
|
18521
19031
|
SearchRequest.SearchAsYouTypeSpec = (function() {
|
|
18522
19032
|
|
|
18523
19033
|
/**
|
|
@@ -19015,6 +19525,298 @@
|
|
|
19015
19525
|
return DisplaySpec;
|
|
19016
19526
|
})();
|
|
19017
19527
|
|
|
19528
|
+
SearchRequest.CrowdingSpec = (function() {
|
|
19529
|
+
|
|
19530
|
+
/**
|
|
19531
|
+
* Properties of a CrowdingSpec.
|
|
19532
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
19533
|
+
* @interface ICrowdingSpec
|
|
19534
|
+
* @property {string|null} [field] CrowdingSpec field
|
|
19535
|
+
* @property {number|null} [maxCount] CrowdingSpec maxCount
|
|
19536
|
+
* @property {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode|null} [mode] CrowdingSpec mode
|
|
19537
|
+
*/
|
|
19538
|
+
|
|
19539
|
+
/**
|
|
19540
|
+
* Constructs a new CrowdingSpec.
|
|
19541
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest
|
|
19542
|
+
* @classdesc Represents a CrowdingSpec.
|
|
19543
|
+
* @implements ICrowdingSpec
|
|
19544
|
+
* @constructor
|
|
19545
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.ICrowdingSpec=} [properties] Properties to set
|
|
19546
|
+
*/
|
|
19547
|
+
function CrowdingSpec(properties) {
|
|
19548
|
+
if (properties)
|
|
19549
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
19550
|
+
if (properties[keys[i]] != null)
|
|
19551
|
+
this[keys[i]] = properties[keys[i]];
|
|
19552
|
+
}
|
|
19553
|
+
|
|
19554
|
+
/**
|
|
19555
|
+
* CrowdingSpec field.
|
|
19556
|
+
* @member {string} field
|
|
19557
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19558
|
+
* @instance
|
|
19559
|
+
*/
|
|
19560
|
+
CrowdingSpec.prototype.field = "";
|
|
19561
|
+
|
|
19562
|
+
/**
|
|
19563
|
+
* CrowdingSpec maxCount.
|
|
19564
|
+
* @member {number} maxCount
|
|
19565
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19566
|
+
* @instance
|
|
19567
|
+
*/
|
|
19568
|
+
CrowdingSpec.prototype.maxCount = 0;
|
|
19569
|
+
|
|
19570
|
+
/**
|
|
19571
|
+
* CrowdingSpec mode.
|
|
19572
|
+
* @member {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode} mode
|
|
19573
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19574
|
+
* @instance
|
|
19575
|
+
*/
|
|
19576
|
+
CrowdingSpec.prototype.mode = 0;
|
|
19577
|
+
|
|
19578
|
+
/**
|
|
19579
|
+
* Creates a new CrowdingSpec instance using the specified properties.
|
|
19580
|
+
* @function create
|
|
19581
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19582
|
+
* @static
|
|
19583
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.ICrowdingSpec=} [properties] Properties to set
|
|
19584
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec} CrowdingSpec instance
|
|
19585
|
+
*/
|
|
19586
|
+
CrowdingSpec.create = function create(properties) {
|
|
19587
|
+
return new CrowdingSpec(properties);
|
|
19588
|
+
};
|
|
19589
|
+
|
|
19590
|
+
/**
|
|
19591
|
+
* Encodes the specified CrowdingSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.verify|verify} messages.
|
|
19592
|
+
* @function encode
|
|
19593
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19594
|
+
* @static
|
|
19595
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.ICrowdingSpec} message CrowdingSpec message or plain object to encode
|
|
19596
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19597
|
+
* @returns {$protobuf.Writer} Writer
|
|
19598
|
+
*/
|
|
19599
|
+
CrowdingSpec.encode = function encode(message, writer) {
|
|
19600
|
+
if (!writer)
|
|
19601
|
+
writer = $Writer.create();
|
|
19602
|
+
if (message.field != null && Object.hasOwnProperty.call(message, "field"))
|
|
19603
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.field);
|
|
19604
|
+
if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount"))
|
|
19605
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxCount);
|
|
19606
|
+
if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
|
|
19607
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mode);
|
|
19608
|
+
return writer;
|
|
19609
|
+
};
|
|
19610
|
+
|
|
19611
|
+
/**
|
|
19612
|
+
* Encodes the specified CrowdingSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.verify|verify} messages.
|
|
19613
|
+
* @function encodeDelimited
|
|
19614
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19615
|
+
* @static
|
|
19616
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.ICrowdingSpec} message CrowdingSpec message or plain object to encode
|
|
19617
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19618
|
+
* @returns {$protobuf.Writer} Writer
|
|
19619
|
+
*/
|
|
19620
|
+
CrowdingSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
19621
|
+
return this.encode(message, writer).ldelim();
|
|
19622
|
+
};
|
|
19623
|
+
|
|
19624
|
+
/**
|
|
19625
|
+
* Decodes a CrowdingSpec message from the specified reader or buffer.
|
|
19626
|
+
* @function decode
|
|
19627
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19628
|
+
* @static
|
|
19629
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19630
|
+
* @param {number} [length] Message length if known beforehand
|
|
19631
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec} CrowdingSpec
|
|
19632
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19633
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19634
|
+
*/
|
|
19635
|
+
CrowdingSpec.decode = function decode(reader, length, error) {
|
|
19636
|
+
if (!(reader instanceof $Reader))
|
|
19637
|
+
reader = $Reader.create(reader);
|
|
19638
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec();
|
|
19639
|
+
while (reader.pos < end) {
|
|
19640
|
+
var tag = reader.uint32();
|
|
19641
|
+
if (tag === error)
|
|
19642
|
+
break;
|
|
19643
|
+
switch (tag >>> 3) {
|
|
19644
|
+
case 1: {
|
|
19645
|
+
message.field = reader.string();
|
|
19646
|
+
break;
|
|
19647
|
+
}
|
|
19648
|
+
case 2: {
|
|
19649
|
+
message.maxCount = reader.int32();
|
|
19650
|
+
break;
|
|
19651
|
+
}
|
|
19652
|
+
case 3: {
|
|
19653
|
+
message.mode = reader.int32();
|
|
19654
|
+
break;
|
|
19655
|
+
}
|
|
19656
|
+
default:
|
|
19657
|
+
reader.skipType(tag & 7);
|
|
19658
|
+
break;
|
|
19659
|
+
}
|
|
19660
|
+
}
|
|
19661
|
+
return message;
|
|
19662
|
+
};
|
|
19663
|
+
|
|
19664
|
+
/**
|
|
19665
|
+
* Decodes a CrowdingSpec message from the specified reader or buffer, length delimited.
|
|
19666
|
+
* @function decodeDelimited
|
|
19667
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19668
|
+
* @static
|
|
19669
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19670
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec} CrowdingSpec
|
|
19671
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19672
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19673
|
+
*/
|
|
19674
|
+
CrowdingSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
19675
|
+
if (!(reader instanceof $Reader))
|
|
19676
|
+
reader = new $Reader(reader);
|
|
19677
|
+
return this.decode(reader, reader.uint32());
|
|
19678
|
+
};
|
|
19679
|
+
|
|
19680
|
+
/**
|
|
19681
|
+
* Verifies a CrowdingSpec message.
|
|
19682
|
+
* @function verify
|
|
19683
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19684
|
+
* @static
|
|
19685
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
19686
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
19687
|
+
*/
|
|
19688
|
+
CrowdingSpec.verify = function verify(message) {
|
|
19689
|
+
if (typeof message !== "object" || message === null)
|
|
19690
|
+
return "object expected";
|
|
19691
|
+
if (message.field != null && message.hasOwnProperty("field"))
|
|
19692
|
+
if (!$util.isString(message.field))
|
|
19693
|
+
return "field: string expected";
|
|
19694
|
+
if (message.maxCount != null && message.hasOwnProperty("maxCount"))
|
|
19695
|
+
if (!$util.isInteger(message.maxCount))
|
|
19696
|
+
return "maxCount: integer expected";
|
|
19697
|
+
if (message.mode != null && message.hasOwnProperty("mode"))
|
|
19698
|
+
switch (message.mode) {
|
|
19699
|
+
default:
|
|
19700
|
+
return "mode: enum value expected";
|
|
19701
|
+
case 0:
|
|
19702
|
+
case 1:
|
|
19703
|
+
case 2:
|
|
19704
|
+
break;
|
|
19705
|
+
}
|
|
19706
|
+
return null;
|
|
19707
|
+
};
|
|
19708
|
+
|
|
19709
|
+
/**
|
|
19710
|
+
* Creates a CrowdingSpec message from a plain object. Also converts values to their respective internal types.
|
|
19711
|
+
* @function fromObject
|
|
19712
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19713
|
+
* @static
|
|
19714
|
+
* @param {Object.<string,*>} object Plain object
|
|
19715
|
+
* @returns {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec} CrowdingSpec
|
|
19716
|
+
*/
|
|
19717
|
+
CrowdingSpec.fromObject = function fromObject(object) {
|
|
19718
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec)
|
|
19719
|
+
return object;
|
|
19720
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec();
|
|
19721
|
+
if (object.field != null)
|
|
19722
|
+
message.field = String(object.field);
|
|
19723
|
+
if (object.maxCount != null)
|
|
19724
|
+
message.maxCount = object.maxCount | 0;
|
|
19725
|
+
switch (object.mode) {
|
|
19726
|
+
default:
|
|
19727
|
+
if (typeof object.mode === "number") {
|
|
19728
|
+
message.mode = object.mode;
|
|
19729
|
+
break;
|
|
19730
|
+
}
|
|
19731
|
+
break;
|
|
19732
|
+
case "MODE_UNSPECIFIED":
|
|
19733
|
+
case 0:
|
|
19734
|
+
message.mode = 0;
|
|
19735
|
+
break;
|
|
19736
|
+
case "DROP_CROWDED_RESULTS":
|
|
19737
|
+
case 1:
|
|
19738
|
+
message.mode = 1;
|
|
19739
|
+
break;
|
|
19740
|
+
case "DEMOTE_CROWDED_RESULTS_TO_END":
|
|
19741
|
+
case 2:
|
|
19742
|
+
message.mode = 2;
|
|
19743
|
+
break;
|
|
19744
|
+
}
|
|
19745
|
+
return message;
|
|
19746
|
+
};
|
|
19747
|
+
|
|
19748
|
+
/**
|
|
19749
|
+
* Creates a plain object from a CrowdingSpec message. Also converts values to other types if specified.
|
|
19750
|
+
* @function toObject
|
|
19751
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19752
|
+
* @static
|
|
19753
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec} message CrowdingSpec
|
|
19754
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
19755
|
+
* @returns {Object.<string,*>} Plain object
|
|
19756
|
+
*/
|
|
19757
|
+
CrowdingSpec.toObject = function toObject(message, options) {
|
|
19758
|
+
if (!options)
|
|
19759
|
+
options = {};
|
|
19760
|
+
var object = {};
|
|
19761
|
+
if (options.defaults) {
|
|
19762
|
+
object.field = "";
|
|
19763
|
+
object.maxCount = 0;
|
|
19764
|
+
object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0;
|
|
19765
|
+
}
|
|
19766
|
+
if (message.field != null && message.hasOwnProperty("field"))
|
|
19767
|
+
object.field = message.field;
|
|
19768
|
+
if (message.maxCount != null && message.hasOwnProperty("maxCount"))
|
|
19769
|
+
object.maxCount = message.maxCount;
|
|
19770
|
+
if (message.mode != null && message.hasOwnProperty("mode"))
|
|
19771
|
+
object.mode = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode[message.mode] : message.mode;
|
|
19772
|
+
return object;
|
|
19773
|
+
};
|
|
19774
|
+
|
|
19775
|
+
/**
|
|
19776
|
+
* Converts this CrowdingSpec to JSON.
|
|
19777
|
+
* @function toJSON
|
|
19778
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19779
|
+
* @instance
|
|
19780
|
+
* @returns {Object.<string,*>} JSON object
|
|
19781
|
+
*/
|
|
19782
|
+
CrowdingSpec.prototype.toJSON = function toJSON() {
|
|
19783
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
19784
|
+
};
|
|
19785
|
+
|
|
19786
|
+
/**
|
|
19787
|
+
* Gets the default type url for CrowdingSpec
|
|
19788
|
+
* @function getTypeUrl
|
|
19789
|
+
* @memberof google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec
|
|
19790
|
+
* @static
|
|
19791
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
19792
|
+
* @returns {string} The default type url
|
|
19793
|
+
*/
|
|
19794
|
+
CrowdingSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
19795
|
+
if (typeUrlPrefix === undefined) {
|
|
19796
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
19797
|
+
}
|
|
19798
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec";
|
|
19799
|
+
};
|
|
19800
|
+
|
|
19801
|
+
/**
|
|
19802
|
+
* Mode enum.
|
|
19803
|
+
* @name google.cloud.discoveryengine.v1.SearchRequest.CrowdingSpec.Mode
|
|
19804
|
+
* @enum {number}
|
|
19805
|
+
* @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value
|
|
19806
|
+
* @property {number} DROP_CROWDED_RESULTS=1 DROP_CROWDED_RESULTS value
|
|
19807
|
+
* @property {number} DEMOTE_CROWDED_RESULTS_TO_END=2 DEMOTE_CROWDED_RESULTS_TO_END value
|
|
19808
|
+
*/
|
|
19809
|
+
CrowdingSpec.Mode = (function() {
|
|
19810
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
19811
|
+
values[valuesById[0] = "MODE_UNSPECIFIED"] = 0;
|
|
19812
|
+
values[valuesById[1] = "DROP_CROWDED_RESULTS"] = 1;
|
|
19813
|
+
values[valuesById[2] = "DEMOTE_CROWDED_RESULTS_TO_END"] = 2;
|
|
19814
|
+
return values;
|
|
19815
|
+
})();
|
|
19816
|
+
|
|
19817
|
+
return CrowdingSpec;
|
|
19818
|
+
})();
|
|
19819
|
+
|
|
19018
19820
|
SearchRequest.SessionSpec = (function() {
|
|
19019
19821
|
|
|
19020
19822
|
/**
|
|
@@ -19462,6 +20264,26 @@
|
|
|
19462
20264
|
return RelevanceScoreSpec;
|
|
19463
20265
|
})();
|
|
19464
20266
|
|
|
20267
|
+
/**
|
|
20268
|
+
* RankingExpressionBackend enum.
|
|
20269
|
+
* @name google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend
|
|
20270
|
+
* @enum {number}
|
|
20271
|
+
* @property {number} RANKING_EXPRESSION_BACKEND_UNSPECIFIED=0 RANKING_EXPRESSION_BACKEND_UNSPECIFIED value
|
|
20272
|
+
* @property {number} BYOE=1 BYOE value
|
|
20273
|
+
* @property {number} CLEARBOX=2 CLEARBOX value
|
|
20274
|
+
* @property {number} RANK_BY_EMBEDDING=3 RANK_BY_EMBEDDING value
|
|
20275
|
+
* @property {number} RANK_BY_FORMULA=4 RANK_BY_FORMULA value
|
|
20276
|
+
*/
|
|
20277
|
+
SearchRequest.RankingExpressionBackend = (function() {
|
|
20278
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
20279
|
+
values[valuesById[0] = "RANKING_EXPRESSION_BACKEND_UNSPECIFIED"] = 0;
|
|
20280
|
+
values[valuesById[1] = "BYOE"] = 1;
|
|
20281
|
+
values[valuesById[2] = "CLEARBOX"] = 2;
|
|
20282
|
+
values[valuesById[3] = "RANK_BY_EMBEDDING"] = 3;
|
|
20283
|
+
values[valuesById[4] = "RANK_BY_FORMULA"] = 4;
|
|
20284
|
+
return values;
|
|
20285
|
+
})();
|
|
20286
|
+
|
|
19465
20287
|
/**
|
|
19466
20288
|
* RelevanceThreshold enum.
|
|
19467
20289
|
* @name google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold
|
|
@@ -19482,22 +20304,6 @@
|
|
|
19482
20304
|
return values;
|
|
19483
20305
|
})();
|
|
19484
20306
|
|
|
19485
|
-
/**
|
|
19486
|
-
* RankingExpressionBackend enum.
|
|
19487
|
-
* @name google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend
|
|
19488
|
-
* @enum {number}
|
|
19489
|
-
* @property {number} RANKING_EXPRESSION_BACKEND_UNSPECIFIED=0 RANKING_EXPRESSION_BACKEND_UNSPECIFIED value
|
|
19490
|
-
* @property {number} RANK_BY_EMBEDDING=3 RANK_BY_EMBEDDING value
|
|
19491
|
-
* @property {number} RANK_BY_FORMULA=4 RANK_BY_FORMULA value
|
|
19492
|
-
*/
|
|
19493
|
-
SearchRequest.RankingExpressionBackend = (function() {
|
|
19494
|
-
var valuesById = {}, values = Object.create(valuesById);
|
|
19495
|
-
values[valuesById[0] = "RANKING_EXPRESSION_BACKEND_UNSPECIFIED"] = 0;
|
|
19496
|
-
values[valuesById[3] = "RANK_BY_EMBEDDING"] = 3;
|
|
19497
|
-
values[valuesById[4] = "RANK_BY_FORMULA"] = 4;
|
|
19498
|
-
return values;
|
|
19499
|
-
})();
|
|
19500
|
-
|
|
19501
20307
|
return SearchRequest;
|
|
19502
20308
|
})();
|
|
19503
20309
|
|
|
@@ -19516,8 +20322,10 @@
|
|
|
19516
20322
|
* @property {string|null} [correctedQuery] SearchResponse correctedQuery
|
|
19517
20323
|
* @property {google.cloud.discoveryengine.v1.SearchResponse.ISummary|null} [summary] SearchResponse summary
|
|
19518
20324
|
* @property {google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null} [queryExpansionInfo] SearchResponse queryExpansionInfo
|
|
20325
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.INaturalLanguageQueryUnderstandingInfo|null} [naturalLanguageQueryUnderstandingInfo] SearchResponse naturalLanguageQueryUnderstandingInfo
|
|
19519
20326
|
* @property {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null} [sessionInfo] SearchResponse sessionInfo
|
|
19520
20327
|
* @property {Array.<google.cloud.discoveryengine.v1.ISearchLinkPromotion>|null} [searchLinkPromotions] SearchResponse searchLinkPromotions
|
|
20328
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.SemanticState|null} [semanticState] SearchResponse semanticState
|
|
19521
20329
|
*/
|
|
19522
20330
|
|
|
19523
20331
|
/**
|
|
@@ -19610,6 +20418,14 @@
|
|
|
19610
20418
|
*/
|
|
19611
20419
|
SearchResponse.prototype.queryExpansionInfo = null;
|
|
19612
20420
|
|
|
20421
|
+
/**
|
|
20422
|
+
* SearchResponse naturalLanguageQueryUnderstandingInfo.
|
|
20423
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.INaturalLanguageQueryUnderstandingInfo|null|undefined} naturalLanguageQueryUnderstandingInfo
|
|
20424
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse
|
|
20425
|
+
* @instance
|
|
20426
|
+
*/
|
|
20427
|
+
SearchResponse.prototype.naturalLanguageQueryUnderstandingInfo = null;
|
|
20428
|
+
|
|
19613
20429
|
/**
|
|
19614
20430
|
* SearchResponse sessionInfo.
|
|
19615
20431
|
* @member {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null|undefined} sessionInfo
|
|
@@ -19626,6 +20442,14 @@
|
|
|
19626
20442
|
*/
|
|
19627
20443
|
SearchResponse.prototype.searchLinkPromotions = $util.emptyArray;
|
|
19628
20444
|
|
|
20445
|
+
/**
|
|
20446
|
+
* SearchResponse semanticState.
|
|
20447
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.SemanticState} semanticState
|
|
20448
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse
|
|
20449
|
+
* @instance
|
|
20450
|
+
*/
|
|
20451
|
+
SearchResponse.prototype.semanticState = 0;
|
|
20452
|
+
|
|
19629
20453
|
/**
|
|
19630
20454
|
* Creates a new SearchResponse instance using the specified properties.
|
|
19631
20455
|
* @function create
|
|
@@ -19670,11 +20494,15 @@
|
|
|
19670
20494
|
writer.uint32(/* id 12, wireType 2 =*/98).string(message.redirectUri);
|
|
19671
20495
|
if (message.queryExpansionInfo != null && Object.hasOwnProperty.call(message, "queryExpansionInfo"))
|
|
19672
20496
|
$root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.encode(message.queryExpansionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
20497
|
+
if (message.naturalLanguageQueryUnderstandingInfo != null && Object.hasOwnProperty.call(message, "naturalLanguageQueryUnderstandingInfo"))
|
|
20498
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.encode(message.naturalLanguageQueryUnderstandingInfo, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
|
19673
20499
|
if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo"))
|
|
19674
20500
|
$root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
|
|
19675
20501
|
if (message.searchLinkPromotions != null && message.searchLinkPromotions.length)
|
|
19676
20502
|
for (var i = 0; i < message.searchLinkPromotions.length; ++i)
|
|
19677
20503
|
$root.google.cloud.discoveryengine.v1.SearchLinkPromotion.encode(message.searchLinkPromotions[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
|
|
20504
|
+
if (message.semanticState != null && Object.hasOwnProperty.call(message, "semanticState"))
|
|
20505
|
+
writer.uint32(/* id 36, wireType 0 =*/288).int32(message.semanticState);
|
|
19678
20506
|
return writer;
|
|
19679
20507
|
};
|
|
19680
20508
|
|
|
@@ -19751,6 +20579,10 @@
|
|
|
19751
20579
|
message.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.decode(reader, reader.uint32());
|
|
19752
20580
|
break;
|
|
19753
20581
|
}
|
|
20582
|
+
case 15: {
|
|
20583
|
+
message.naturalLanguageQueryUnderstandingInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.decode(reader, reader.uint32());
|
|
20584
|
+
break;
|
|
20585
|
+
}
|
|
19754
20586
|
case 19: {
|
|
19755
20587
|
message.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.decode(reader, reader.uint32());
|
|
19756
20588
|
break;
|
|
@@ -19761,6 +20593,10 @@
|
|
|
19761
20593
|
message.searchLinkPromotions.push($root.google.cloud.discoveryengine.v1.SearchLinkPromotion.decode(reader, reader.uint32()));
|
|
19762
20594
|
break;
|
|
19763
20595
|
}
|
|
20596
|
+
case 36: {
|
|
20597
|
+
message.semanticState = reader.int32();
|
|
20598
|
+
break;
|
|
20599
|
+
}
|
|
19764
20600
|
default:
|
|
19765
20601
|
reader.skipType(tag & 7);
|
|
19766
20602
|
break;
|
|
@@ -19839,6 +20675,11 @@
|
|
|
19839
20675
|
if (error)
|
|
19840
20676
|
return "queryExpansionInfo." + error;
|
|
19841
20677
|
}
|
|
20678
|
+
if (message.naturalLanguageQueryUnderstandingInfo != null && message.hasOwnProperty("naturalLanguageQueryUnderstandingInfo")) {
|
|
20679
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.verify(message.naturalLanguageQueryUnderstandingInfo);
|
|
20680
|
+
if (error)
|
|
20681
|
+
return "naturalLanguageQueryUnderstandingInfo." + error;
|
|
20682
|
+
}
|
|
19842
20683
|
if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) {
|
|
19843
20684
|
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify(message.sessionInfo);
|
|
19844
20685
|
if (error)
|
|
@@ -19853,6 +20694,15 @@
|
|
|
19853
20694
|
return "searchLinkPromotions." + error;
|
|
19854
20695
|
}
|
|
19855
20696
|
}
|
|
20697
|
+
if (message.semanticState != null && message.hasOwnProperty("semanticState"))
|
|
20698
|
+
switch (message.semanticState) {
|
|
20699
|
+
default:
|
|
20700
|
+
return "semanticState: enum value expected";
|
|
20701
|
+
case 0:
|
|
20702
|
+
case 1:
|
|
20703
|
+
case 2:
|
|
20704
|
+
break;
|
|
20705
|
+
}
|
|
19856
20706
|
return null;
|
|
19857
20707
|
};
|
|
19858
20708
|
|
|
@@ -19908,6 +20758,11 @@
|
|
|
19908
20758
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.queryExpansionInfo: object expected");
|
|
19909
20759
|
message.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.fromObject(object.queryExpansionInfo);
|
|
19910
20760
|
}
|
|
20761
|
+
if (object.naturalLanguageQueryUnderstandingInfo != null) {
|
|
20762
|
+
if (typeof object.naturalLanguageQueryUnderstandingInfo !== "object")
|
|
20763
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.naturalLanguageQueryUnderstandingInfo: object expected");
|
|
20764
|
+
message.naturalLanguageQueryUnderstandingInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.fromObject(object.naturalLanguageQueryUnderstandingInfo);
|
|
20765
|
+
}
|
|
19911
20766
|
if (object.sessionInfo != null) {
|
|
19912
20767
|
if (typeof object.sessionInfo !== "object")
|
|
19913
20768
|
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.sessionInfo: object expected");
|
|
@@ -19923,6 +20778,26 @@
|
|
|
19923
20778
|
message.searchLinkPromotions[i] = $root.google.cloud.discoveryengine.v1.SearchLinkPromotion.fromObject(object.searchLinkPromotions[i]);
|
|
19924
20779
|
}
|
|
19925
20780
|
}
|
|
20781
|
+
switch (object.semanticState) {
|
|
20782
|
+
default:
|
|
20783
|
+
if (typeof object.semanticState === "number") {
|
|
20784
|
+
message.semanticState = object.semanticState;
|
|
20785
|
+
break;
|
|
20786
|
+
}
|
|
20787
|
+
break;
|
|
20788
|
+
case "SEMANTIC_STATE_UNSPECIFIED":
|
|
20789
|
+
case 0:
|
|
20790
|
+
message.semanticState = 0;
|
|
20791
|
+
break;
|
|
20792
|
+
case "DISABLED":
|
|
20793
|
+
case 1:
|
|
20794
|
+
message.semanticState = 1;
|
|
20795
|
+
break;
|
|
20796
|
+
case "ENABLED":
|
|
20797
|
+
case 2:
|
|
20798
|
+
message.semanticState = 2;
|
|
20799
|
+
break;
|
|
20800
|
+
}
|
|
19926
20801
|
return message;
|
|
19927
20802
|
};
|
|
19928
20803
|
|
|
@@ -19952,7 +20827,9 @@
|
|
|
19952
20827
|
object.summary = null;
|
|
19953
20828
|
object.redirectUri = "";
|
|
19954
20829
|
object.queryExpansionInfo = null;
|
|
20830
|
+
object.naturalLanguageQueryUnderstandingInfo = null;
|
|
19955
20831
|
object.sessionInfo = null;
|
|
20832
|
+
object.semanticState = options.enums === String ? "SEMANTIC_STATE_UNSPECIFIED" : 0;
|
|
19956
20833
|
}
|
|
19957
20834
|
if (message.results && message.results.length) {
|
|
19958
20835
|
object.results = [];
|
|
@@ -19978,6 +20855,8 @@
|
|
|
19978
20855
|
object.redirectUri = message.redirectUri;
|
|
19979
20856
|
if (message.queryExpansionInfo != null && message.hasOwnProperty("queryExpansionInfo"))
|
|
19980
20857
|
object.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.toObject(message.queryExpansionInfo, options);
|
|
20858
|
+
if (message.naturalLanguageQueryUnderstandingInfo != null && message.hasOwnProperty("naturalLanguageQueryUnderstandingInfo"))
|
|
20859
|
+
object.naturalLanguageQueryUnderstandingInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.toObject(message.naturalLanguageQueryUnderstandingInfo, options);
|
|
19981
20860
|
if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo"))
|
|
19982
20861
|
object.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.toObject(message.sessionInfo, options);
|
|
19983
20862
|
if (message.searchLinkPromotions && message.searchLinkPromotions.length) {
|
|
@@ -19985,6 +20864,8 @@
|
|
|
19985
20864
|
for (var j = 0; j < message.searchLinkPromotions.length; ++j)
|
|
19986
20865
|
object.searchLinkPromotions[j] = $root.google.cloud.discoveryengine.v1.SearchLinkPromotion.toObject(message.searchLinkPromotions[j], options);
|
|
19987
20866
|
}
|
|
20867
|
+
if (message.semanticState != null && message.hasOwnProperty("semanticState"))
|
|
20868
|
+
object.semanticState = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchResponse.SemanticState[message.semanticState] === undefined ? message.semanticState : $root.google.cloud.discoveryengine.v1.SearchResponse.SemanticState[message.semanticState] : message.semanticState;
|
|
19988
20869
|
return object;
|
|
19989
20870
|
};
|
|
19990
20871
|
|
|
@@ -23990,138 +24871,2369 @@
|
|
|
23990
24871
|
message.expandedQuery = reader.bool();
|
|
23991
24872
|
break;
|
|
23992
24873
|
}
|
|
23993
|
-
case 2: {
|
|
23994
|
-
message.pinnedResultCount = reader.int64();
|
|
23995
|
-
break;
|
|
24874
|
+
case 2: {
|
|
24875
|
+
message.pinnedResultCount = reader.int64();
|
|
24876
|
+
break;
|
|
24877
|
+
}
|
|
24878
|
+
default:
|
|
24879
|
+
reader.skipType(tag & 7);
|
|
24880
|
+
break;
|
|
24881
|
+
}
|
|
24882
|
+
}
|
|
24883
|
+
return message;
|
|
24884
|
+
};
|
|
24885
|
+
|
|
24886
|
+
/**
|
|
24887
|
+
* Decodes a QueryExpansionInfo message from the specified reader or buffer, length delimited.
|
|
24888
|
+
* @function decodeDelimited
|
|
24889
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24890
|
+
* @static
|
|
24891
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24892
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo} QueryExpansionInfo
|
|
24893
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24894
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24895
|
+
*/
|
|
24896
|
+
QueryExpansionInfo.decodeDelimited = function decodeDelimited(reader) {
|
|
24897
|
+
if (!(reader instanceof $Reader))
|
|
24898
|
+
reader = new $Reader(reader);
|
|
24899
|
+
return this.decode(reader, reader.uint32());
|
|
24900
|
+
};
|
|
24901
|
+
|
|
24902
|
+
/**
|
|
24903
|
+
* Verifies a QueryExpansionInfo message.
|
|
24904
|
+
* @function verify
|
|
24905
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24906
|
+
* @static
|
|
24907
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24908
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24909
|
+
*/
|
|
24910
|
+
QueryExpansionInfo.verify = function verify(message) {
|
|
24911
|
+
if (typeof message !== "object" || message === null)
|
|
24912
|
+
return "object expected";
|
|
24913
|
+
if (message.expandedQuery != null && message.hasOwnProperty("expandedQuery"))
|
|
24914
|
+
if (typeof message.expandedQuery !== "boolean")
|
|
24915
|
+
return "expandedQuery: boolean expected";
|
|
24916
|
+
if (message.pinnedResultCount != null && message.hasOwnProperty("pinnedResultCount"))
|
|
24917
|
+
if (!$util.isInteger(message.pinnedResultCount) && !(message.pinnedResultCount && $util.isInteger(message.pinnedResultCount.low) && $util.isInteger(message.pinnedResultCount.high)))
|
|
24918
|
+
return "pinnedResultCount: integer|Long expected";
|
|
24919
|
+
return null;
|
|
24920
|
+
};
|
|
24921
|
+
|
|
24922
|
+
/**
|
|
24923
|
+
* Creates a QueryExpansionInfo message from a plain object. Also converts values to their respective internal types.
|
|
24924
|
+
* @function fromObject
|
|
24925
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24926
|
+
* @static
|
|
24927
|
+
* @param {Object.<string,*>} object Plain object
|
|
24928
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo} QueryExpansionInfo
|
|
24929
|
+
*/
|
|
24930
|
+
QueryExpansionInfo.fromObject = function fromObject(object) {
|
|
24931
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo)
|
|
24932
|
+
return object;
|
|
24933
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo();
|
|
24934
|
+
if (object.expandedQuery != null)
|
|
24935
|
+
message.expandedQuery = Boolean(object.expandedQuery);
|
|
24936
|
+
if (object.pinnedResultCount != null)
|
|
24937
|
+
if ($util.Long)
|
|
24938
|
+
(message.pinnedResultCount = $util.Long.fromValue(object.pinnedResultCount)).unsigned = false;
|
|
24939
|
+
else if (typeof object.pinnedResultCount === "string")
|
|
24940
|
+
message.pinnedResultCount = parseInt(object.pinnedResultCount, 10);
|
|
24941
|
+
else if (typeof object.pinnedResultCount === "number")
|
|
24942
|
+
message.pinnedResultCount = object.pinnedResultCount;
|
|
24943
|
+
else if (typeof object.pinnedResultCount === "object")
|
|
24944
|
+
message.pinnedResultCount = new $util.LongBits(object.pinnedResultCount.low >>> 0, object.pinnedResultCount.high >>> 0).toNumber();
|
|
24945
|
+
return message;
|
|
24946
|
+
};
|
|
24947
|
+
|
|
24948
|
+
/**
|
|
24949
|
+
* Creates a plain object from a QueryExpansionInfo message. Also converts values to other types if specified.
|
|
24950
|
+
* @function toObject
|
|
24951
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24952
|
+
* @static
|
|
24953
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo} message QueryExpansionInfo
|
|
24954
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24955
|
+
* @returns {Object.<string,*>} Plain object
|
|
24956
|
+
*/
|
|
24957
|
+
QueryExpansionInfo.toObject = function toObject(message, options) {
|
|
24958
|
+
if (!options)
|
|
24959
|
+
options = {};
|
|
24960
|
+
var object = {};
|
|
24961
|
+
if (options.defaults) {
|
|
24962
|
+
object.expandedQuery = false;
|
|
24963
|
+
if ($util.Long) {
|
|
24964
|
+
var long = new $util.Long(0, 0, false);
|
|
24965
|
+
object.pinnedResultCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
24966
|
+
} else
|
|
24967
|
+
object.pinnedResultCount = options.longs === String ? "0" : 0;
|
|
24968
|
+
}
|
|
24969
|
+
if (message.expandedQuery != null && message.hasOwnProperty("expandedQuery"))
|
|
24970
|
+
object.expandedQuery = message.expandedQuery;
|
|
24971
|
+
if (message.pinnedResultCount != null && message.hasOwnProperty("pinnedResultCount"))
|
|
24972
|
+
if (typeof message.pinnedResultCount === "number")
|
|
24973
|
+
object.pinnedResultCount = options.longs === String ? String(message.pinnedResultCount) : message.pinnedResultCount;
|
|
24974
|
+
else
|
|
24975
|
+
object.pinnedResultCount = options.longs === String ? $util.Long.prototype.toString.call(message.pinnedResultCount) : options.longs === Number ? new $util.LongBits(message.pinnedResultCount.low >>> 0, message.pinnedResultCount.high >>> 0).toNumber() : message.pinnedResultCount;
|
|
24976
|
+
return object;
|
|
24977
|
+
};
|
|
24978
|
+
|
|
24979
|
+
/**
|
|
24980
|
+
* Converts this QueryExpansionInfo to JSON.
|
|
24981
|
+
* @function toJSON
|
|
24982
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24983
|
+
* @instance
|
|
24984
|
+
* @returns {Object.<string,*>} JSON object
|
|
24985
|
+
*/
|
|
24986
|
+
QueryExpansionInfo.prototype.toJSON = function toJSON() {
|
|
24987
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24988
|
+
};
|
|
24989
|
+
|
|
24990
|
+
/**
|
|
24991
|
+
* Gets the default type url for QueryExpansionInfo
|
|
24992
|
+
* @function getTypeUrl
|
|
24993
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24994
|
+
* @static
|
|
24995
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24996
|
+
* @returns {string} The default type url
|
|
24997
|
+
*/
|
|
24998
|
+
QueryExpansionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24999
|
+
if (typeUrlPrefix === undefined) {
|
|
25000
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25001
|
+
}
|
|
25002
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo";
|
|
25003
|
+
};
|
|
25004
|
+
|
|
25005
|
+
return QueryExpansionInfo;
|
|
25006
|
+
})();
|
|
25007
|
+
|
|
25008
|
+
SearchResponse.NaturalLanguageQueryUnderstandingInfo = (function() {
|
|
25009
|
+
|
|
25010
|
+
/**
|
|
25011
|
+
* Properties of a NaturalLanguageQueryUnderstandingInfo.
|
|
25012
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse
|
|
25013
|
+
* @interface INaturalLanguageQueryUnderstandingInfo
|
|
25014
|
+
* @property {string|null} [extractedFilters] NaturalLanguageQueryUnderstandingInfo extractedFilters
|
|
25015
|
+
* @property {string|null} [rewrittenQuery] NaturalLanguageQueryUnderstandingInfo rewrittenQuery
|
|
25016
|
+
* @property {Array.<string>|null} [classifiedIntents] NaturalLanguageQueryUnderstandingInfo classifiedIntents
|
|
25017
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.IStructuredExtractedFilter|null} [structuredExtractedFilter] NaturalLanguageQueryUnderstandingInfo structuredExtractedFilter
|
|
25018
|
+
*/
|
|
25019
|
+
|
|
25020
|
+
/**
|
|
25021
|
+
* Constructs a new NaturalLanguageQueryUnderstandingInfo.
|
|
25022
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse
|
|
25023
|
+
* @classdesc Represents a NaturalLanguageQueryUnderstandingInfo.
|
|
25024
|
+
* @implements INaturalLanguageQueryUnderstandingInfo
|
|
25025
|
+
* @constructor
|
|
25026
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.INaturalLanguageQueryUnderstandingInfo=} [properties] Properties to set
|
|
25027
|
+
*/
|
|
25028
|
+
function NaturalLanguageQueryUnderstandingInfo(properties) {
|
|
25029
|
+
this.classifiedIntents = [];
|
|
25030
|
+
if (properties)
|
|
25031
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25032
|
+
if (properties[keys[i]] != null)
|
|
25033
|
+
this[keys[i]] = properties[keys[i]];
|
|
25034
|
+
}
|
|
25035
|
+
|
|
25036
|
+
/**
|
|
25037
|
+
* NaturalLanguageQueryUnderstandingInfo extractedFilters.
|
|
25038
|
+
* @member {string} extractedFilters
|
|
25039
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25040
|
+
* @instance
|
|
25041
|
+
*/
|
|
25042
|
+
NaturalLanguageQueryUnderstandingInfo.prototype.extractedFilters = "";
|
|
25043
|
+
|
|
25044
|
+
/**
|
|
25045
|
+
* NaturalLanguageQueryUnderstandingInfo rewrittenQuery.
|
|
25046
|
+
* @member {string} rewrittenQuery
|
|
25047
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25048
|
+
* @instance
|
|
25049
|
+
*/
|
|
25050
|
+
NaturalLanguageQueryUnderstandingInfo.prototype.rewrittenQuery = "";
|
|
25051
|
+
|
|
25052
|
+
/**
|
|
25053
|
+
* NaturalLanguageQueryUnderstandingInfo classifiedIntents.
|
|
25054
|
+
* @member {Array.<string>} classifiedIntents
|
|
25055
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25056
|
+
* @instance
|
|
25057
|
+
*/
|
|
25058
|
+
NaturalLanguageQueryUnderstandingInfo.prototype.classifiedIntents = $util.emptyArray;
|
|
25059
|
+
|
|
25060
|
+
/**
|
|
25061
|
+
* NaturalLanguageQueryUnderstandingInfo structuredExtractedFilter.
|
|
25062
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.IStructuredExtractedFilter|null|undefined} structuredExtractedFilter
|
|
25063
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25064
|
+
* @instance
|
|
25065
|
+
*/
|
|
25066
|
+
NaturalLanguageQueryUnderstandingInfo.prototype.structuredExtractedFilter = null;
|
|
25067
|
+
|
|
25068
|
+
/**
|
|
25069
|
+
* Creates a new NaturalLanguageQueryUnderstandingInfo instance using the specified properties.
|
|
25070
|
+
* @function create
|
|
25071
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25072
|
+
* @static
|
|
25073
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.INaturalLanguageQueryUnderstandingInfo=} [properties] Properties to set
|
|
25074
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo} NaturalLanguageQueryUnderstandingInfo instance
|
|
25075
|
+
*/
|
|
25076
|
+
NaturalLanguageQueryUnderstandingInfo.create = function create(properties) {
|
|
25077
|
+
return new NaturalLanguageQueryUnderstandingInfo(properties);
|
|
25078
|
+
};
|
|
25079
|
+
|
|
25080
|
+
/**
|
|
25081
|
+
* Encodes the specified NaturalLanguageQueryUnderstandingInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.verify|verify} messages.
|
|
25082
|
+
* @function encode
|
|
25083
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25084
|
+
* @static
|
|
25085
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.INaturalLanguageQueryUnderstandingInfo} message NaturalLanguageQueryUnderstandingInfo message or plain object to encode
|
|
25086
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25087
|
+
* @returns {$protobuf.Writer} Writer
|
|
25088
|
+
*/
|
|
25089
|
+
NaturalLanguageQueryUnderstandingInfo.encode = function encode(message, writer) {
|
|
25090
|
+
if (!writer)
|
|
25091
|
+
writer = $Writer.create();
|
|
25092
|
+
if (message.extractedFilters != null && Object.hasOwnProperty.call(message, "extractedFilters"))
|
|
25093
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.extractedFilters);
|
|
25094
|
+
if (message.rewrittenQuery != null && Object.hasOwnProperty.call(message, "rewrittenQuery"))
|
|
25095
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.rewrittenQuery);
|
|
25096
|
+
if (message.structuredExtractedFilter != null && Object.hasOwnProperty.call(message, "structuredExtractedFilter"))
|
|
25097
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.encode(message.structuredExtractedFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
25098
|
+
if (message.classifiedIntents != null && message.classifiedIntents.length)
|
|
25099
|
+
for (var i = 0; i < message.classifiedIntents.length; ++i)
|
|
25100
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.classifiedIntents[i]);
|
|
25101
|
+
return writer;
|
|
25102
|
+
};
|
|
25103
|
+
|
|
25104
|
+
/**
|
|
25105
|
+
* Encodes the specified NaturalLanguageQueryUnderstandingInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.verify|verify} messages.
|
|
25106
|
+
* @function encodeDelimited
|
|
25107
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25108
|
+
* @static
|
|
25109
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.INaturalLanguageQueryUnderstandingInfo} message NaturalLanguageQueryUnderstandingInfo message or plain object to encode
|
|
25110
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25111
|
+
* @returns {$protobuf.Writer} Writer
|
|
25112
|
+
*/
|
|
25113
|
+
NaturalLanguageQueryUnderstandingInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25114
|
+
return this.encode(message, writer).ldelim();
|
|
25115
|
+
};
|
|
25116
|
+
|
|
25117
|
+
/**
|
|
25118
|
+
* Decodes a NaturalLanguageQueryUnderstandingInfo message from the specified reader or buffer.
|
|
25119
|
+
* @function decode
|
|
25120
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25121
|
+
* @static
|
|
25122
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25123
|
+
* @param {number} [length] Message length if known beforehand
|
|
25124
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo} NaturalLanguageQueryUnderstandingInfo
|
|
25125
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25126
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25127
|
+
*/
|
|
25128
|
+
NaturalLanguageQueryUnderstandingInfo.decode = function decode(reader, length, error) {
|
|
25129
|
+
if (!(reader instanceof $Reader))
|
|
25130
|
+
reader = $Reader.create(reader);
|
|
25131
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo();
|
|
25132
|
+
while (reader.pos < end) {
|
|
25133
|
+
var tag = reader.uint32();
|
|
25134
|
+
if (tag === error)
|
|
25135
|
+
break;
|
|
25136
|
+
switch (tag >>> 3) {
|
|
25137
|
+
case 1: {
|
|
25138
|
+
message.extractedFilters = reader.string();
|
|
25139
|
+
break;
|
|
25140
|
+
}
|
|
25141
|
+
case 2: {
|
|
25142
|
+
message.rewrittenQuery = reader.string();
|
|
25143
|
+
break;
|
|
25144
|
+
}
|
|
25145
|
+
case 5: {
|
|
25146
|
+
if (!(message.classifiedIntents && message.classifiedIntents.length))
|
|
25147
|
+
message.classifiedIntents = [];
|
|
25148
|
+
message.classifiedIntents.push(reader.string());
|
|
25149
|
+
break;
|
|
25150
|
+
}
|
|
25151
|
+
case 3: {
|
|
25152
|
+
message.structuredExtractedFilter = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.decode(reader, reader.uint32());
|
|
25153
|
+
break;
|
|
25154
|
+
}
|
|
25155
|
+
default:
|
|
25156
|
+
reader.skipType(tag & 7);
|
|
25157
|
+
break;
|
|
25158
|
+
}
|
|
25159
|
+
}
|
|
25160
|
+
return message;
|
|
25161
|
+
};
|
|
25162
|
+
|
|
25163
|
+
/**
|
|
25164
|
+
* Decodes a NaturalLanguageQueryUnderstandingInfo message from the specified reader or buffer, length delimited.
|
|
25165
|
+
* @function decodeDelimited
|
|
25166
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25167
|
+
* @static
|
|
25168
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25169
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo} NaturalLanguageQueryUnderstandingInfo
|
|
25170
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25171
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25172
|
+
*/
|
|
25173
|
+
NaturalLanguageQueryUnderstandingInfo.decodeDelimited = function decodeDelimited(reader) {
|
|
25174
|
+
if (!(reader instanceof $Reader))
|
|
25175
|
+
reader = new $Reader(reader);
|
|
25176
|
+
return this.decode(reader, reader.uint32());
|
|
25177
|
+
};
|
|
25178
|
+
|
|
25179
|
+
/**
|
|
25180
|
+
* Verifies a NaturalLanguageQueryUnderstandingInfo message.
|
|
25181
|
+
* @function verify
|
|
25182
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25183
|
+
* @static
|
|
25184
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25185
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25186
|
+
*/
|
|
25187
|
+
NaturalLanguageQueryUnderstandingInfo.verify = function verify(message) {
|
|
25188
|
+
if (typeof message !== "object" || message === null)
|
|
25189
|
+
return "object expected";
|
|
25190
|
+
if (message.extractedFilters != null && message.hasOwnProperty("extractedFilters"))
|
|
25191
|
+
if (!$util.isString(message.extractedFilters))
|
|
25192
|
+
return "extractedFilters: string expected";
|
|
25193
|
+
if (message.rewrittenQuery != null && message.hasOwnProperty("rewrittenQuery"))
|
|
25194
|
+
if (!$util.isString(message.rewrittenQuery))
|
|
25195
|
+
return "rewrittenQuery: string expected";
|
|
25196
|
+
if (message.classifiedIntents != null && message.hasOwnProperty("classifiedIntents")) {
|
|
25197
|
+
if (!Array.isArray(message.classifiedIntents))
|
|
25198
|
+
return "classifiedIntents: array expected";
|
|
25199
|
+
for (var i = 0; i < message.classifiedIntents.length; ++i)
|
|
25200
|
+
if (!$util.isString(message.classifiedIntents[i]))
|
|
25201
|
+
return "classifiedIntents: string[] expected";
|
|
25202
|
+
}
|
|
25203
|
+
if (message.structuredExtractedFilter != null && message.hasOwnProperty("structuredExtractedFilter")) {
|
|
25204
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.verify(message.structuredExtractedFilter);
|
|
25205
|
+
if (error)
|
|
25206
|
+
return "structuredExtractedFilter." + error;
|
|
25207
|
+
}
|
|
25208
|
+
return null;
|
|
25209
|
+
};
|
|
25210
|
+
|
|
25211
|
+
/**
|
|
25212
|
+
* Creates a NaturalLanguageQueryUnderstandingInfo message from a plain object. Also converts values to their respective internal types.
|
|
25213
|
+
* @function fromObject
|
|
25214
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25215
|
+
* @static
|
|
25216
|
+
* @param {Object.<string,*>} object Plain object
|
|
25217
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo} NaturalLanguageQueryUnderstandingInfo
|
|
25218
|
+
*/
|
|
25219
|
+
NaturalLanguageQueryUnderstandingInfo.fromObject = function fromObject(object) {
|
|
25220
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo)
|
|
25221
|
+
return object;
|
|
25222
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo();
|
|
25223
|
+
if (object.extractedFilters != null)
|
|
25224
|
+
message.extractedFilters = String(object.extractedFilters);
|
|
25225
|
+
if (object.rewrittenQuery != null)
|
|
25226
|
+
message.rewrittenQuery = String(object.rewrittenQuery);
|
|
25227
|
+
if (object.classifiedIntents) {
|
|
25228
|
+
if (!Array.isArray(object.classifiedIntents))
|
|
25229
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.classifiedIntents: array expected");
|
|
25230
|
+
message.classifiedIntents = [];
|
|
25231
|
+
for (var i = 0; i < object.classifiedIntents.length; ++i)
|
|
25232
|
+
message.classifiedIntents[i] = String(object.classifiedIntents[i]);
|
|
25233
|
+
}
|
|
25234
|
+
if (object.structuredExtractedFilter != null) {
|
|
25235
|
+
if (typeof object.structuredExtractedFilter !== "object")
|
|
25236
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.structuredExtractedFilter: object expected");
|
|
25237
|
+
message.structuredExtractedFilter = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.fromObject(object.structuredExtractedFilter);
|
|
25238
|
+
}
|
|
25239
|
+
return message;
|
|
25240
|
+
};
|
|
25241
|
+
|
|
25242
|
+
/**
|
|
25243
|
+
* Creates a plain object from a NaturalLanguageQueryUnderstandingInfo message. Also converts values to other types if specified.
|
|
25244
|
+
* @function toObject
|
|
25245
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25246
|
+
* @static
|
|
25247
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo} message NaturalLanguageQueryUnderstandingInfo
|
|
25248
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25249
|
+
* @returns {Object.<string,*>} Plain object
|
|
25250
|
+
*/
|
|
25251
|
+
NaturalLanguageQueryUnderstandingInfo.toObject = function toObject(message, options) {
|
|
25252
|
+
if (!options)
|
|
25253
|
+
options = {};
|
|
25254
|
+
var object = {};
|
|
25255
|
+
if (options.arrays || options.defaults)
|
|
25256
|
+
object.classifiedIntents = [];
|
|
25257
|
+
if (options.defaults) {
|
|
25258
|
+
object.extractedFilters = "";
|
|
25259
|
+
object.rewrittenQuery = "";
|
|
25260
|
+
object.structuredExtractedFilter = null;
|
|
25261
|
+
}
|
|
25262
|
+
if (message.extractedFilters != null && message.hasOwnProperty("extractedFilters"))
|
|
25263
|
+
object.extractedFilters = message.extractedFilters;
|
|
25264
|
+
if (message.rewrittenQuery != null && message.hasOwnProperty("rewrittenQuery"))
|
|
25265
|
+
object.rewrittenQuery = message.rewrittenQuery;
|
|
25266
|
+
if (message.structuredExtractedFilter != null && message.hasOwnProperty("structuredExtractedFilter"))
|
|
25267
|
+
object.structuredExtractedFilter = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.toObject(message.structuredExtractedFilter, options);
|
|
25268
|
+
if (message.classifiedIntents && message.classifiedIntents.length) {
|
|
25269
|
+
object.classifiedIntents = [];
|
|
25270
|
+
for (var j = 0; j < message.classifiedIntents.length; ++j)
|
|
25271
|
+
object.classifiedIntents[j] = message.classifiedIntents[j];
|
|
25272
|
+
}
|
|
25273
|
+
return object;
|
|
25274
|
+
};
|
|
25275
|
+
|
|
25276
|
+
/**
|
|
25277
|
+
* Converts this NaturalLanguageQueryUnderstandingInfo to JSON.
|
|
25278
|
+
* @function toJSON
|
|
25279
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25280
|
+
* @instance
|
|
25281
|
+
* @returns {Object.<string,*>} JSON object
|
|
25282
|
+
*/
|
|
25283
|
+
NaturalLanguageQueryUnderstandingInfo.prototype.toJSON = function toJSON() {
|
|
25284
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25285
|
+
};
|
|
25286
|
+
|
|
25287
|
+
/**
|
|
25288
|
+
* Gets the default type url for NaturalLanguageQueryUnderstandingInfo
|
|
25289
|
+
* @function getTypeUrl
|
|
25290
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25291
|
+
* @static
|
|
25292
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25293
|
+
* @returns {string} The default type url
|
|
25294
|
+
*/
|
|
25295
|
+
NaturalLanguageQueryUnderstandingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25296
|
+
if (typeUrlPrefix === undefined) {
|
|
25297
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25298
|
+
}
|
|
25299
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo";
|
|
25300
|
+
};
|
|
25301
|
+
|
|
25302
|
+
NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter = (function() {
|
|
25303
|
+
|
|
25304
|
+
/**
|
|
25305
|
+
* Properties of a StructuredExtractedFilter.
|
|
25306
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25307
|
+
* @interface IStructuredExtractedFilter
|
|
25308
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression|null} [expression] StructuredExtractedFilter expression
|
|
25309
|
+
*/
|
|
25310
|
+
|
|
25311
|
+
/**
|
|
25312
|
+
* Constructs a new StructuredExtractedFilter.
|
|
25313
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo
|
|
25314
|
+
* @classdesc Represents a StructuredExtractedFilter.
|
|
25315
|
+
* @implements IStructuredExtractedFilter
|
|
25316
|
+
* @constructor
|
|
25317
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.IStructuredExtractedFilter=} [properties] Properties to set
|
|
25318
|
+
*/
|
|
25319
|
+
function StructuredExtractedFilter(properties) {
|
|
25320
|
+
if (properties)
|
|
25321
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25322
|
+
if (properties[keys[i]] != null)
|
|
25323
|
+
this[keys[i]] = properties[keys[i]];
|
|
25324
|
+
}
|
|
25325
|
+
|
|
25326
|
+
/**
|
|
25327
|
+
* StructuredExtractedFilter expression.
|
|
25328
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression|null|undefined} expression
|
|
25329
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25330
|
+
* @instance
|
|
25331
|
+
*/
|
|
25332
|
+
StructuredExtractedFilter.prototype.expression = null;
|
|
25333
|
+
|
|
25334
|
+
/**
|
|
25335
|
+
* Creates a new StructuredExtractedFilter instance using the specified properties.
|
|
25336
|
+
* @function create
|
|
25337
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25338
|
+
* @static
|
|
25339
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.IStructuredExtractedFilter=} [properties] Properties to set
|
|
25340
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter} StructuredExtractedFilter instance
|
|
25341
|
+
*/
|
|
25342
|
+
StructuredExtractedFilter.create = function create(properties) {
|
|
25343
|
+
return new StructuredExtractedFilter(properties);
|
|
25344
|
+
};
|
|
25345
|
+
|
|
25346
|
+
/**
|
|
25347
|
+
* Encodes the specified StructuredExtractedFilter message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.verify|verify} messages.
|
|
25348
|
+
* @function encode
|
|
25349
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25350
|
+
* @static
|
|
25351
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.IStructuredExtractedFilter} message StructuredExtractedFilter message or plain object to encode
|
|
25352
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25353
|
+
* @returns {$protobuf.Writer} Writer
|
|
25354
|
+
*/
|
|
25355
|
+
StructuredExtractedFilter.encode = function encode(message, writer) {
|
|
25356
|
+
if (!writer)
|
|
25357
|
+
writer = $Writer.create();
|
|
25358
|
+
if (message.expression != null && Object.hasOwnProperty.call(message, "expression"))
|
|
25359
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.encode(message.expression, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
25360
|
+
return writer;
|
|
25361
|
+
};
|
|
25362
|
+
|
|
25363
|
+
/**
|
|
25364
|
+
* Encodes the specified StructuredExtractedFilter message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.verify|verify} messages.
|
|
25365
|
+
* @function encodeDelimited
|
|
25366
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25367
|
+
* @static
|
|
25368
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.IStructuredExtractedFilter} message StructuredExtractedFilter message or plain object to encode
|
|
25369
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25370
|
+
* @returns {$protobuf.Writer} Writer
|
|
25371
|
+
*/
|
|
25372
|
+
StructuredExtractedFilter.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25373
|
+
return this.encode(message, writer).ldelim();
|
|
25374
|
+
};
|
|
25375
|
+
|
|
25376
|
+
/**
|
|
25377
|
+
* Decodes a StructuredExtractedFilter message from the specified reader or buffer.
|
|
25378
|
+
* @function decode
|
|
25379
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25380
|
+
* @static
|
|
25381
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25382
|
+
* @param {number} [length] Message length if known beforehand
|
|
25383
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter} StructuredExtractedFilter
|
|
25384
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25385
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25386
|
+
*/
|
|
25387
|
+
StructuredExtractedFilter.decode = function decode(reader, length, error) {
|
|
25388
|
+
if (!(reader instanceof $Reader))
|
|
25389
|
+
reader = $Reader.create(reader);
|
|
25390
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter();
|
|
25391
|
+
while (reader.pos < end) {
|
|
25392
|
+
var tag = reader.uint32();
|
|
25393
|
+
if (tag === error)
|
|
25394
|
+
break;
|
|
25395
|
+
switch (tag >>> 3) {
|
|
25396
|
+
case 1: {
|
|
25397
|
+
message.expression = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.decode(reader, reader.uint32());
|
|
25398
|
+
break;
|
|
25399
|
+
}
|
|
25400
|
+
default:
|
|
25401
|
+
reader.skipType(tag & 7);
|
|
25402
|
+
break;
|
|
25403
|
+
}
|
|
25404
|
+
}
|
|
25405
|
+
return message;
|
|
25406
|
+
};
|
|
25407
|
+
|
|
25408
|
+
/**
|
|
25409
|
+
* Decodes a StructuredExtractedFilter message from the specified reader or buffer, length delimited.
|
|
25410
|
+
* @function decodeDelimited
|
|
25411
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25412
|
+
* @static
|
|
25413
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25414
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter} StructuredExtractedFilter
|
|
25415
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25416
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25417
|
+
*/
|
|
25418
|
+
StructuredExtractedFilter.decodeDelimited = function decodeDelimited(reader) {
|
|
25419
|
+
if (!(reader instanceof $Reader))
|
|
25420
|
+
reader = new $Reader(reader);
|
|
25421
|
+
return this.decode(reader, reader.uint32());
|
|
25422
|
+
};
|
|
25423
|
+
|
|
25424
|
+
/**
|
|
25425
|
+
* Verifies a StructuredExtractedFilter message.
|
|
25426
|
+
* @function verify
|
|
25427
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25428
|
+
* @static
|
|
25429
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25430
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25431
|
+
*/
|
|
25432
|
+
StructuredExtractedFilter.verify = function verify(message) {
|
|
25433
|
+
if (typeof message !== "object" || message === null)
|
|
25434
|
+
return "object expected";
|
|
25435
|
+
if (message.expression != null && message.hasOwnProperty("expression")) {
|
|
25436
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.verify(message.expression);
|
|
25437
|
+
if (error)
|
|
25438
|
+
return "expression." + error;
|
|
25439
|
+
}
|
|
25440
|
+
return null;
|
|
25441
|
+
};
|
|
25442
|
+
|
|
25443
|
+
/**
|
|
25444
|
+
* Creates a StructuredExtractedFilter message from a plain object. Also converts values to their respective internal types.
|
|
25445
|
+
* @function fromObject
|
|
25446
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25447
|
+
* @static
|
|
25448
|
+
* @param {Object.<string,*>} object Plain object
|
|
25449
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter} StructuredExtractedFilter
|
|
25450
|
+
*/
|
|
25451
|
+
StructuredExtractedFilter.fromObject = function fromObject(object) {
|
|
25452
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter)
|
|
25453
|
+
return object;
|
|
25454
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter();
|
|
25455
|
+
if (object.expression != null) {
|
|
25456
|
+
if (typeof object.expression !== "object")
|
|
25457
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.expression: object expected");
|
|
25458
|
+
message.expression = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.fromObject(object.expression);
|
|
25459
|
+
}
|
|
25460
|
+
return message;
|
|
25461
|
+
};
|
|
25462
|
+
|
|
25463
|
+
/**
|
|
25464
|
+
* Creates a plain object from a StructuredExtractedFilter message. Also converts values to other types if specified.
|
|
25465
|
+
* @function toObject
|
|
25466
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25467
|
+
* @static
|
|
25468
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter} message StructuredExtractedFilter
|
|
25469
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25470
|
+
* @returns {Object.<string,*>} Plain object
|
|
25471
|
+
*/
|
|
25472
|
+
StructuredExtractedFilter.toObject = function toObject(message, options) {
|
|
25473
|
+
if (!options)
|
|
25474
|
+
options = {};
|
|
25475
|
+
var object = {};
|
|
25476
|
+
if (options.defaults)
|
|
25477
|
+
object.expression = null;
|
|
25478
|
+
if (message.expression != null && message.hasOwnProperty("expression"))
|
|
25479
|
+
object.expression = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.toObject(message.expression, options);
|
|
25480
|
+
return object;
|
|
25481
|
+
};
|
|
25482
|
+
|
|
25483
|
+
/**
|
|
25484
|
+
* Converts this StructuredExtractedFilter to JSON.
|
|
25485
|
+
* @function toJSON
|
|
25486
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25487
|
+
* @instance
|
|
25488
|
+
* @returns {Object.<string,*>} JSON object
|
|
25489
|
+
*/
|
|
25490
|
+
StructuredExtractedFilter.prototype.toJSON = function toJSON() {
|
|
25491
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25492
|
+
};
|
|
25493
|
+
|
|
25494
|
+
/**
|
|
25495
|
+
* Gets the default type url for StructuredExtractedFilter
|
|
25496
|
+
* @function getTypeUrl
|
|
25497
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25498
|
+
* @static
|
|
25499
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25500
|
+
* @returns {string} The default type url
|
|
25501
|
+
*/
|
|
25502
|
+
StructuredExtractedFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25503
|
+
if (typeUrlPrefix === undefined) {
|
|
25504
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25505
|
+
}
|
|
25506
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter";
|
|
25507
|
+
};
|
|
25508
|
+
|
|
25509
|
+
StructuredExtractedFilter.StringConstraint = (function() {
|
|
25510
|
+
|
|
25511
|
+
/**
|
|
25512
|
+
* Properties of a StringConstraint.
|
|
25513
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25514
|
+
* @interface IStringConstraint
|
|
25515
|
+
* @property {string|null} [fieldName] StringConstraint fieldName
|
|
25516
|
+
* @property {Array.<string>|null} [values] StringConstraint values
|
|
25517
|
+
* @property {string|null} [querySegment] StringConstraint querySegment
|
|
25518
|
+
*/
|
|
25519
|
+
|
|
25520
|
+
/**
|
|
25521
|
+
* Constructs a new StringConstraint.
|
|
25522
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25523
|
+
* @classdesc Represents a StringConstraint.
|
|
25524
|
+
* @implements IStringConstraint
|
|
25525
|
+
* @constructor
|
|
25526
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IStringConstraint=} [properties] Properties to set
|
|
25527
|
+
*/
|
|
25528
|
+
function StringConstraint(properties) {
|
|
25529
|
+
this.values = [];
|
|
25530
|
+
if (properties)
|
|
25531
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25532
|
+
if (properties[keys[i]] != null)
|
|
25533
|
+
this[keys[i]] = properties[keys[i]];
|
|
25534
|
+
}
|
|
25535
|
+
|
|
25536
|
+
/**
|
|
25537
|
+
* StringConstraint fieldName.
|
|
25538
|
+
* @member {string} fieldName
|
|
25539
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25540
|
+
* @instance
|
|
25541
|
+
*/
|
|
25542
|
+
StringConstraint.prototype.fieldName = "";
|
|
25543
|
+
|
|
25544
|
+
/**
|
|
25545
|
+
* StringConstraint values.
|
|
25546
|
+
* @member {Array.<string>} values
|
|
25547
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25548
|
+
* @instance
|
|
25549
|
+
*/
|
|
25550
|
+
StringConstraint.prototype.values = $util.emptyArray;
|
|
25551
|
+
|
|
25552
|
+
/**
|
|
25553
|
+
* StringConstraint querySegment.
|
|
25554
|
+
* @member {string} querySegment
|
|
25555
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25556
|
+
* @instance
|
|
25557
|
+
*/
|
|
25558
|
+
StringConstraint.prototype.querySegment = "";
|
|
25559
|
+
|
|
25560
|
+
/**
|
|
25561
|
+
* Creates a new StringConstraint instance using the specified properties.
|
|
25562
|
+
* @function create
|
|
25563
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25564
|
+
* @static
|
|
25565
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IStringConstraint=} [properties] Properties to set
|
|
25566
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint} StringConstraint instance
|
|
25567
|
+
*/
|
|
25568
|
+
StringConstraint.create = function create(properties) {
|
|
25569
|
+
return new StringConstraint(properties);
|
|
25570
|
+
};
|
|
25571
|
+
|
|
25572
|
+
/**
|
|
25573
|
+
* Encodes the specified StringConstraint message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.verify|verify} messages.
|
|
25574
|
+
* @function encode
|
|
25575
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25576
|
+
* @static
|
|
25577
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IStringConstraint} message StringConstraint message or plain object to encode
|
|
25578
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25579
|
+
* @returns {$protobuf.Writer} Writer
|
|
25580
|
+
*/
|
|
25581
|
+
StringConstraint.encode = function encode(message, writer) {
|
|
25582
|
+
if (!writer)
|
|
25583
|
+
writer = $Writer.create();
|
|
25584
|
+
if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName"))
|
|
25585
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName);
|
|
25586
|
+
if (message.values != null && message.values.length)
|
|
25587
|
+
for (var i = 0; i < message.values.length; ++i)
|
|
25588
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]);
|
|
25589
|
+
if (message.querySegment != null && Object.hasOwnProperty.call(message, "querySegment"))
|
|
25590
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.querySegment);
|
|
25591
|
+
return writer;
|
|
25592
|
+
};
|
|
25593
|
+
|
|
25594
|
+
/**
|
|
25595
|
+
* Encodes the specified StringConstraint message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.verify|verify} messages.
|
|
25596
|
+
* @function encodeDelimited
|
|
25597
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25598
|
+
* @static
|
|
25599
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IStringConstraint} message StringConstraint message or plain object to encode
|
|
25600
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25601
|
+
* @returns {$protobuf.Writer} Writer
|
|
25602
|
+
*/
|
|
25603
|
+
StringConstraint.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25604
|
+
return this.encode(message, writer).ldelim();
|
|
25605
|
+
};
|
|
25606
|
+
|
|
25607
|
+
/**
|
|
25608
|
+
* Decodes a StringConstraint message from the specified reader or buffer.
|
|
25609
|
+
* @function decode
|
|
25610
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25611
|
+
* @static
|
|
25612
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25613
|
+
* @param {number} [length] Message length if known beforehand
|
|
25614
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint} StringConstraint
|
|
25615
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25616
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25617
|
+
*/
|
|
25618
|
+
StringConstraint.decode = function decode(reader, length, error) {
|
|
25619
|
+
if (!(reader instanceof $Reader))
|
|
25620
|
+
reader = $Reader.create(reader);
|
|
25621
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint();
|
|
25622
|
+
while (reader.pos < end) {
|
|
25623
|
+
var tag = reader.uint32();
|
|
25624
|
+
if (tag === error)
|
|
25625
|
+
break;
|
|
25626
|
+
switch (tag >>> 3) {
|
|
25627
|
+
case 1: {
|
|
25628
|
+
message.fieldName = reader.string();
|
|
25629
|
+
break;
|
|
25630
|
+
}
|
|
25631
|
+
case 2: {
|
|
25632
|
+
if (!(message.values && message.values.length))
|
|
25633
|
+
message.values = [];
|
|
25634
|
+
message.values.push(reader.string());
|
|
25635
|
+
break;
|
|
25636
|
+
}
|
|
25637
|
+
case 3: {
|
|
25638
|
+
message.querySegment = reader.string();
|
|
25639
|
+
break;
|
|
25640
|
+
}
|
|
25641
|
+
default:
|
|
25642
|
+
reader.skipType(tag & 7);
|
|
25643
|
+
break;
|
|
25644
|
+
}
|
|
25645
|
+
}
|
|
25646
|
+
return message;
|
|
25647
|
+
};
|
|
25648
|
+
|
|
25649
|
+
/**
|
|
25650
|
+
* Decodes a StringConstraint message from the specified reader or buffer, length delimited.
|
|
25651
|
+
* @function decodeDelimited
|
|
25652
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25653
|
+
* @static
|
|
25654
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25655
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint} StringConstraint
|
|
25656
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25657
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25658
|
+
*/
|
|
25659
|
+
StringConstraint.decodeDelimited = function decodeDelimited(reader) {
|
|
25660
|
+
if (!(reader instanceof $Reader))
|
|
25661
|
+
reader = new $Reader(reader);
|
|
25662
|
+
return this.decode(reader, reader.uint32());
|
|
25663
|
+
};
|
|
25664
|
+
|
|
25665
|
+
/**
|
|
25666
|
+
* Verifies a StringConstraint message.
|
|
25667
|
+
* @function verify
|
|
25668
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25669
|
+
* @static
|
|
25670
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25671
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25672
|
+
*/
|
|
25673
|
+
StringConstraint.verify = function verify(message) {
|
|
25674
|
+
if (typeof message !== "object" || message === null)
|
|
25675
|
+
return "object expected";
|
|
25676
|
+
if (message.fieldName != null && message.hasOwnProperty("fieldName"))
|
|
25677
|
+
if (!$util.isString(message.fieldName))
|
|
25678
|
+
return "fieldName: string expected";
|
|
25679
|
+
if (message.values != null && message.hasOwnProperty("values")) {
|
|
25680
|
+
if (!Array.isArray(message.values))
|
|
25681
|
+
return "values: array expected";
|
|
25682
|
+
for (var i = 0; i < message.values.length; ++i)
|
|
25683
|
+
if (!$util.isString(message.values[i]))
|
|
25684
|
+
return "values: string[] expected";
|
|
25685
|
+
}
|
|
25686
|
+
if (message.querySegment != null && message.hasOwnProperty("querySegment"))
|
|
25687
|
+
if (!$util.isString(message.querySegment))
|
|
25688
|
+
return "querySegment: string expected";
|
|
25689
|
+
return null;
|
|
25690
|
+
};
|
|
25691
|
+
|
|
25692
|
+
/**
|
|
25693
|
+
* Creates a StringConstraint message from a plain object. Also converts values to their respective internal types.
|
|
25694
|
+
* @function fromObject
|
|
25695
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25696
|
+
* @static
|
|
25697
|
+
* @param {Object.<string,*>} object Plain object
|
|
25698
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint} StringConstraint
|
|
25699
|
+
*/
|
|
25700
|
+
StringConstraint.fromObject = function fromObject(object) {
|
|
25701
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint)
|
|
25702
|
+
return object;
|
|
25703
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint();
|
|
25704
|
+
if (object.fieldName != null)
|
|
25705
|
+
message.fieldName = String(object.fieldName);
|
|
25706
|
+
if (object.values) {
|
|
25707
|
+
if (!Array.isArray(object.values))
|
|
25708
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.values: array expected");
|
|
25709
|
+
message.values = [];
|
|
25710
|
+
for (var i = 0; i < object.values.length; ++i)
|
|
25711
|
+
message.values[i] = String(object.values[i]);
|
|
25712
|
+
}
|
|
25713
|
+
if (object.querySegment != null)
|
|
25714
|
+
message.querySegment = String(object.querySegment);
|
|
25715
|
+
return message;
|
|
25716
|
+
};
|
|
25717
|
+
|
|
25718
|
+
/**
|
|
25719
|
+
* Creates a plain object from a StringConstraint message. Also converts values to other types if specified.
|
|
25720
|
+
* @function toObject
|
|
25721
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25722
|
+
* @static
|
|
25723
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint} message StringConstraint
|
|
25724
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25725
|
+
* @returns {Object.<string,*>} Plain object
|
|
25726
|
+
*/
|
|
25727
|
+
StringConstraint.toObject = function toObject(message, options) {
|
|
25728
|
+
if (!options)
|
|
25729
|
+
options = {};
|
|
25730
|
+
var object = {};
|
|
25731
|
+
if (options.arrays || options.defaults)
|
|
25732
|
+
object.values = [];
|
|
25733
|
+
if (options.defaults) {
|
|
25734
|
+
object.fieldName = "";
|
|
25735
|
+
object.querySegment = "";
|
|
25736
|
+
}
|
|
25737
|
+
if (message.fieldName != null && message.hasOwnProperty("fieldName"))
|
|
25738
|
+
object.fieldName = message.fieldName;
|
|
25739
|
+
if (message.values && message.values.length) {
|
|
25740
|
+
object.values = [];
|
|
25741
|
+
for (var j = 0; j < message.values.length; ++j)
|
|
25742
|
+
object.values[j] = message.values[j];
|
|
25743
|
+
}
|
|
25744
|
+
if (message.querySegment != null && message.hasOwnProperty("querySegment"))
|
|
25745
|
+
object.querySegment = message.querySegment;
|
|
25746
|
+
return object;
|
|
25747
|
+
};
|
|
25748
|
+
|
|
25749
|
+
/**
|
|
25750
|
+
* Converts this StringConstraint to JSON.
|
|
25751
|
+
* @function toJSON
|
|
25752
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25753
|
+
* @instance
|
|
25754
|
+
* @returns {Object.<string,*>} JSON object
|
|
25755
|
+
*/
|
|
25756
|
+
StringConstraint.prototype.toJSON = function toJSON() {
|
|
25757
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25758
|
+
};
|
|
25759
|
+
|
|
25760
|
+
/**
|
|
25761
|
+
* Gets the default type url for StringConstraint
|
|
25762
|
+
* @function getTypeUrl
|
|
25763
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint
|
|
25764
|
+
* @static
|
|
25765
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25766
|
+
* @returns {string} The default type url
|
|
25767
|
+
*/
|
|
25768
|
+
StringConstraint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25769
|
+
if (typeUrlPrefix === undefined) {
|
|
25770
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25771
|
+
}
|
|
25772
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint";
|
|
25773
|
+
};
|
|
25774
|
+
|
|
25775
|
+
return StringConstraint;
|
|
25776
|
+
})();
|
|
25777
|
+
|
|
25778
|
+
StructuredExtractedFilter.NumberConstraint = (function() {
|
|
25779
|
+
|
|
25780
|
+
/**
|
|
25781
|
+
* Properties of a NumberConstraint.
|
|
25782
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25783
|
+
* @interface INumberConstraint
|
|
25784
|
+
* @property {string|null} [fieldName] NumberConstraint fieldName
|
|
25785
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison|null} [comparison] NumberConstraint comparison
|
|
25786
|
+
* @property {number|null} [value] NumberConstraint value
|
|
25787
|
+
* @property {string|null} [querySegment] NumberConstraint querySegment
|
|
25788
|
+
*/
|
|
25789
|
+
|
|
25790
|
+
/**
|
|
25791
|
+
* Constructs a new NumberConstraint.
|
|
25792
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
25793
|
+
* @classdesc Represents a NumberConstraint.
|
|
25794
|
+
* @implements INumberConstraint
|
|
25795
|
+
* @constructor
|
|
25796
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.INumberConstraint=} [properties] Properties to set
|
|
25797
|
+
*/
|
|
25798
|
+
function NumberConstraint(properties) {
|
|
25799
|
+
if (properties)
|
|
25800
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25801
|
+
if (properties[keys[i]] != null)
|
|
25802
|
+
this[keys[i]] = properties[keys[i]];
|
|
25803
|
+
}
|
|
25804
|
+
|
|
25805
|
+
/**
|
|
25806
|
+
* NumberConstraint fieldName.
|
|
25807
|
+
* @member {string} fieldName
|
|
25808
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25809
|
+
* @instance
|
|
25810
|
+
*/
|
|
25811
|
+
NumberConstraint.prototype.fieldName = "";
|
|
25812
|
+
|
|
25813
|
+
/**
|
|
25814
|
+
* NumberConstraint comparison.
|
|
25815
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison} comparison
|
|
25816
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25817
|
+
* @instance
|
|
25818
|
+
*/
|
|
25819
|
+
NumberConstraint.prototype.comparison = 0;
|
|
25820
|
+
|
|
25821
|
+
/**
|
|
25822
|
+
* NumberConstraint value.
|
|
25823
|
+
* @member {number} value
|
|
25824
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25825
|
+
* @instance
|
|
25826
|
+
*/
|
|
25827
|
+
NumberConstraint.prototype.value = 0;
|
|
25828
|
+
|
|
25829
|
+
/**
|
|
25830
|
+
* NumberConstraint querySegment.
|
|
25831
|
+
* @member {string} querySegment
|
|
25832
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25833
|
+
* @instance
|
|
25834
|
+
*/
|
|
25835
|
+
NumberConstraint.prototype.querySegment = "";
|
|
25836
|
+
|
|
25837
|
+
/**
|
|
25838
|
+
* Creates a new NumberConstraint instance using the specified properties.
|
|
25839
|
+
* @function create
|
|
25840
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25841
|
+
* @static
|
|
25842
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.INumberConstraint=} [properties] Properties to set
|
|
25843
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint} NumberConstraint instance
|
|
25844
|
+
*/
|
|
25845
|
+
NumberConstraint.create = function create(properties) {
|
|
25846
|
+
return new NumberConstraint(properties);
|
|
25847
|
+
};
|
|
25848
|
+
|
|
25849
|
+
/**
|
|
25850
|
+
* Encodes the specified NumberConstraint message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.verify|verify} messages.
|
|
25851
|
+
* @function encode
|
|
25852
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25853
|
+
* @static
|
|
25854
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.INumberConstraint} message NumberConstraint message or plain object to encode
|
|
25855
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25856
|
+
* @returns {$protobuf.Writer} Writer
|
|
25857
|
+
*/
|
|
25858
|
+
NumberConstraint.encode = function encode(message, writer) {
|
|
25859
|
+
if (!writer)
|
|
25860
|
+
writer = $Writer.create();
|
|
25861
|
+
if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName"))
|
|
25862
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName);
|
|
25863
|
+
if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison"))
|
|
25864
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.comparison);
|
|
25865
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
25866
|
+
writer.uint32(/* id 3, wireType 1 =*/25).double(message.value);
|
|
25867
|
+
if (message.querySegment != null && Object.hasOwnProperty.call(message, "querySegment"))
|
|
25868
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.querySegment);
|
|
25869
|
+
return writer;
|
|
25870
|
+
};
|
|
25871
|
+
|
|
25872
|
+
/**
|
|
25873
|
+
* Encodes the specified NumberConstraint message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.verify|verify} messages.
|
|
25874
|
+
* @function encodeDelimited
|
|
25875
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25876
|
+
* @static
|
|
25877
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.INumberConstraint} message NumberConstraint message or plain object to encode
|
|
25878
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25879
|
+
* @returns {$protobuf.Writer} Writer
|
|
25880
|
+
*/
|
|
25881
|
+
NumberConstraint.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25882
|
+
return this.encode(message, writer).ldelim();
|
|
25883
|
+
};
|
|
25884
|
+
|
|
25885
|
+
/**
|
|
25886
|
+
* Decodes a NumberConstraint message from the specified reader or buffer.
|
|
25887
|
+
* @function decode
|
|
25888
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25889
|
+
* @static
|
|
25890
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25891
|
+
* @param {number} [length] Message length if known beforehand
|
|
25892
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint} NumberConstraint
|
|
25893
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25894
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25895
|
+
*/
|
|
25896
|
+
NumberConstraint.decode = function decode(reader, length, error) {
|
|
25897
|
+
if (!(reader instanceof $Reader))
|
|
25898
|
+
reader = $Reader.create(reader);
|
|
25899
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint();
|
|
25900
|
+
while (reader.pos < end) {
|
|
25901
|
+
var tag = reader.uint32();
|
|
25902
|
+
if (tag === error)
|
|
25903
|
+
break;
|
|
25904
|
+
switch (tag >>> 3) {
|
|
25905
|
+
case 1: {
|
|
25906
|
+
message.fieldName = reader.string();
|
|
25907
|
+
break;
|
|
25908
|
+
}
|
|
25909
|
+
case 2: {
|
|
25910
|
+
message.comparison = reader.int32();
|
|
25911
|
+
break;
|
|
25912
|
+
}
|
|
25913
|
+
case 3: {
|
|
25914
|
+
message.value = reader.double();
|
|
25915
|
+
break;
|
|
25916
|
+
}
|
|
25917
|
+
case 4: {
|
|
25918
|
+
message.querySegment = reader.string();
|
|
25919
|
+
break;
|
|
25920
|
+
}
|
|
25921
|
+
default:
|
|
25922
|
+
reader.skipType(tag & 7);
|
|
25923
|
+
break;
|
|
25924
|
+
}
|
|
25925
|
+
}
|
|
25926
|
+
return message;
|
|
25927
|
+
};
|
|
25928
|
+
|
|
25929
|
+
/**
|
|
25930
|
+
* Decodes a NumberConstraint message from the specified reader or buffer, length delimited.
|
|
25931
|
+
* @function decodeDelimited
|
|
25932
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25933
|
+
* @static
|
|
25934
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25935
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint} NumberConstraint
|
|
25936
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25937
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25938
|
+
*/
|
|
25939
|
+
NumberConstraint.decodeDelimited = function decodeDelimited(reader) {
|
|
25940
|
+
if (!(reader instanceof $Reader))
|
|
25941
|
+
reader = new $Reader(reader);
|
|
25942
|
+
return this.decode(reader, reader.uint32());
|
|
25943
|
+
};
|
|
25944
|
+
|
|
25945
|
+
/**
|
|
25946
|
+
* Verifies a NumberConstraint message.
|
|
25947
|
+
* @function verify
|
|
25948
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25949
|
+
* @static
|
|
25950
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25951
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25952
|
+
*/
|
|
25953
|
+
NumberConstraint.verify = function verify(message) {
|
|
25954
|
+
if (typeof message !== "object" || message === null)
|
|
25955
|
+
return "object expected";
|
|
25956
|
+
if (message.fieldName != null && message.hasOwnProperty("fieldName"))
|
|
25957
|
+
if (!$util.isString(message.fieldName))
|
|
25958
|
+
return "fieldName: string expected";
|
|
25959
|
+
if (message.comparison != null && message.hasOwnProperty("comparison"))
|
|
25960
|
+
switch (message.comparison) {
|
|
25961
|
+
default:
|
|
25962
|
+
return "comparison: enum value expected";
|
|
25963
|
+
case 0:
|
|
25964
|
+
case 1:
|
|
25965
|
+
case 2:
|
|
25966
|
+
case 3:
|
|
25967
|
+
case 4:
|
|
25968
|
+
case 5:
|
|
25969
|
+
break;
|
|
25970
|
+
}
|
|
25971
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
25972
|
+
if (typeof message.value !== "number")
|
|
25973
|
+
return "value: number expected";
|
|
25974
|
+
if (message.querySegment != null && message.hasOwnProperty("querySegment"))
|
|
25975
|
+
if (!$util.isString(message.querySegment))
|
|
25976
|
+
return "querySegment: string expected";
|
|
25977
|
+
return null;
|
|
25978
|
+
};
|
|
25979
|
+
|
|
25980
|
+
/**
|
|
25981
|
+
* Creates a NumberConstraint message from a plain object. Also converts values to their respective internal types.
|
|
25982
|
+
* @function fromObject
|
|
25983
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
25984
|
+
* @static
|
|
25985
|
+
* @param {Object.<string,*>} object Plain object
|
|
25986
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint} NumberConstraint
|
|
25987
|
+
*/
|
|
25988
|
+
NumberConstraint.fromObject = function fromObject(object) {
|
|
25989
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint)
|
|
25990
|
+
return object;
|
|
25991
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint();
|
|
25992
|
+
if (object.fieldName != null)
|
|
25993
|
+
message.fieldName = String(object.fieldName);
|
|
25994
|
+
switch (object.comparison) {
|
|
25995
|
+
default:
|
|
25996
|
+
if (typeof object.comparison === "number") {
|
|
25997
|
+
message.comparison = object.comparison;
|
|
25998
|
+
break;
|
|
25999
|
+
}
|
|
26000
|
+
break;
|
|
26001
|
+
case "COMPARISON_UNSPECIFIED":
|
|
26002
|
+
case 0:
|
|
26003
|
+
message.comparison = 0;
|
|
26004
|
+
break;
|
|
26005
|
+
case "EQUALS":
|
|
26006
|
+
case 1:
|
|
26007
|
+
message.comparison = 1;
|
|
26008
|
+
break;
|
|
26009
|
+
case "LESS_THAN_EQUALS":
|
|
26010
|
+
case 2:
|
|
26011
|
+
message.comparison = 2;
|
|
26012
|
+
break;
|
|
26013
|
+
case "LESS_THAN":
|
|
26014
|
+
case 3:
|
|
26015
|
+
message.comparison = 3;
|
|
26016
|
+
break;
|
|
26017
|
+
case "GREATER_THAN_EQUALS":
|
|
26018
|
+
case 4:
|
|
26019
|
+
message.comparison = 4;
|
|
26020
|
+
break;
|
|
26021
|
+
case "GREATER_THAN":
|
|
26022
|
+
case 5:
|
|
26023
|
+
message.comparison = 5;
|
|
26024
|
+
break;
|
|
26025
|
+
}
|
|
26026
|
+
if (object.value != null)
|
|
26027
|
+
message.value = Number(object.value);
|
|
26028
|
+
if (object.querySegment != null)
|
|
26029
|
+
message.querySegment = String(object.querySegment);
|
|
26030
|
+
return message;
|
|
26031
|
+
};
|
|
26032
|
+
|
|
26033
|
+
/**
|
|
26034
|
+
* Creates a plain object from a NumberConstraint message. Also converts values to other types if specified.
|
|
26035
|
+
* @function toObject
|
|
26036
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
26037
|
+
* @static
|
|
26038
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint} message NumberConstraint
|
|
26039
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
26040
|
+
* @returns {Object.<string,*>} Plain object
|
|
26041
|
+
*/
|
|
26042
|
+
NumberConstraint.toObject = function toObject(message, options) {
|
|
26043
|
+
if (!options)
|
|
26044
|
+
options = {};
|
|
26045
|
+
var object = {};
|
|
26046
|
+
if (options.defaults) {
|
|
26047
|
+
object.fieldName = "";
|
|
26048
|
+
object.comparison = options.enums === String ? "COMPARISON_UNSPECIFIED" : 0;
|
|
26049
|
+
object.value = 0;
|
|
26050
|
+
object.querySegment = "";
|
|
26051
|
+
}
|
|
26052
|
+
if (message.fieldName != null && message.hasOwnProperty("fieldName"))
|
|
26053
|
+
object.fieldName = message.fieldName;
|
|
26054
|
+
if (message.comparison != null && message.hasOwnProperty("comparison"))
|
|
26055
|
+
object.comparison = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison[message.comparison] === undefined ? message.comparison : $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison[message.comparison] : message.comparison;
|
|
26056
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
26057
|
+
object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
|
|
26058
|
+
if (message.querySegment != null && message.hasOwnProperty("querySegment"))
|
|
26059
|
+
object.querySegment = message.querySegment;
|
|
26060
|
+
return object;
|
|
26061
|
+
};
|
|
26062
|
+
|
|
26063
|
+
/**
|
|
26064
|
+
* Converts this NumberConstraint to JSON.
|
|
26065
|
+
* @function toJSON
|
|
26066
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
26067
|
+
* @instance
|
|
26068
|
+
* @returns {Object.<string,*>} JSON object
|
|
26069
|
+
*/
|
|
26070
|
+
NumberConstraint.prototype.toJSON = function toJSON() {
|
|
26071
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
26072
|
+
};
|
|
26073
|
+
|
|
26074
|
+
/**
|
|
26075
|
+
* Gets the default type url for NumberConstraint
|
|
26076
|
+
* @function getTypeUrl
|
|
26077
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint
|
|
26078
|
+
* @static
|
|
26079
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
26080
|
+
* @returns {string} The default type url
|
|
26081
|
+
*/
|
|
26082
|
+
NumberConstraint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
26083
|
+
if (typeUrlPrefix === undefined) {
|
|
26084
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
26085
|
+
}
|
|
26086
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint";
|
|
26087
|
+
};
|
|
26088
|
+
|
|
26089
|
+
/**
|
|
26090
|
+
* Comparison enum.
|
|
26091
|
+
* @name google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.Comparison
|
|
26092
|
+
* @enum {number}
|
|
26093
|
+
* @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value
|
|
26094
|
+
* @property {number} EQUALS=1 EQUALS value
|
|
26095
|
+
* @property {number} LESS_THAN_EQUALS=2 LESS_THAN_EQUALS value
|
|
26096
|
+
* @property {number} LESS_THAN=3 LESS_THAN value
|
|
26097
|
+
* @property {number} GREATER_THAN_EQUALS=4 GREATER_THAN_EQUALS value
|
|
26098
|
+
* @property {number} GREATER_THAN=5 GREATER_THAN value
|
|
26099
|
+
*/
|
|
26100
|
+
NumberConstraint.Comparison = (function() {
|
|
26101
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
26102
|
+
values[valuesById[0] = "COMPARISON_UNSPECIFIED"] = 0;
|
|
26103
|
+
values[valuesById[1] = "EQUALS"] = 1;
|
|
26104
|
+
values[valuesById[2] = "LESS_THAN_EQUALS"] = 2;
|
|
26105
|
+
values[valuesById[3] = "LESS_THAN"] = 3;
|
|
26106
|
+
values[valuesById[4] = "GREATER_THAN_EQUALS"] = 4;
|
|
26107
|
+
values[valuesById[5] = "GREATER_THAN"] = 5;
|
|
26108
|
+
return values;
|
|
26109
|
+
})();
|
|
26110
|
+
|
|
26111
|
+
return NumberConstraint;
|
|
26112
|
+
})();
|
|
26113
|
+
|
|
26114
|
+
StructuredExtractedFilter.GeolocationConstraint = (function() {
|
|
26115
|
+
|
|
26116
|
+
/**
|
|
26117
|
+
* Properties of a GeolocationConstraint.
|
|
26118
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26119
|
+
* @interface IGeolocationConstraint
|
|
26120
|
+
* @property {string|null} [fieldName] GeolocationConstraint fieldName
|
|
26121
|
+
* @property {string|null} [address] GeolocationConstraint address
|
|
26122
|
+
* @property {number|null} [latitude] GeolocationConstraint latitude
|
|
26123
|
+
* @property {number|null} [longitude] GeolocationConstraint longitude
|
|
26124
|
+
* @property {number|null} [radiusInMeters] GeolocationConstraint radiusInMeters
|
|
26125
|
+
*/
|
|
26126
|
+
|
|
26127
|
+
/**
|
|
26128
|
+
* Constructs a new GeolocationConstraint.
|
|
26129
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26130
|
+
* @classdesc Represents a GeolocationConstraint.
|
|
26131
|
+
* @implements IGeolocationConstraint
|
|
26132
|
+
* @constructor
|
|
26133
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IGeolocationConstraint=} [properties] Properties to set
|
|
26134
|
+
*/
|
|
26135
|
+
function GeolocationConstraint(properties) {
|
|
26136
|
+
if (properties)
|
|
26137
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
26138
|
+
if (properties[keys[i]] != null)
|
|
26139
|
+
this[keys[i]] = properties[keys[i]];
|
|
26140
|
+
}
|
|
26141
|
+
|
|
26142
|
+
/**
|
|
26143
|
+
* GeolocationConstraint fieldName.
|
|
26144
|
+
* @member {string} fieldName
|
|
26145
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26146
|
+
* @instance
|
|
26147
|
+
*/
|
|
26148
|
+
GeolocationConstraint.prototype.fieldName = "";
|
|
26149
|
+
|
|
26150
|
+
/**
|
|
26151
|
+
* GeolocationConstraint address.
|
|
26152
|
+
* @member {string} address
|
|
26153
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26154
|
+
* @instance
|
|
26155
|
+
*/
|
|
26156
|
+
GeolocationConstraint.prototype.address = "";
|
|
26157
|
+
|
|
26158
|
+
/**
|
|
26159
|
+
* GeolocationConstraint latitude.
|
|
26160
|
+
* @member {number} latitude
|
|
26161
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26162
|
+
* @instance
|
|
26163
|
+
*/
|
|
26164
|
+
GeolocationConstraint.prototype.latitude = 0;
|
|
26165
|
+
|
|
26166
|
+
/**
|
|
26167
|
+
* GeolocationConstraint longitude.
|
|
26168
|
+
* @member {number} longitude
|
|
26169
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26170
|
+
* @instance
|
|
26171
|
+
*/
|
|
26172
|
+
GeolocationConstraint.prototype.longitude = 0;
|
|
26173
|
+
|
|
26174
|
+
/**
|
|
26175
|
+
* GeolocationConstraint radiusInMeters.
|
|
26176
|
+
* @member {number} radiusInMeters
|
|
26177
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26178
|
+
* @instance
|
|
26179
|
+
*/
|
|
26180
|
+
GeolocationConstraint.prototype.radiusInMeters = 0;
|
|
26181
|
+
|
|
26182
|
+
/**
|
|
26183
|
+
* Creates a new GeolocationConstraint instance using the specified properties.
|
|
26184
|
+
* @function create
|
|
26185
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26186
|
+
* @static
|
|
26187
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IGeolocationConstraint=} [properties] Properties to set
|
|
26188
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint} GeolocationConstraint instance
|
|
26189
|
+
*/
|
|
26190
|
+
GeolocationConstraint.create = function create(properties) {
|
|
26191
|
+
return new GeolocationConstraint(properties);
|
|
26192
|
+
};
|
|
26193
|
+
|
|
26194
|
+
/**
|
|
26195
|
+
* Encodes the specified GeolocationConstraint message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.verify|verify} messages.
|
|
26196
|
+
* @function encode
|
|
26197
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26198
|
+
* @static
|
|
26199
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IGeolocationConstraint} message GeolocationConstraint message or plain object to encode
|
|
26200
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26201
|
+
* @returns {$protobuf.Writer} Writer
|
|
26202
|
+
*/
|
|
26203
|
+
GeolocationConstraint.encode = function encode(message, writer) {
|
|
26204
|
+
if (!writer)
|
|
26205
|
+
writer = $Writer.create();
|
|
26206
|
+
if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName"))
|
|
26207
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName);
|
|
26208
|
+
if (message.address != null && Object.hasOwnProperty.call(message, "address"))
|
|
26209
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.address);
|
|
26210
|
+
if (message.radiusInMeters != null && Object.hasOwnProperty.call(message, "radiusInMeters"))
|
|
26211
|
+
writer.uint32(/* id 3, wireType 5 =*/29).float(message.radiusInMeters);
|
|
26212
|
+
if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
|
|
26213
|
+
writer.uint32(/* id 4, wireType 1 =*/33).double(message.latitude);
|
|
26214
|
+
if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
|
|
26215
|
+
writer.uint32(/* id 5, wireType 1 =*/41).double(message.longitude);
|
|
26216
|
+
return writer;
|
|
26217
|
+
};
|
|
26218
|
+
|
|
26219
|
+
/**
|
|
26220
|
+
* Encodes the specified GeolocationConstraint message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.verify|verify} messages.
|
|
26221
|
+
* @function encodeDelimited
|
|
26222
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26223
|
+
* @static
|
|
26224
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IGeolocationConstraint} message GeolocationConstraint message or plain object to encode
|
|
26225
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26226
|
+
* @returns {$protobuf.Writer} Writer
|
|
26227
|
+
*/
|
|
26228
|
+
GeolocationConstraint.encodeDelimited = function encodeDelimited(message, writer) {
|
|
26229
|
+
return this.encode(message, writer).ldelim();
|
|
26230
|
+
};
|
|
26231
|
+
|
|
26232
|
+
/**
|
|
26233
|
+
* Decodes a GeolocationConstraint message from the specified reader or buffer.
|
|
26234
|
+
* @function decode
|
|
26235
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26236
|
+
* @static
|
|
26237
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
26238
|
+
* @param {number} [length] Message length if known beforehand
|
|
26239
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint} GeolocationConstraint
|
|
26240
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
26241
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
26242
|
+
*/
|
|
26243
|
+
GeolocationConstraint.decode = function decode(reader, length, error) {
|
|
26244
|
+
if (!(reader instanceof $Reader))
|
|
26245
|
+
reader = $Reader.create(reader);
|
|
26246
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint();
|
|
26247
|
+
while (reader.pos < end) {
|
|
26248
|
+
var tag = reader.uint32();
|
|
26249
|
+
if (tag === error)
|
|
26250
|
+
break;
|
|
26251
|
+
switch (tag >>> 3) {
|
|
26252
|
+
case 1: {
|
|
26253
|
+
message.fieldName = reader.string();
|
|
26254
|
+
break;
|
|
26255
|
+
}
|
|
26256
|
+
case 2: {
|
|
26257
|
+
message.address = reader.string();
|
|
26258
|
+
break;
|
|
26259
|
+
}
|
|
26260
|
+
case 4: {
|
|
26261
|
+
message.latitude = reader.double();
|
|
26262
|
+
break;
|
|
26263
|
+
}
|
|
26264
|
+
case 5: {
|
|
26265
|
+
message.longitude = reader.double();
|
|
26266
|
+
break;
|
|
26267
|
+
}
|
|
26268
|
+
case 3: {
|
|
26269
|
+
message.radiusInMeters = reader.float();
|
|
26270
|
+
break;
|
|
26271
|
+
}
|
|
26272
|
+
default:
|
|
26273
|
+
reader.skipType(tag & 7);
|
|
26274
|
+
break;
|
|
26275
|
+
}
|
|
26276
|
+
}
|
|
26277
|
+
return message;
|
|
26278
|
+
};
|
|
26279
|
+
|
|
26280
|
+
/**
|
|
26281
|
+
* Decodes a GeolocationConstraint message from the specified reader or buffer, length delimited.
|
|
26282
|
+
* @function decodeDelimited
|
|
26283
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26284
|
+
* @static
|
|
26285
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
26286
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint} GeolocationConstraint
|
|
26287
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
26288
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
26289
|
+
*/
|
|
26290
|
+
GeolocationConstraint.decodeDelimited = function decodeDelimited(reader) {
|
|
26291
|
+
if (!(reader instanceof $Reader))
|
|
26292
|
+
reader = new $Reader(reader);
|
|
26293
|
+
return this.decode(reader, reader.uint32());
|
|
26294
|
+
};
|
|
26295
|
+
|
|
26296
|
+
/**
|
|
26297
|
+
* Verifies a GeolocationConstraint message.
|
|
26298
|
+
* @function verify
|
|
26299
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26300
|
+
* @static
|
|
26301
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
26302
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
26303
|
+
*/
|
|
26304
|
+
GeolocationConstraint.verify = function verify(message) {
|
|
26305
|
+
if (typeof message !== "object" || message === null)
|
|
26306
|
+
return "object expected";
|
|
26307
|
+
if (message.fieldName != null && message.hasOwnProperty("fieldName"))
|
|
26308
|
+
if (!$util.isString(message.fieldName))
|
|
26309
|
+
return "fieldName: string expected";
|
|
26310
|
+
if (message.address != null && message.hasOwnProperty("address"))
|
|
26311
|
+
if (!$util.isString(message.address))
|
|
26312
|
+
return "address: string expected";
|
|
26313
|
+
if (message.latitude != null && message.hasOwnProperty("latitude"))
|
|
26314
|
+
if (typeof message.latitude !== "number")
|
|
26315
|
+
return "latitude: number expected";
|
|
26316
|
+
if (message.longitude != null && message.hasOwnProperty("longitude"))
|
|
26317
|
+
if (typeof message.longitude !== "number")
|
|
26318
|
+
return "longitude: number expected";
|
|
26319
|
+
if (message.radiusInMeters != null && message.hasOwnProperty("radiusInMeters"))
|
|
26320
|
+
if (typeof message.radiusInMeters !== "number")
|
|
26321
|
+
return "radiusInMeters: number expected";
|
|
26322
|
+
return null;
|
|
26323
|
+
};
|
|
26324
|
+
|
|
26325
|
+
/**
|
|
26326
|
+
* Creates a GeolocationConstraint message from a plain object. Also converts values to their respective internal types.
|
|
26327
|
+
* @function fromObject
|
|
26328
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26329
|
+
* @static
|
|
26330
|
+
* @param {Object.<string,*>} object Plain object
|
|
26331
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint} GeolocationConstraint
|
|
26332
|
+
*/
|
|
26333
|
+
GeolocationConstraint.fromObject = function fromObject(object) {
|
|
26334
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint)
|
|
26335
|
+
return object;
|
|
26336
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint();
|
|
26337
|
+
if (object.fieldName != null)
|
|
26338
|
+
message.fieldName = String(object.fieldName);
|
|
26339
|
+
if (object.address != null)
|
|
26340
|
+
message.address = String(object.address);
|
|
26341
|
+
if (object.latitude != null)
|
|
26342
|
+
message.latitude = Number(object.latitude);
|
|
26343
|
+
if (object.longitude != null)
|
|
26344
|
+
message.longitude = Number(object.longitude);
|
|
26345
|
+
if (object.radiusInMeters != null)
|
|
26346
|
+
message.radiusInMeters = Number(object.radiusInMeters);
|
|
26347
|
+
return message;
|
|
26348
|
+
};
|
|
26349
|
+
|
|
26350
|
+
/**
|
|
26351
|
+
* Creates a plain object from a GeolocationConstraint message. Also converts values to other types if specified.
|
|
26352
|
+
* @function toObject
|
|
26353
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26354
|
+
* @static
|
|
26355
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint} message GeolocationConstraint
|
|
26356
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
26357
|
+
* @returns {Object.<string,*>} Plain object
|
|
26358
|
+
*/
|
|
26359
|
+
GeolocationConstraint.toObject = function toObject(message, options) {
|
|
26360
|
+
if (!options)
|
|
26361
|
+
options = {};
|
|
26362
|
+
var object = {};
|
|
26363
|
+
if (options.defaults) {
|
|
26364
|
+
object.fieldName = "";
|
|
26365
|
+
object.address = "";
|
|
26366
|
+
object.radiusInMeters = 0;
|
|
26367
|
+
object.latitude = 0;
|
|
26368
|
+
object.longitude = 0;
|
|
26369
|
+
}
|
|
26370
|
+
if (message.fieldName != null && message.hasOwnProperty("fieldName"))
|
|
26371
|
+
object.fieldName = message.fieldName;
|
|
26372
|
+
if (message.address != null && message.hasOwnProperty("address"))
|
|
26373
|
+
object.address = message.address;
|
|
26374
|
+
if (message.radiusInMeters != null && message.hasOwnProperty("radiusInMeters"))
|
|
26375
|
+
object.radiusInMeters = options.json && !isFinite(message.radiusInMeters) ? String(message.radiusInMeters) : message.radiusInMeters;
|
|
26376
|
+
if (message.latitude != null && message.hasOwnProperty("latitude"))
|
|
26377
|
+
object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
|
|
26378
|
+
if (message.longitude != null && message.hasOwnProperty("longitude"))
|
|
26379
|
+
object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
|
|
26380
|
+
return object;
|
|
26381
|
+
};
|
|
26382
|
+
|
|
26383
|
+
/**
|
|
26384
|
+
* Converts this GeolocationConstraint to JSON.
|
|
26385
|
+
* @function toJSON
|
|
26386
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26387
|
+
* @instance
|
|
26388
|
+
* @returns {Object.<string,*>} JSON object
|
|
26389
|
+
*/
|
|
26390
|
+
GeolocationConstraint.prototype.toJSON = function toJSON() {
|
|
26391
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
26392
|
+
};
|
|
26393
|
+
|
|
26394
|
+
/**
|
|
26395
|
+
* Gets the default type url for GeolocationConstraint
|
|
26396
|
+
* @function getTypeUrl
|
|
26397
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint
|
|
26398
|
+
* @static
|
|
26399
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
26400
|
+
* @returns {string} The default type url
|
|
26401
|
+
*/
|
|
26402
|
+
GeolocationConstraint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
26403
|
+
if (typeUrlPrefix === undefined) {
|
|
26404
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
26405
|
+
}
|
|
26406
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint";
|
|
26407
|
+
};
|
|
26408
|
+
|
|
26409
|
+
return GeolocationConstraint;
|
|
26410
|
+
})();
|
|
26411
|
+
|
|
26412
|
+
StructuredExtractedFilter.AndExpression = (function() {
|
|
26413
|
+
|
|
26414
|
+
/**
|
|
26415
|
+
* Properties of an AndExpression.
|
|
26416
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26417
|
+
* @interface IAndExpression
|
|
26418
|
+
* @property {Array.<google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression>|null} [expressions] AndExpression expressions
|
|
26419
|
+
*/
|
|
26420
|
+
|
|
26421
|
+
/**
|
|
26422
|
+
* Constructs a new AndExpression.
|
|
26423
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26424
|
+
* @classdesc Represents an AndExpression.
|
|
26425
|
+
* @implements IAndExpression
|
|
26426
|
+
* @constructor
|
|
26427
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IAndExpression=} [properties] Properties to set
|
|
26428
|
+
*/
|
|
26429
|
+
function AndExpression(properties) {
|
|
26430
|
+
this.expressions = [];
|
|
26431
|
+
if (properties)
|
|
26432
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
26433
|
+
if (properties[keys[i]] != null)
|
|
26434
|
+
this[keys[i]] = properties[keys[i]];
|
|
26435
|
+
}
|
|
26436
|
+
|
|
26437
|
+
/**
|
|
26438
|
+
* AndExpression expressions.
|
|
26439
|
+
* @member {Array.<google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression>} expressions
|
|
26440
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26441
|
+
* @instance
|
|
26442
|
+
*/
|
|
26443
|
+
AndExpression.prototype.expressions = $util.emptyArray;
|
|
26444
|
+
|
|
26445
|
+
/**
|
|
26446
|
+
* Creates a new AndExpression instance using the specified properties.
|
|
26447
|
+
* @function create
|
|
26448
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26449
|
+
* @static
|
|
26450
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IAndExpression=} [properties] Properties to set
|
|
26451
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression} AndExpression instance
|
|
26452
|
+
*/
|
|
26453
|
+
AndExpression.create = function create(properties) {
|
|
26454
|
+
return new AndExpression(properties);
|
|
26455
|
+
};
|
|
26456
|
+
|
|
26457
|
+
/**
|
|
26458
|
+
* Encodes the specified AndExpression message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.verify|verify} messages.
|
|
26459
|
+
* @function encode
|
|
26460
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26461
|
+
* @static
|
|
26462
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IAndExpression} message AndExpression message or plain object to encode
|
|
26463
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26464
|
+
* @returns {$protobuf.Writer} Writer
|
|
26465
|
+
*/
|
|
26466
|
+
AndExpression.encode = function encode(message, writer) {
|
|
26467
|
+
if (!writer)
|
|
26468
|
+
writer = $Writer.create();
|
|
26469
|
+
if (message.expressions != null && message.expressions.length)
|
|
26470
|
+
for (var i = 0; i < message.expressions.length; ++i)
|
|
26471
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
26472
|
+
return writer;
|
|
26473
|
+
};
|
|
26474
|
+
|
|
26475
|
+
/**
|
|
26476
|
+
* Encodes the specified AndExpression message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.verify|verify} messages.
|
|
26477
|
+
* @function encodeDelimited
|
|
26478
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26479
|
+
* @static
|
|
26480
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IAndExpression} message AndExpression message or plain object to encode
|
|
26481
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26482
|
+
* @returns {$protobuf.Writer} Writer
|
|
26483
|
+
*/
|
|
26484
|
+
AndExpression.encodeDelimited = function encodeDelimited(message, writer) {
|
|
26485
|
+
return this.encode(message, writer).ldelim();
|
|
26486
|
+
};
|
|
26487
|
+
|
|
26488
|
+
/**
|
|
26489
|
+
* Decodes an AndExpression message from the specified reader or buffer.
|
|
26490
|
+
* @function decode
|
|
26491
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26492
|
+
* @static
|
|
26493
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
26494
|
+
* @param {number} [length] Message length if known beforehand
|
|
26495
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression} AndExpression
|
|
26496
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
26497
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
26498
|
+
*/
|
|
26499
|
+
AndExpression.decode = function decode(reader, length, error) {
|
|
26500
|
+
if (!(reader instanceof $Reader))
|
|
26501
|
+
reader = $Reader.create(reader);
|
|
26502
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression();
|
|
26503
|
+
while (reader.pos < end) {
|
|
26504
|
+
var tag = reader.uint32();
|
|
26505
|
+
if (tag === error)
|
|
26506
|
+
break;
|
|
26507
|
+
switch (tag >>> 3) {
|
|
26508
|
+
case 1: {
|
|
26509
|
+
if (!(message.expressions && message.expressions.length))
|
|
26510
|
+
message.expressions = [];
|
|
26511
|
+
message.expressions.push($root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.decode(reader, reader.uint32()));
|
|
26512
|
+
break;
|
|
26513
|
+
}
|
|
26514
|
+
default:
|
|
26515
|
+
reader.skipType(tag & 7);
|
|
26516
|
+
break;
|
|
26517
|
+
}
|
|
26518
|
+
}
|
|
26519
|
+
return message;
|
|
26520
|
+
};
|
|
26521
|
+
|
|
26522
|
+
/**
|
|
26523
|
+
* Decodes an AndExpression message from the specified reader or buffer, length delimited.
|
|
26524
|
+
* @function decodeDelimited
|
|
26525
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26526
|
+
* @static
|
|
26527
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
26528
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression} AndExpression
|
|
26529
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
26530
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
26531
|
+
*/
|
|
26532
|
+
AndExpression.decodeDelimited = function decodeDelimited(reader) {
|
|
26533
|
+
if (!(reader instanceof $Reader))
|
|
26534
|
+
reader = new $Reader(reader);
|
|
26535
|
+
return this.decode(reader, reader.uint32());
|
|
26536
|
+
};
|
|
26537
|
+
|
|
26538
|
+
/**
|
|
26539
|
+
* Verifies an AndExpression message.
|
|
26540
|
+
* @function verify
|
|
26541
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26542
|
+
* @static
|
|
26543
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
26544
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
26545
|
+
*/
|
|
26546
|
+
AndExpression.verify = function verify(message) {
|
|
26547
|
+
if (typeof message !== "object" || message === null)
|
|
26548
|
+
return "object expected";
|
|
26549
|
+
if (message.expressions != null && message.hasOwnProperty("expressions")) {
|
|
26550
|
+
if (!Array.isArray(message.expressions))
|
|
26551
|
+
return "expressions: array expected";
|
|
26552
|
+
for (var i = 0; i < message.expressions.length; ++i) {
|
|
26553
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.verify(message.expressions[i]);
|
|
26554
|
+
if (error)
|
|
26555
|
+
return "expressions." + error;
|
|
26556
|
+
}
|
|
26557
|
+
}
|
|
26558
|
+
return null;
|
|
26559
|
+
};
|
|
26560
|
+
|
|
26561
|
+
/**
|
|
26562
|
+
* Creates an AndExpression message from a plain object. Also converts values to their respective internal types.
|
|
26563
|
+
* @function fromObject
|
|
26564
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26565
|
+
* @static
|
|
26566
|
+
* @param {Object.<string,*>} object Plain object
|
|
26567
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression} AndExpression
|
|
26568
|
+
*/
|
|
26569
|
+
AndExpression.fromObject = function fromObject(object) {
|
|
26570
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression)
|
|
26571
|
+
return object;
|
|
26572
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression();
|
|
26573
|
+
if (object.expressions) {
|
|
26574
|
+
if (!Array.isArray(object.expressions))
|
|
26575
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.expressions: array expected");
|
|
26576
|
+
message.expressions = [];
|
|
26577
|
+
for (var i = 0; i < object.expressions.length; ++i) {
|
|
26578
|
+
if (typeof object.expressions[i] !== "object")
|
|
26579
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.expressions: object expected");
|
|
26580
|
+
message.expressions[i] = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.fromObject(object.expressions[i]);
|
|
26581
|
+
}
|
|
26582
|
+
}
|
|
26583
|
+
return message;
|
|
26584
|
+
};
|
|
26585
|
+
|
|
26586
|
+
/**
|
|
26587
|
+
* Creates a plain object from an AndExpression message. Also converts values to other types if specified.
|
|
26588
|
+
* @function toObject
|
|
26589
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26590
|
+
* @static
|
|
26591
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression} message AndExpression
|
|
26592
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
26593
|
+
* @returns {Object.<string,*>} Plain object
|
|
26594
|
+
*/
|
|
26595
|
+
AndExpression.toObject = function toObject(message, options) {
|
|
26596
|
+
if (!options)
|
|
26597
|
+
options = {};
|
|
26598
|
+
var object = {};
|
|
26599
|
+
if (options.arrays || options.defaults)
|
|
26600
|
+
object.expressions = [];
|
|
26601
|
+
if (message.expressions && message.expressions.length) {
|
|
26602
|
+
object.expressions = [];
|
|
26603
|
+
for (var j = 0; j < message.expressions.length; ++j)
|
|
26604
|
+
object.expressions[j] = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.toObject(message.expressions[j], options);
|
|
26605
|
+
}
|
|
26606
|
+
return object;
|
|
26607
|
+
};
|
|
26608
|
+
|
|
26609
|
+
/**
|
|
26610
|
+
* Converts this AndExpression to JSON.
|
|
26611
|
+
* @function toJSON
|
|
26612
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26613
|
+
* @instance
|
|
26614
|
+
* @returns {Object.<string,*>} JSON object
|
|
26615
|
+
*/
|
|
26616
|
+
AndExpression.prototype.toJSON = function toJSON() {
|
|
26617
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
26618
|
+
};
|
|
26619
|
+
|
|
26620
|
+
/**
|
|
26621
|
+
* Gets the default type url for AndExpression
|
|
26622
|
+
* @function getTypeUrl
|
|
26623
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression
|
|
26624
|
+
* @static
|
|
26625
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
26626
|
+
* @returns {string} The default type url
|
|
26627
|
+
*/
|
|
26628
|
+
AndExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
26629
|
+
if (typeUrlPrefix === undefined) {
|
|
26630
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
26631
|
+
}
|
|
26632
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression";
|
|
26633
|
+
};
|
|
26634
|
+
|
|
26635
|
+
return AndExpression;
|
|
26636
|
+
})();
|
|
26637
|
+
|
|
26638
|
+
StructuredExtractedFilter.OrExpression = (function() {
|
|
26639
|
+
|
|
26640
|
+
/**
|
|
26641
|
+
* Properties of an OrExpression.
|
|
26642
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26643
|
+
* @interface IOrExpression
|
|
26644
|
+
* @property {Array.<google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression>|null} [expressions] OrExpression expressions
|
|
26645
|
+
*/
|
|
26646
|
+
|
|
26647
|
+
/**
|
|
26648
|
+
* Constructs a new OrExpression.
|
|
26649
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26650
|
+
* @classdesc Represents an OrExpression.
|
|
26651
|
+
* @implements IOrExpression
|
|
26652
|
+
* @constructor
|
|
26653
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IOrExpression=} [properties] Properties to set
|
|
26654
|
+
*/
|
|
26655
|
+
function OrExpression(properties) {
|
|
26656
|
+
this.expressions = [];
|
|
26657
|
+
if (properties)
|
|
26658
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
26659
|
+
if (properties[keys[i]] != null)
|
|
26660
|
+
this[keys[i]] = properties[keys[i]];
|
|
26661
|
+
}
|
|
26662
|
+
|
|
26663
|
+
/**
|
|
26664
|
+
* OrExpression expressions.
|
|
26665
|
+
* @member {Array.<google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression>} expressions
|
|
26666
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26667
|
+
* @instance
|
|
26668
|
+
*/
|
|
26669
|
+
OrExpression.prototype.expressions = $util.emptyArray;
|
|
26670
|
+
|
|
26671
|
+
/**
|
|
26672
|
+
* Creates a new OrExpression instance using the specified properties.
|
|
26673
|
+
* @function create
|
|
26674
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26675
|
+
* @static
|
|
26676
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IOrExpression=} [properties] Properties to set
|
|
26677
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression} OrExpression instance
|
|
26678
|
+
*/
|
|
26679
|
+
OrExpression.create = function create(properties) {
|
|
26680
|
+
return new OrExpression(properties);
|
|
26681
|
+
};
|
|
26682
|
+
|
|
26683
|
+
/**
|
|
26684
|
+
* Encodes the specified OrExpression message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.verify|verify} messages.
|
|
26685
|
+
* @function encode
|
|
26686
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26687
|
+
* @static
|
|
26688
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IOrExpression} message OrExpression message or plain object to encode
|
|
26689
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26690
|
+
* @returns {$protobuf.Writer} Writer
|
|
26691
|
+
*/
|
|
26692
|
+
OrExpression.encode = function encode(message, writer) {
|
|
26693
|
+
if (!writer)
|
|
26694
|
+
writer = $Writer.create();
|
|
26695
|
+
if (message.expressions != null && message.expressions.length)
|
|
26696
|
+
for (var i = 0; i < message.expressions.length; ++i)
|
|
26697
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
26698
|
+
return writer;
|
|
26699
|
+
};
|
|
26700
|
+
|
|
26701
|
+
/**
|
|
26702
|
+
* Encodes the specified OrExpression message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.verify|verify} messages.
|
|
26703
|
+
* @function encodeDelimited
|
|
26704
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26705
|
+
* @static
|
|
26706
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IOrExpression} message OrExpression message or plain object to encode
|
|
26707
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26708
|
+
* @returns {$protobuf.Writer} Writer
|
|
26709
|
+
*/
|
|
26710
|
+
OrExpression.encodeDelimited = function encodeDelimited(message, writer) {
|
|
26711
|
+
return this.encode(message, writer).ldelim();
|
|
26712
|
+
};
|
|
26713
|
+
|
|
26714
|
+
/**
|
|
26715
|
+
* Decodes an OrExpression message from the specified reader or buffer.
|
|
26716
|
+
* @function decode
|
|
26717
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26718
|
+
* @static
|
|
26719
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
26720
|
+
* @param {number} [length] Message length if known beforehand
|
|
26721
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression} OrExpression
|
|
26722
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
26723
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
26724
|
+
*/
|
|
26725
|
+
OrExpression.decode = function decode(reader, length, error) {
|
|
26726
|
+
if (!(reader instanceof $Reader))
|
|
26727
|
+
reader = $Reader.create(reader);
|
|
26728
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression();
|
|
26729
|
+
while (reader.pos < end) {
|
|
26730
|
+
var tag = reader.uint32();
|
|
26731
|
+
if (tag === error)
|
|
26732
|
+
break;
|
|
26733
|
+
switch (tag >>> 3) {
|
|
26734
|
+
case 1: {
|
|
26735
|
+
if (!(message.expressions && message.expressions.length))
|
|
26736
|
+
message.expressions = [];
|
|
26737
|
+
message.expressions.push($root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.decode(reader, reader.uint32()));
|
|
26738
|
+
break;
|
|
26739
|
+
}
|
|
26740
|
+
default:
|
|
26741
|
+
reader.skipType(tag & 7);
|
|
26742
|
+
break;
|
|
26743
|
+
}
|
|
26744
|
+
}
|
|
26745
|
+
return message;
|
|
26746
|
+
};
|
|
26747
|
+
|
|
26748
|
+
/**
|
|
26749
|
+
* Decodes an OrExpression message from the specified reader or buffer, length delimited.
|
|
26750
|
+
* @function decodeDelimited
|
|
26751
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26752
|
+
* @static
|
|
26753
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
26754
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression} OrExpression
|
|
26755
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
26756
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
26757
|
+
*/
|
|
26758
|
+
OrExpression.decodeDelimited = function decodeDelimited(reader) {
|
|
26759
|
+
if (!(reader instanceof $Reader))
|
|
26760
|
+
reader = new $Reader(reader);
|
|
26761
|
+
return this.decode(reader, reader.uint32());
|
|
26762
|
+
};
|
|
26763
|
+
|
|
26764
|
+
/**
|
|
26765
|
+
* Verifies an OrExpression message.
|
|
26766
|
+
* @function verify
|
|
26767
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26768
|
+
* @static
|
|
26769
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
26770
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
26771
|
+
*/
|
|
26772
|
+
OrExpression.verify = function verify(message) {
|
|
26773
|
+
if (typeof message !== "object" || message === null)
|
|
26774
|
+
return "object expected";
|
|
26775
|
+
if (message.expressions != null && message.hasOwnProperty("expressions")) {
|
|
26776
|
+
if (!Array.isArray(message.expressions))
|
|
26777
|
+
return "expressions: array expected";
|
|
26778
|
+
for (var i = 0; i < message.expressions.length; ++i) {
|
|
26779
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.verify(message.expressions[i]);
|
|
26780
|
+
if (error)
|
|
26781
|
+
return "expressions." + error;
|
|
26782
|
+
}
|
|
26783
|
+
}
|
|
26784
|
+
return null;
|
|
26785
|
+
};
|
|
26786
|
+
|
|
26787
|
+
/**
|
|
26788
|
+
* Creates an OrExpression message from a plain object. Also converts values to their respective internal types.
|
|
26789
|
+
* @function fromObject
|
|
26790
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26791
|
+
* @static
|
|
26792
|
+
* @param {Object.<string,*>} object Plain object
|
|
26793
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression} OrExpression
|
|
26794
|
+
*/
|
|
26795
|
+
OrExpression.fromObject = function fromObject(object) {
|
|
26796
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression)
|
|
26797
|
+
return object;
|
|
26798
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression();
|
|
26799
|
+
if (object.expressions) {
|
|
26800
|
+
if (!Array.isArray(object.expressions))
|
|
26801
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.expressions: array expected");
|
|
26802
|
+
message.expressions = [];
|
|
26803
|
+
for (var i = 0; i < object.expressions.length; ++i) {
|
|
26804
|
+
if (typeof object.expressions[i] !== "object")
|
|
26805
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.expressions: object expected");
|
|
26806
|
+
message.expressions[i] = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.fromObject(object.expressions[i]);
|
|
26807
|
+
}
|
|
26808
|
+
}
|
|
26809
|
+
return message;
|
|
26810
|
+
};
|
|
26811
|
+
|
|
26812
|
+
/**
|
|
26813
|
+
* Creates a plain object from an OrExpression message. Also converts values to other types if specified.
|
|
26814
|
+
* @function toObject
|
|
26815
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26816
|
+
* @static
|
|
26817
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression} message OrExpression
|
|
26818
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
26819
|
+
* @returns {Object.<string,*>} Plain object
|
|
26820
|
+
*/
|
|
26821
|
+
OrExpression.toObject = function toObject(message, options) {
|
|
26822
|
+
if (!options)
|
|
26823
|
+
options = {};
|
|
26824
|
+
var object = {};
|
|
26825
|
+
if (options.arrays || options.defaults)
|
|
26826
|
+
object.expressions = [];
|
|
26827
|
+
if (message.expressions && message.expressions.length) {
|
|
26828
|
+
object.expressions = [];
|
|
26829
|
+
for (var j = 0; j < message.expressions.length; ++j)
|
|
26830
|
+
object.expressions[j] = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.toObject(message.expressions[j], options);
|
|
26831
|
+
}
|
|
26832
|
+
return object;
|
|
26833
|
+
};
|
|
26834
|
+
|
|
26835
|
+
/**
|
|
26836
|
+
* Converts this OrExpression to JSON.
|
|
26837
|
+
* @function toJSON
|
|
26838
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26839
|
+
* @instance
|
|
26840
|
+
* @returns {Object.<string,*>} JSON object
|
|
26841
|
+
*/
|
|
26842
|
+
OrExpression.prototype.toJSON = function toJSON() {
|
|
26843
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
26844
|
+
};
|
|
26845
|
+
|
|
26846
|
+
/**
|
|
26847
|
+
* Gets the default type url for OrExpression
|
|
26848
|
+
* @function getTypeUrl
|
|
26849
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression
|
|
26850
|
+
* @static
|
|
26851
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
26852
|
+
* @returns {string} The default type url
|
|
26853
|
+
*/
|
|
26854
|
+
OrExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
26855
|
+
if (typeUrlPrefix === undefined) {
|
|
26856
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
26857
|
+
}
|
|
26858
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression";
|
|
26859
|
+
};
|
|
26860
|
+
|
|
26861
|
+
return OrExpression;
|
|
26862
|
+
})();
|
|
26863
|
+
|
|
26864
|
+
StructuredExtractedFilter.Expression = (function() {
|
|
26865
|
+
|
|
26866
|
+
/**
|
|
26867
|
+
* Properties of an Expression.
|
|
26868
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26869
|
+
* @interface IExpression
|
|
26870
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IStringConstraint|null} [stringConstraint] Expression stringConstraint
|
|
26871
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.INumberConstraint|null} [numberConstraint] Expression numberConstraint
|
|
26872
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IGeolocationConstraint|null} [geolocationConstraint] Expression geolocationConstraint
|
|
26873
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IAndExpression|null} [andExpr] Expression andExpr
|
|
26874
|
+
* @property {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IOrExpression|null} [orExpr] Expression orExpr
|
|
26875
|
+
*/
|
|
26876
|
+
|
|
26877
|
+
/**
|
|
26878
|
+
* Constructs a new Expression.
|
|
26879
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter
|
|
26880
|
+
* @classdesc Represents an Expression.
|
|
26881
|
+
* @implements IExpression
|
|
26882
|
+
* @constructor
|
|
26883
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression=} [properties] Properties to set
|
|
26884
|
+
*/
|
|
26885
|
+
function Expression(properties) {
|
|
26886
|
+
if (properties)
|
|
26887
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
26888
|
+
if (properties[keys[i]] != null)
|
|
26889
|
+
this[keys[i]] = properties[keys[i]];
|
|
26890
|
+
}
|
|
26891
|
+
|
|
26892
|
+
/**
|
|
26893
|
+
* Expression stringConstraint.
|
|
26894
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IStringConstraint|null|undefined} stringConstraint
|
|
26895
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26896
|
+
* @instance
|
|
26897
|
+
*/
|
|
26898
|
+
Expression.prototype.stringConstraint = null;
|
|
26899
|
+
|
|
26900
|
+
/**
|
|
26901
|
+
* Expression numberConstraint.
|
|
26902
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.INumberConstraint|null|undefined} numberConstraint
|
|
26903
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26904
|
+
* @instance
|
|
26905
|
+
*/
|
|
26906
|
+
Expression.prototype.numberConstraint = null;
|
|
26907
|
+
|
|
26908
|
+
/**
|
|
26909
|
+
* Expression geolocationConstraint.
|
|
26910
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IGeolocationConstraint|null|undefined} geolocationConstraint
|
|
26911
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26912
|
+
* @instance
|
|
26913
|
+
*/
|
|
26914
|
+
Expression.prototype.geolocationConstraint = null;
|
|
26915
|
+
|
|
26916
|
+
/**
|
|
26917
|
+
* Expression andExpr.
|
|
26918
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IAndExpression|null|undefined} andExpr
|
|
26919
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26920
|
+
* @instance
|
|
26921
|
+
*/
|
|
26922
|
+
Expression.prototype.andExpr = null;
|
|
26923
|
+
|
|
26924
|
+
/**
|
|
26925
|
+
* Expression orExpr.
|
|
26926
|
+
* @member {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IOrExpression|null|undefined} orExpr
|
|
26927
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26928
|
+
* @instance
|
|
26929
|
+
*/
|
|
26930
|
+
Expression.prototype.orExpr = null;
|
|
26931
|
+
|
|
26932
|
+
// OneOf field names bound to virtual getters and setters
|
|
26933
|
+
var $oneOfFields;
|
|
26934
|
+
|
|
26935
|
+
/**
|
|
26936
|
+
* Expression expr.
|
|
26937
|
+
* @member {"stringConstraint"|"numberConstraint"|"geolocationConstraint"|"andExpr"|"orExpr"|undefined} expr
|
|
26938
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26939
|
+
* @instance
|
|
26940
|
+
*/
|
|
26941
|
+
Object.defineProperty(Expression.prototype, "expr", {
|
|
26942
|
+
get: $util.oneOfGetter($oneOfFields = ["stringConstraint", "numberConstraint", "geolocationConstraint", "andExpr", "orExpr"]),
|
|
26943
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
26944
|
+
});
|
|
26945
|
+
|
|
26946
|
+
/**
|
|
26947
|
+
* Creates a new Expression instance using the specified properties.
|
|
26948
|
+
* @function create
|
|
26949
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26950
|
+
* @static
|
|
26951
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression=} [properties] Properties to set
|
|
26952
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression} Expression instance
|
|
26953
|
+
*/
|
|
26954
|
+
Expression.create = function create(properties) {
|
|
26955
|
+
return new Expression(properties);
|
|
26956
|
+
};
|
|
26957
|
+
|
|
26958
|
+
/**
|
|
26959
|
+
* Encodes the specified Expression message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.verify|verify} messages.
|
|
26960
|
+
* @function encode
|
|
26961
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26962
|
+
* @static
|
|
26963
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression} message Expression message or plain object to encode
|
|
26964
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26965
|
+
* @returns {$protobuf.Writer} Writer
|
|
26966
|
+
*/
|
|
26967
|
+
Expression.encode = function encode(message, writer) {
|
|
26968
|
+
if (!writer)
|
|
26969
|
+
writer = $Writer.create();
|
|
26970
|
+
if (message.stringConstraint != null && Object.hasOwnProperty.call(message, "stringConstraint"))
|
|
26971
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.encode(message.stringConstraint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
26972
|
+
if (message.numberConstraint != null && Object.hasOwnProperty.call(message, "numberConstraint"))
|
|
26973
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.encode(message.numberConstraint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
26974
|
+
if (message.geolocationConstraint != null && Object.hasOwnProperty.call(message, "geolocationConstraint"))
|
|
26975
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.encode(message.geolocationConstraint, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
26976
|
+
if (message.andExpr != null && Object.hasOwnProperty.call(message, "andExpr"))
|
|
26977
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.encode(message.andExpr, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
26978
|
+
if (message.orExpr != null && Object.hasOwnProperty.call(message, "orExpr"))
|
|
26979
|
+
$root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.encode(message.orExpr, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
26980
|
+
return writer;
|
|
26981
|
+
};
|
|
26982
|
+
|
|
26983
|
+
/**
|
|
26984
|
+
* Encodes the specified Expression message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.verify|verify} messages.
|
|
26985
|
+
* @function encodeDelimited
|
|
26986
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
26987
|
+
* @static
|
|
26988
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.IExpression} message Expression message or plain object to encode
|
|
26989
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
26990
|
+
* @returns {$protobuf.Writer} Writer
|
|
26991
|
+
*/
|
|
26992
|
+
Expression.encodeDelimited = function encodeDelimited(message, writer) {
|
|
26993
|
+
return this.encode(message, writer).ldelim();
|
|
26994
|
+
};
|
|
26995
|
+
|
|
26996
|
+
/**
|
|
26997
|
+
* Decodes an Expression message from the specified reader or buffer.
|
|
26998
|
+
* @function decode
|
|
26999
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27000
|
+
* @static
|
|
27001
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
27002
|
+
* @param {number} [length] Message length if known beforehand
|
|
27003
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression} Expression
|
|
27004
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
27005
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
27006
|
+
*/
|
|
27007
|
+
Expression.decode = function decode(reader, length, error) {
|
|
27008
|
+
if (!(reader instanceof $Reader))
|
|
27009
|
+
reader = $Reader.create(reader);
|
|
27010
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression();
|
|
27011
|
+
while (reader.pos < end) {
|
|
27012
|
+
var tag = reader.uint32();
|
|
27013
|
+
if (tag === error)
|
|
27014
|
+
break;
|
|
27015
|
+
switch (tag >>> 3) {
|
|
27016
|
+
case 1: {
|
|
27017
|
+
message.stringConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.decode(reader, reader.uint32());
|
|
27018
|
+
break;
|
|
27019
|
+
}
|
|
27020
|
+
case 2: {
|
|
27021
|
+
message.numberConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.decode(reader, reader.uint32());
|
|
27022
|
+
break;
|
|
27023
|
+
}
|
|
27024
|
+
case 3: {
|
|
27025
|
+
message.geolocationConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.decode(reader, reader.uint32());
|
|
27026
|
+
break;
|
|
27027
|
+
}
|
|
27028
|
+
case 4: {
|
|
27029
|
+
message.andExpr = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.decode(reader, reader.uint32());
|
|
27030
|
+
break;
|
|
27031
|
+
}
|
|
27032
|
+
case 5: {
|
|
27033
|
+
message.orExpr = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.decode(reader, reader.uint32());
|
|
27034
|
+
break;
|
|
27035
|
+
}
|
|
27036
|
+
default:
|
|
27037
|
+
reader.skipType(tag & 7);
|
|
27038
|
+
break;
|
|
27039
|
+
}
|
|
27040
|
+
}
|
|
27041
|
+
return message;
|
|
27042
|
+
};
|
|
27043
|
+
|
|
27044
|
+
/**
|
|
27045
|
+
* Decodes an Expression message from the specified reader or buffer, length delimited.
|
|
27046
|
+
* @function decodeDelimited
|
|
27047
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27048
|
+
* @static
|
|
27049
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
27050
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression} Expression
|
|
27051
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
27052
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
27053
|
+
*/
|
|
27054
|
+
Expression.decodeDelimited = function decodeDelimited(reader) {
|
|
27055
|
+
if (!(reader instanceof $Reader))
|
|
27056
|
+
reader = new $Reader(reader);
|
|
27057
|
+
return this.decode(reader, reader.uint32());
|
|
27058
|
+
};
|
|
27059
|
+
|
|
27060
|
+
/**
|
|
27061
|
+
* Verifies an Expression message.
|
|
27062
|
+
* @function verify
|
|
27063
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27064
|
+
* @static
|
|
27065
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
27066
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
27067
|
+
*/
|
|
27068
|
+
Expression.verify = function verify(message) {
|
|
27069
|
+
if (typeof message !== "object" || message === null)
|
|
27070
|
+
return "object expected";
|
|
27071
|
+
var properties = {};
|
|
27072
|
+
if (message.stringConstraint != null && message.hasOwnProperty("stringConstraint")) {
|
|
27073
|
+
properties.expr = 1;
|
|
27074
|
+
{
|
|
27075
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.verify(message.stringConstraint);
|
|
27076
|
+
if (error)
|
|
27077
|
+
return "stringConstraint." + error;
|
|
27078
|
+
}
|
|
27079
|
+
}
|
|
27080
|
+
if (message.numberConstraint != null && message.hasOwnProperty("numberConstraint")) {
|
|
27081
|
+
if (properties.expr === 1)
|
|
27082
|
+
return "expr: multiple values";
|
|
27083
|
+
properties.expr = 1;
|
|
27084
|
+
{
|
|
27085
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.verify(message.numberConstraint);
|
|
27086
|
+
if (error)
|
|
27087
|
+
return "numberConstraint." + error;
|
|
27088
|
+
}
|
|
23996
27089
|
}
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
24003
|
-
|
|
27090
|
+
if (message.geolocationConstraint != null && message.hasOwnProperty("geolocationConstraint")) {
|
|
27091
|
+
if (properties.expr === 1)
|
|
27092
|
+
return "expr: multiple values";
|
|
27093
|
+
properties.expr = 1;
|
|
27094
|
+
{
|
|
27095
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.verify(message.geolocationConstraint);
|
|
27096
|
+
if (error)
|
|
27097
|
+
return "geolocationConstraint." + error;
|
|
27098
|
+
}
|
|
27099
|
+
}
|
|
27100
|
+
if (message.andExpr != null && message.hasOwnProperty("andExpr")) {
|
|
27101
|
+
if (properties.expr === 1)
|
|
27102
|
+
return "expr: multiple values";
|
|
27103
|
+
properties.expr = 1;
|
|
27104
|
+
{
|
|
27105
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.verify(message.andExpr);
|
|
27106
|
+
if (error)
|
|
27107
|
+
return "andExpr." + error;
|
|
27108
|
+
}
|
|
27109
|
+
}
|
|
27110
|
+
if (message.orExpr != null && message.hasOwnProperty("orExpr")) {
|
|
27111
|
+
if (properties.expr === 1)
|
|
27112
|
+
return "expr: multiple values";
|
|
27113
|
+
properties.expr = 1;
|
|
27114
|
+
{
|
|
27115
|
+
var error = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.verify(message.orExpr);
|
|
27116
|
+
if (error)
|
|
27117
|
+
return "orExpr." + error;
|
|
27118
|
+
}
|
|
27119
|
+
}
|
|
27120
|
+
return null;
|
|
27121
|
+
};
|
|
24004
27122
|
|
|
24005
|
-
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
|
|
27123
|
+
/**
|
|
27124
|
+
* Creates an Expression message from a plain object. Also converts values to their respective internal types.
|
|
27125
|
+
* @function fromObject
|
|
27126
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27127
|
+
* @static
|
|
27128
|
+
* @param {Object.<string,*>} object Plain object
|
|
27129
|
+
* @returns {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression} Expression
|
|
27130
|
+
*/
|
|
27131
|
+
Expression.fromObject = function fromObject(object) {
|
|
27132
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression)
|
|
27133
|
+
return object;
|
|
27134
|
+
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression();
|
|
27135
|
+
if (object.stringConstraint != null) {
|
|
27136
|
+
if (typeof object.stringConstraint !== "object")
|
|
27137
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.stringConstraint: object expected");
|
|
27138
|
+
message.stringConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.fromObject(object.stringConstraint);
|
|
27139
|
+
}
|
|
27140
|
+
if (object.numberConstraint != null) {
|
|
27141
|
+
if (typeof object.numberConstraint !== "object")
|
|
27142
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.numberConstraint: object expected");
|
|
27143
|
+
message.numberConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.fromObject(object.numberConstraint);
|
|
27144
|
+
}
|
|
27145
|
+
if (object.geolocationConstraint != null) {
|
|
27146
|
+
if (typeof object.geolocationConstraint !== "object")
|
|
27147
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.geolocationConstraint: object expected");
|
|
27148
|
+
message.geolocationConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.fromObject(object.geolocationConstraint);
|
|
27149
|
+
}
|
|
27150
|
+
if (object.andExpr != null) {
|
|
27151
|
+
if (typeof object.andExpr !== "object")
|
|
27152
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.andExpr: object expected");
|
|
27153
|
+
message.andExpr = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.fromObject(object.andExpr);
|
|
27154
|
+
}
|
|
27155
|
+
if (object.orExpr != null) {
|
|
27156
|
+
if (typeof object.orExpr !== "object")
|
|
27157
|
+
throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression.orExpr: object expected");
|
|
27158
|
+
message.orExpr = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.fromObject(object.orExpr);
|
|
27159
|
+
}
|
|
27160
|
+
return message;
|
|
27161
|
+
};
|
|
24020
27162
|
|
|
24021
|
-
|
|
24022
|
-
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
27163
|
+
/**
|
|
27164
|
+
* Creates a plain object from an Expression message. Also converts values to other types if specified.
|
|
27165
|
+
* @function toObject
|
|
27166
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27167
|
+
* @static
|
|
27168
|
+
* @param {google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression} message Expression
|
|
27169
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
27170
|
+
* @returns {Object.<string,*>} Plain object
|
|
27171
|
+
*/
|
|
27172
|
+
Expression.toObject = function toObject(message, options) {
|
|
27173
|
+
if (!options)
|
|
27174
|
+
options = {};
|
|
27175
|
+
var object = {};
|
|
27176
|
+
if (message.stringConstraint != null && message.hasOwnProperty("stringConstraint")) {
|
|
27177
|
+
object.stringConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraint.toObject(message.stringConstraint, options);
|
|
27178
|
+
if (options.oneofs)
|
|
27179
|
+
object.expr = "stringConstraint";
|
|
27180
|
+
}
|
|
27181
|
+
if (message.numberConstraint != null && message.hasOwnProperty("numberConstraint")) {
|
|
27182
|
+
object.numberConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint.toObject(message.numberConstraint, options);
|
|
27183
|
+
if (options.oneofs)
|
|
27184
|
+
object.expr = "numberConstraint";
|
|
27185
|
+
}
|
|
27186
|
+
if (message.geolocationConstraint != null && message.hasOwnProperty("geolocationConstraint")) {
|
|
27187
|
+
object.geolocationConstraint = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.GeolocationConstraint.toObject(message.geolocationConstraint, options);
|
|
27188
|
+
if (options.oneofs)
|
|
27189
|
+
object.expr = "geolocationConstraint";
|
|
27190
|
+
}
|
|
27191
|
+
if (message.andExpr != null && message.hasOwnProperty("andExpr")) {
|
|
27192
|
+
object.andExpr = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.AndExpression.toObject(message.andExpr, options);
|
|
27193
|
+
if (options.oneofs)
|
|
27194
|
+
object.expr = "andExpr";
|
|
27195
|
+
}
|
|
27196
|
+
if (message.orExpr != null && message.hasOwnProperty("orExpr")) {
|
|
27197
|
+
object.orExpr = $root.google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.OrExpression.toObject(message.orExpr, options);
|
|
27198
|
+
if (options.oneofs)
|
|
27199
|
+
object.expr = "orExpr";
|
|
27200
|
+
}
|
|
27201
|
+
return object;
|
|
27202
|
+
};
|
|
24040
27203
|
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
|
|
24044
|
-
|
|
24045
|
-
|
|
24046
|
-
|
|
24047
|
-
|
|
24048
|
-
|
|
24049
|
-
|
|
24050
|
-
|
|
24051
|
-
return object;
|
|
24052
|
-
var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo();
|
|
24053
|
-
if (object.expandedQuery != null)
|
|
24054
|
-
message.expandedQuery = Boolean(object.expandedQuery);
|
|
24055
|
-
if (object.pinnedResultCount != null)
|
|
24056
|
-
if ($util.Long)
|
|
24057
|
-
(message.pinnedResultCount = $util.Long.fromValue(object.pinnedResultCount)).unsigned = false;
|
|
24058
|
-
else if (typeof object.pinnedResultCount === "string")
|
|
24059
|
-
message.pinnedResultCount = parseInt(object.pinnedResultCount, 10);
|
|
24060
|
-
else if (typeof object.pinnedResultCount === "number")
|
|
24061
|
-
message.pinnedResultCount = object.pinnedResultCount;
|
|
24062
|
-
else if (typeof object.pinnedResultCount === "object")
|
|
24063
|
-
message.pinnedResultCount = new $util.LongBits(object.pinnedResultCount.low >>> 0, object.pinnedResultCount.high >>> 0).toNumber();
|
|
24064
|
-
return message;
|
|
24065
|
-
};
|
|
27204
|
+
/**
|
|
27205
|
+
* Converts this Expression to JSON.
|
|
27206
|
+
* @function toJSON
|
|
27207
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27208
|
+
* @instance
|
|
27209
|
+
* @returns {Object.<string,*>} JSON object
|
|
27210
|
+
*/
|
|
27211
|
+
Expression.prototype.toJSON = function toJSON() {
|
|
27212
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
27213
|
+
};
|
|
24066
27214
|
|
|
24067
|
-
|
|
24068
|
-
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
object.expandedQuery = false;
|
|
24082
|
-
if ($util.Long) {
|
|
24083
|
-
var long = new $util.Long(0, 0, false);
|
|
24084
|
-
object.pinnedResultCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
24085
|
-
} else
|
|
24086
|
-
object.pinnedResultCount = options.longs === String ? "0" : 0;
|
|
24087
|
-
}
|
|
24088
|
-
if (message.expandedQuery != null && message.hasOwnProperty("expandedQuery"))
|
|
24089
|
-
object.expandedQuery = message.expandedQuery;
|
|
24090
|
-
if (message.pinnedResultCount != null && message.hasOwnProperty("pinnedResultCount"))
|
|
24091
|
-
if (typeof message.pinnedResultCount === "number")
|
|
24092
|
-
object.pinnedResultCount = options.longs === String ? String(message.pinnedResultCount) : message.pinnedResultCount;
|
|
24093
|
-
else
|
|
24094
|
-
object.pinnedResultCount = options.longs === String ? $util.Long.prototype.toString.call(message.pinnedResultCount) : options.longs === Number ? new $util.LongBits(message.pinnedResultCount.low >>> 0, message.pinnedResultCount.high >>> 0).toNumber() : message.pinnedResultCount;
|
|
24095
|
-
return object;
|
|
24096
|
-
};
|
|
27215
|
+
/**
|
|
27216
|
+
* Gets the default type url for Expression
|
|
27217
|
+
* @function getTypeUrl
|
|
27218
|
+
* @memberof google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression
|
|
27219
|
+
* @static
|
|
27220
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
27221
|
+
* @returns {string} The default type url
|
|
27222
|
+
*/
|
|
27223
|
+
Expression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
27224
|
+
if (typeUrlPrefix === undefined) {
|
|
27225
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
27226
|
+
}
|
|
27227
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Expression";
|
|
27228
|
+
};
|
|
24097
27229
|
|
|
24098
|
-
|
|
24099
|
-
|
|
24100
|
-
* @function toJSON
|
|
24101
|
-
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24102
|
-
* @instance
|
|
24103
|
-
* @returns {Object.<string,*>} JSON object
|
|
24104
|
-
*/
|
|
24105
|
-
QueryExpansionInfo.prototype.toJSON = function toJSON() {
|
|
24106
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24107
|
-
};
|
|
27230
|
+
return Expression;
|
|
27231
|
+
})();
|
|
24108
27232
|
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
* @function getTypeUrl
|
|
24112
|
-
* @memberof google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo
|
|
24113
|
-
* @static
|
|
24114
|
-
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24115
|
-
* @returns {string} The default type url
|
|
24116
|
-
*/
|
|
24117
|
-
QueryExpansionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24118
|
-
if (typeUrlPrefix === undefined) {
|
|
24119
|
-
typeUrlPrefix = "type.googleapis.com";
|
|
24120
|
-
}
|
|
24121
|
-
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo";
|
|
24122
|
-
};
|
|
27233
|
+
return StructuredExtractedFilter;
|
|
27234
|
+
})();
|
|
24123
27235
|
|
|
24124
|
-
return
|
|
27236
|
+
return NaturalLanguageQueryUnderstandingInfo;
|
|
24125
27237
|
})();
|
|
24126
27238
|
|
|
24127
27239
|
SearchResponse.SessionInfo = (function() {
|
|
@@ -24353,6 +27465,22 @@
|
|
|
24353
27465
|
return SessionInfo;
|
|
24354
27466
|
})();
|
|
24355
27467
|
|
|
27468
|
+
/**
|
|
27469
|
+
* SemanticState enum.
|
|
27470
|
+
* @name google.cloud.discoveryengine.v1.SearchResponse.SemanticState
|
|
27471
|
+
* @enum {number}
|
|
27472
|
+
* @property {number} SEMANTIC_STATE_UNSPECIFIED=0 SEMANTIC_STATE_UNSPECIFIED value
|
|
27473
|
+
* @property {number} DISABLED=1 DISABLED value
|
|
27474
|
+
* @property {number} ENABLED=2 ENABLED value
|
|
27475
|
+
*/
|
|
27476
|
+
SearchResponse.SemanticState = (function() {
|
|
27477
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
27478
|
+
values[valuesById[0] = "SEMANTIC_STATE_UNSPECIFIED"] = 0;
|
|
27479
|
+
values[valuesById[1] = "DISABLED"] = 1;
|
|
27480
|
+
values[valuesById[2] = "ENABLED"] = 2;
|
|
27481
|
+
return values;
|
|
27482
|
+
})();
|
|
27483
|
+
|
|
24356
27484
|
return SearchResponse;
|
|
24357
27485
|
})();
|
|
24358
27486
|
|
|
@@ -68401,6 +71529,7 @@
|
|
|
68401
71529
|
* @property {google.cloud.discoveryengine.v1.DataStore.ContentConfig|null} [contentConfig] DataStore contentConfig
|
|
68402
71530
|
* @property {google.protobuf.ITimestamp|null} [createTime] DataStore createTime
|
|
68403
71531
|
* @property {google.cloud.discoveryengine.v1.IAdvancedSiteSearchConfig|null} [advancedSiteSearchConfig] DataStore advancedSiteSearchConfig
|
|
71532
|
+
* @property {google.cloud.discoveryengine.v1.INaturalLanguageQueryUnderstandingConfig|null} [naturalLanguageQueryUnderstandingConfig] DataStore naturalLanguageQueryUnderstandingConfig
|
|
68404
71533
|
* @property {string|null} [kmsKeyName] DataStore kmsKeyName
|
|
68405
71534
|
* @property {google.cloud.discoveryengine.v1.ICmekConfig|null} [cmekConfig] DataStore cmekConfig
|
|
68406
71535
|
* @property {google.cloud.discoveryengine.v1.DataStore.IBillingEstimation|null} [billingEstimation] DataStore billingEstimation
|
|
@@ -68492,6 +71621,14 @@
|
|
|
68492
71621
|
*/
|
|
68493
71622
|
DataStore.prototype.advancedSiteSearchConfig = null;
|
|
68494
71623
|
|
|
71624
|
+
/**
|
|
71625
|
+
* DataStore naturalLanguageQueryUnderstandingConfig.
|
|
71626
|
+
* @member {google.cloud.discoveryengine.v1.INaturalLanguageQueryUnderstandingConfig|null|undefined} naturalLanguageQueryUnderstandingConfig
|
|
71627
|
+
* @memberof google.cloud.discoveryengine.v1.DataStore
|
|
71628
|
+
* @instance
|
|
71629
|
+
*/
|
|
71630
|
+
DataStore.prototype.naturalLanguageQueryUnderstandingConfig = null;
|
|
71631
|
+
|
|
68495
71632
|
/**
|
|
68496
71633
|
* DataStore kmsKeyName.
|
|
68497
71634
|
* @member {string} kmsKeyName
|
|
@@ -68626,6 +71763,8 @@
|
|
|
68626
71763
|
writer.uint32(/* id 31, wireType 2 =*/250).string(message.identityMappingStore);
|
|
68627
71764
|
if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName"))
|
|
68628
71765
|
writer.uint32(/* id 32, wireType 2 =*/258).string(message.kmsKeyName);
|
|
71766
|
+
if (message.naturalLanguageQueryUnderstandingConfig != null && Object.hasOwnProperty.call(message, "naturalLanguageQueryUnderstandingConfig"))
|
|
71767
|
+
$root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.encode(message.naturalLanguageQueryUnderstandingConfig, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim();
|
|
68629
71768
|
return writer;
|
|
68630
71769
|
};
|
|
68631
71770
|
|
|
@@ -68701,6 +71840,10 @@
|
|
|
68701
71840
|
message.advancedSiteSearchConfig = $root.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfig.decode(reader, reader.uint32());
|
|
68702
71841
|
break;
|
|
68703
71842
|
}
|
|
71843
|
+
case 34: {
|
|
71844
|
+
message.naturalLanguageQueryUnderstandingConfig = $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.decode(reader, reader.uint32());
|
|
71845
|
+
break;
|
|
71846
|
+
}
|
|
68704
71847
|
case 32: {
|
|
68705
71848
|
message.kmsKeyName = reader.string();
|
|
68706
71849
|
break;
|
|
@@ -68827,6 +71970,11 @@
|
|
|
68827
71970
|
if (error)
|
|
68828
71971
|
return "advancedSiteSearchConfig." + error;
|
|
68829
71972
|
}
|
|
71973
|
+
if (message.naturalLanguageQueryUnderstandingConfig != null && message.hasOwnProperty("naturalLanguageQueryUnderstandingConfig")) {
|
|
71974
|
+
var error = $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.verify(message.naturalLanguageQueryUnderstandingConfig);
|
|
71975
|
+
if (error)
|
|
71976
|
+
return "naturalLanguageQueryUnderstandingConfig." + error;
|
|
71977
|
+
}
|
|
68830
71978
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
68831
71979
|
if (!$util.isString(message.kmsKeyName))
|
|
68832
71980
|
return "kmsKeyName: string expected";
|
|
@@ -68982,6 +72130,11 @@
|
|
|
68982
72130
|
throw TypeError(".google.cloud.discoveryengine.v1.DataStore.advancedSiteSearchConfig: object expected");
|
|
68983
72131
|
message.advancedSiteSearchConfig = $root.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfig.fromObject(object.advancedSiteSearchConfig);
|
|
68984
72132
|
}
|
|
72133
|
+
if (object.naturalLanguageQueryUnderstandingConfig != null) {
|
|
72134
|
+
if (typeof object.naturalLanguageQueryUnderstandingConfig !== "object")
|
|
72135
|
+
throw TypeError(".google.cloud.discoveryengine.v1.DataStore.naturalLanguageQueryUnderstandingConfig: object expected");
|
|
72136
|
+
message.naturalLanguageQueryUnderstandingConfig = $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.fromObject(object.naturalLanguageQueryUnderstandingConfig);
|
|
72137
|
+
}
|
|
68985
72138
|
if (object.kmsKeyName != null)
|
|
68986
72139
|
message.kmsKeyName = String(object.kmsKeyName);
|
|
68987
72140
|
if (object.cmekConfig != null) {
|
|
@@ -69053,6 +72206,7 @@
|
|
|
69053
72206
|
object.healthcareFhirConfig = null;
|
|
69054
72207
|
object.identityMappingStore = "";
|
|
69055
72208
|
object.kmsKeyName = "";
|
|
72209
|
+
object.naturalLanguageQueryUnderstandingConfig = null;
|
|
69056
72210
|
}
|
|
69057
72211
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
69058
72212
|
object.name = message.name;
|
|
@@ -69091,6 +72245,8 @@
|
|
|
69091
72245
|
object.identityMappingStore = message.identityMappingStore;
|
|
69092
72246
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
69093
72247
|
object.kmsKeyName = message.kmsKeyName;
|
|
72248
|
+
if (message.naturalLanguageQueryUnderstandingConfig != null && message.hasOwnProperty("naturalLanguageQueryUnderstandingConfig"))
|
|
72249
|
+
object.naturalLanguageQueryUnderstandingConfig = $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.toObject(message.naturalLanguageQueryUnderstandingConfig, options);
|
|
69094
72250
|
return object;
|
|
69095
72251
|
};
|
|
69096
72252
|
|
|
@@ -69772,6 +72928,251 @@
|
|
|
69772
72928
|
return AdvancedSiteSearchConfig;
|
|
69773
72929
|
})();
|
|
69774
72930
|
|
|
72931
|
+
v1.NaturalLanguageQueryUnderstandingConfig = (function() {
|
|
72932
|
+
|
|
72933
|
+
/**
|
|
72934
|
+
* Properties of a NaturalLanguageQueryUnderstandingConfig.
|
|
72935
|
+
* @memberof google.cloud.discoveryengine.v1
|
|
72936
|
+
* @interface INaturalLanguageQueryUnderstandingConfig
|
|
72937
|
+
* @property {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode|null} [mode] NaturalLanguageQueryUnderstandingConfig mode
|
|
72938
|
+
*/
|
|
72939
|
+
|
|
72940
|
+
/**
|
|
72941
|
+
* Constructs a new NaturalLanguageQueryUnderstandingConfig.
|
|
72942
|
+
* @memberof google.cloud.discoveryengine.v1
|
|
72943
|
+
* @classdesc Represents a NaturalLanguageQueryUnderstandingConfig.
|
|
72944
|
+
* @implements INaturalLanguageQueryUnderstandingConfig
|
|
72945
|
+
* @constructor
|
|
72946
|
+
* @param {google.cloud.discoveryengine.v1.INaturalLanguageQueryUnderstandingConfig=} [properties] Properties to set
|
|
72947
|
+
*/
|
|
72948
|
+
function NaturalLanguageQueryUnderstandingConfig(properties) {
|
|
72949
|
+
if (properties)
|
|
72950
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
72951
|
+
if (properties[keys[i]] != null)
|
|
72952
|
+
this[keys[i]] = properties[keys[i]];
|
|
72953
|
+
}
|
|
72954
|
+
|
|
72955
|
+
/**
|
|
72956
|
+
* NaturalLanguageQueryUnderstandingConfig mode.
|
|
72957
|
+
* @member {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode} mode
|
|
72958
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
72959
|
+
* @instance
|
|
72960
|
+
*/
|
|
72961
|
+
NaturalLanguageQueryUnderstandingConfig.prototype.mode = 0;
|
|
72962
|
+
|
|
72963
|
+
/**
|
|
72964
|
+
* Creates a new NaturalLanguageQueryUnderstandingConfig instance using the specified properties.
|
|
72965
|
+
* @function create
|
|
72966
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
72967
|
+
* @static
|
|
72968
|
+
* @param {google.cloud.discoveryengine.v1.INaturalLanguageQueryUnderstandingConfig=} [properties] Properties to set
|
|
72969
|
+
* @returns {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig} NaturalLanguageQueryUnderstandingConfig instance
|
|
72970
|
+
*/
|
|
72971
|
+
NaturalLanguageQueryUnderstandingConfig.create = function create(properties) {
|
|
72972
|
+
return new NaturalLanguageQueryUnderstandingConfig(properties);
|
|
72973
|
+
};
|
|
72974
|
+
|
|
72975
|
+
/**
|
|
72976
|
+
* Encodes the specified NaturalLanguageQueryUnderstandingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.verify|verify} messages.
|
|
72977
|
+
* @function encode
|
|
72978
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
72979
|
+
* @static
|
|
72980
|
+
* @param {google.cloud.discoveryengine.v1.INaturalLanguageQueryUnderstandingConfig} message NaturalLanguageQueryUnderstandingConfig message or plain object to encode
|
|
72981
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
72982
|
+
* @returns {$protobuf.Writer} Writer
|
|
72983
|
+
*/
|
|
72984
|
+
NaturalLanguageQueryUnderstandingConfig.encode = function encode(message, writer) {
|
|
72985
|
+
if (!writer)
|
|
72986
|
+
writer = $Writer.create();
|
|
72987
|
+
if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
|
|
72988
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode);
|
|
72989
|
+
return writer;
|
|
72990
|
+
};
|
|
72991
|
+
|
|
72992
|
+
/**
|
|
72993
|
+
* Encodes the specified NaturalLanguageQueryUnderstandingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.verify|verify} messages.
|
|
72994
|
+
* @function encodeDelimited
|
|
72995
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
72996
|
+
* @static
|
|
72997
|
+
* @param {google.cloud.discoveryengine.v1.INaturalLanguageQueryUnderstandingConfig} message NaturalLanguageQueryUnderstandingConfig message or plain object to encode
|
|
72998
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
72999
|
+
* @returns {$protobuf.Writer} Writer
|
|
73000
|
+
*/
|
|
73001
|
+
NaturalLanguageQueryUnderstandingConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
73002
|
+
return this.encode(message, writer).ldelim();
|
|
73003
|
+
};
|
|
73004
|
+
|
|
73005
|
+
/**
|
|
73006
|
+
* Decodes a NaturalLanguageQueryUnderstandingConfig message from the specified reader or buffer.
|
|
73007
|
+
* @function decode
|
|
73008
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73009
|
+
* @static
|
|
73010
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
73011
|
+
* @param {number} [length] Message length if known beforehand
|
|
73012
|
+
* @returns {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig} NaturalLanguageQueryUnderstandingConfig
|
|
73013
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
73014
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
73015
|
+
*/
|
|
73016
|
+
NaturalLanguageQueryUnderstandingConfig.decode = function decode(reader, length, error) {
|
|
73017
|
+
if (!(reader instanceof $Reader))
|
|
73018
|
+
reader = $Reader.create(reader);
|
|
73019
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig();
|
|
73020
|
+
while (reader.pos < end) {
|
|
73021
|
+
var tag = reader.uint32();
|
|
73022
|
+
if (tag === error)
|
|
73023
|
+
break;
|
|
73024
|
+
switch (tag >>> 3) {
|
|
73025
|
+
case 1: {
|
|
73026
|
+
message.mode = reader.int32();
|
|
73027
|
+
break;
|
|
73028
|
+
}
|
|
73029
|
+
default:
|
|
73030
|
+
reader.skipType(tag & 7);
|
|
73031
|
+
break;
|
|
73032
|
+
}
|
|
73033
|
+
}
|
|
73034
|
+
return message;
|
|
73035
|
+
};
|
|
73036
|
+
|
|
73037
|
+
/**
|
|
73038
|
+
* Decodes a NaturalLanguageQueryUnderstandingConfig message from the specified reader or buffer, length delimited.
|
|
73039
|
+
* @function decodeDelimited
|
|
73040
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73041
|
+
* @static
|
|
73042
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
73043
|
+
* @returns {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig} NaturalLanguageQueryUnderstandingConfig
|
|
73044
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
73045
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
73046
|
+
*/
|
|
73047
|
+
NaturalLanguageQueryUnderstandingConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
73048
|
+
if (!(reader instanceof $Reader))
|
|
73049
|
+
reader = new $Reader(reader);
|
|
73050
|
+
return this.decode(reader, reader.uint32());
|
|
73051
|
+
};
|
|
73052
|
+
|
|
73053
|
+
/**
|
|
73054
|
+
* Verifies a NaturalLanguageQueryUnderstandingConfig message.
|
|
73055
|
+
* @function verify
|
|
73056
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73057
|
+
* @static
|
|
73058
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
73059
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
73060
|
+
*/
|
|
73061
|
+
NaturalLanguageQueryUnderstandingConfig.verify = function verify(message) {
|
|
73062
|
+
if (typeof message !== "object" || message === null)
|
|
73063
|
+
return "object expected";
|
|
73064
|
+
if (message.mode != null && message.hasOwnProperty("mode"))
|
|
73065
|
+
switch (message.mode) {
|
|
73066
|
+
default:
|
|
73067
|
+
return "mode: enum value expected";
|
|
73068
|
+
case 0:
|
|
73069
|
+
case 1:
|
|
73070
|
+
case 2:
|
|
73071
|
+
break;
|
|
73072
|
+
}
|
|
73073
|
+
return null;
|
|
73074
|
+
};
|
|
73075
|
+
|
|
73076
|
+
/**
|
|
73077
|
+
* Creates a NaturalLanguageQueryUnderstandingConfig message from a plain object. Also converts values to their respective internal types.
|
|
73078
|
+
* @function fromObject
|
|
73079
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73080
|
+
* @static
|
|
73081
|
+
* @param {Object.<string,*>} object Plain object
|
|
73082
|
+
* @returns {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig} NaturalLanguageQueryUnderstandingConfig
|
|
73083
|
+
*/
|
|
73084
|
+
NaturalLanguageQueryUnderstandingConfig.fromObject = function fromObject(object) {
|
|
73085
|
+
if (object instanceof $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig)
|
|
73086
|
+
return object;
|
|
73087
|
+
var message = new $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig();
|
|
73088
|
+
switch (object.mode) {
|
|
73089
|
+
default:
|
|
73090
|
+
if (typeof object.mode === "number") {
|
|
73091
|
+
message.mode = object.mode;
|
|
73092
|
+
break;
|
|
73093
|
+
}
|
|
73094
|
+
break;
|
|
73095
|
+
case "MODE_UNSPECIFIED":
|
|
73096
|
+
case 0:
|
|
73097
|
+
message.mode = 0;
|
|
73098
|
+
break;
|
|
73099
|
+
case "DISABLED":
|
|
73100
|
+
case 1:
|
|
73101
|
+
message.mode = 1;
|
|
73102
|
+
break;
|
|
73103
|
+
case "ENABLED":
|
|
73104
|
+
case 2:
|
|
73105
|
+
message.mode = 2;
|
|
73106
|
+
break;
|
|
73107
|
+
}
|
|
73108
|
+
return message;
|
|
73109
|
+
};
|
|
73110
|
+
|
|
73111
|
+
/**
|
|
73112
|
+
* Creates a plain object from a NaturalLanguageQueryUnderstandingConfig message. Also converts values to other types if specified.
|
|
73113
|
+
* @function toObject
|
|
73114
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73115
|
+
* @static
|
|
73116
|
+
* @param {google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig} message NaturalLanguageQueryUnderstandingConfig
|
|
73117
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
73118
|
+
* @returns {Object.<string,*>} Plain object
|
|
73119
|
+
*/
|
|
73120
|
+
NaturalLanguageQueryUnderstandingConfig.toObject = function toObject(message, options) {
|
|
73121
|
+
if (!options)
|
|
73122
|
+
options = {};
|
|
73123
|
+
var object = {};
|
|
73124
|
+
if (options.defaults)
|
|
73125
|
+
object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0;
|
|
73126
|
+
if (message.mode != null && message.hasOwnProperty("mode"))
|
|
73127
|
+
object.mode = options.enums === String ? $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode[message.mode] : message.mode;
|
|
73128
|
+
return object;
|
|
73129
|
+
};
|
|
73130
|
+
|
|
73131
|
+
/**
|
|
73132
|
+
* Converts this NaturalLanguageQueryUnderstandingConfig to JSON.
|
|
73133
|
+
* @function toJSON
|
|
73134
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73135
|
+
* @instance
|
|
73136
|
+
* @returns {Object.<string,*>} JSON object
|
|
73137
|
+
*/
|
|
73138
|
+
NaturalLanguageQueryUnderstandingConfig.prototype.toJSON = function toJSON() {
|
|
73139
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
73140
|
+
};
|
|
73141
|
+
|
|
73142
|
+
/**
|
|
73143
|
+
* Gets the default type url for NaturalLanguageQueryUnderstandingConfig
|
|
73144
|
+
* @function getTypeUrl
|
|
73145
|
+
* @memberof google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig
|
|
73146
|
+
* @static
|
|
73147
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
73148
|
+
* @returns {string} The default type url
|
|
73149
|
+
*/
|
|
73150
|
+
NaturalLanguageQueryUnderstandingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
73151
|
+
if (typeUrlPrefix === undefined) {
|
|
73152
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
73153
|
+
}
|
|
73154
|
+
return typeUrlPrefix + "/google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig";
|
|
73155
|
+
};
|
|
73156
|
+
|
|
73157
|
+
/**
|
|
73158
|
+
* Mode enum.
|
|
73159
|
+
* @name google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode
|
|
73160
|
+
* @enum {number}
|
|
73161
|
+
* @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value
|
|
73162
|
+
* @property {number} DISABLED=1 DISABLED value
|
|
73163
|
+
* @property {number} ENABLED=2 ENABLED value
|
|
73164
|
+
*/
|
|
73165
|
+
NaturalLanguageQueryUnderstandingConfig.Mode = (function() {
|
|
73166
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
73167
|
+
values[valuesById[0] = "MODE_UNSPECIFIED"] = 0;
|
|
73168
|
+
values[valuesById[1] = "DISABLED"] = 1;
|
|
73169
|
+
values[valuesById[2] = "ENABLED"] = 2;
|
|
73170
|
+
return values;
|
|
73171
|
+
})();
|
|
73172
|
+
|
|
73173
|
+
return NaturalLanguageQueryUnderstandingConfig;
|
|
73174
|
+
})();
|
|
73175
|
+
|
|
69775
73176
|
v1.WorkspaceConfig = (function() {
|
|
69776
73177
|
|
|
69777
73178
|
/**
|