@google-cloud/discoveryengine 1.6.0 → 1.7.0

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.
Files changed (142) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +24 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +13 -1
  4. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +5 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +17 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/document.proto +9 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +2 -2
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +284 -22
  10. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +3 -0
  11. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +228 -0
  12. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +125 -21
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +16 -11
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +328 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +41 -1
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +21 -1
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +19 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +64 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +2 -2
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +120 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +55 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +283 -24
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +102 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +171 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +21 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +158 -24
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +9 -3
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +2 -1
  31. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +94 -0
  32. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +1 -1
  33. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +328 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +30 -1
  35. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +559 -0
  36. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +3 -6
  37. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +6 -0
  38. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +2 -2
  39. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +93 -0
  40. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +120 -0
  41. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +55 -0
  42. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +283 -24
  43. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +115 -0
  44. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +142 -22
  45. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +7 -1
  46. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +94 -0
  47. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +1 -1
  48. package/build/protos/protos.d.ts +44799 -26093
  49. package/build/protos/protos.js +120465 -74222
  50. package/build/protos/protos.json +8911 -4556
  51. package/build/src/index.d.ts +4 -1
  52. package/build/src/index.js +4 -1
  53. package/build/src/v1/conversational_search_service_client.d.ts +4 -0
  54. package/build/src/v1/document_service_client.d.ts +47 -19
  55. package/build/src/v1/index.d.ts +1 -0
  56. package/build/src/v1/index.js +3 -1
  57. package/build/src/v1/recommendation_service_client.d.ts +1087 -0
  58. package/build/src/v1/recommendation_service_client.js +1432 -0
  59. package/build/src/v1/recommendation_service_client_config.json +43 -0
  60. package/build/src/v1/search_service_client.d.ts +27 -9
  61. package/build/src/v1/search_service_client.js +18 -6
  62. package/build/src/v1/search_service_client_config.json +5 -5
  63. package/build/src/v1alpha/acl_config_service_client.d.ts +330 -0
  64. package/build/src/v1alpha/acl_config_service_client.js +454 -0
  65. package/build/src/v1alpha/chunk_service_client.d.ts +330 -0
  66. package/build/src/v1alpha/chunk_service_client.js +454 -0
  67. package/build/src/v1alpha/completion_service_client.d.ts +330 -0
  68. package/build/src/v1alpha/completion_service_client.js +457 -0
  69. package/build/src/v1alpha/conversational_search_service_client.d.ts +674 -0
  70. package/build/src/v1alpha/conversational_search_service_client.js +724 -0
  71. package/build/src/v1alpha/conversational_search_service_client_config.json +35 -0
  72. package/build/src/v1alpha/data_store_service_client.d.ts +330 -0
  73. package/build/src/v1alpha/data_store_service_client.js +457 -0
  74. package/build/src/v1alpha/document_service_client.d.ts +410 -21
  75. package/build/src/v1alpha/document_service_client.js +479 -0
  76. package/build/src/v1alpha/document_service_client_config.json +5 -0
  77. package/build/src/v1alpha/engine_service_client.d.ts +330 -0
  78. package/build/src/v1alpha/engine_service_client.js +457 -0
  79. package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
  80. package/build/src/v1alpha/estimate_billing_service_client.js +457 -0
  81. package/build/src/v1alpha/grounded_generation_service_client.d.ts +1574 -0
  82. package/build/src/v1alpha/grounded_generation_service_client.js +2248 -0
  83. package/build/src/v1alpha/grounded_generation_service_client_config.json +43 -0
  84. package/build/src/v1alpha/index.d.ts +3 -1
  85. package/build/src/v1alpha/index.js +7 -3
  86. package/build/src/v1alpha/project_service_client.d.ts +1756 -0
  87. package/build/src/v1alpha/project_service_client.js +2500 -0
  88. package/build/src/v1alpha/project_service_client_config.json +38 -0
  89. package/build/src/v1alpha/rank_service_client.d.ts +330 -0
  90. package/build/src/v1alpha/rank_service_client.js +454 -0
  91. package/build/src/v1alpha/rank_service_client_config.json +15 -2
  92. package/build/src/v1alpha/recommendation_service_client.d.ts +330 -0
  93. package/build/src/v1alpha/recommendation_service_client.js +454 -0
  94. package/build/src/v1alpha/schema_service_client.d.ts +330 -0
  95. package/build/src/v1alpha/schema_service_client.js +457 -0
  96. package/build/src/v1alpha/search_service_client.d.ts +360 -15
  97. package/build/src/v1alpha/search_service_client.js +474 -10
  98. package/build/src/v1alpha/search_service_client_config.json +5 -5
  99. package/build/src/v1alpha/search_tuning_service_client.d.ts +330 -0
  100. package/build/src/v1alpha/search_tuning_service_client.js +457 -0
  101. package/build/src/v1alpha/serving_config_service_client.d.ts +317 -1
  102. package/build/src/v1alpha/serving_config_service_client.js +434 -1
  103. package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
  104. package/build/src/v1alpha/site_search_engine_service_client.js +457 -0
  105. package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
  106. package/build/src/v1alpha/user_event_service_client.js +457 -0
  107. package/build/src/v1beta/completion_service_client.d.ts +315 -0
  108. package/build/src/v1beta/completion_service_client.js +432 -0
  109. package/build/src/v1beta/conversational_search_service_client.d.ts +659 -0
  110. package/build/src/v1beta/conversational_search_service_client.js +702 -0
  111. package/build/src/v1beta/conversational_search_service_client_config.json +35 -0
  112. package/build/src/v1beta/data_store_service_client.d.ts +315 -0
  113. package/build/src/v1beta/data_store_service_client.js +432 -0
  114. package/build/src/v1beta/document_service_client.d.ts +361 -21
  115. package/build/src/v1beta/document_service_client.js +432 -0
  116. package/build/src/v1beta/engine_service_client.d.ts +410 -0
  117. package/build/src/v1beta/engine_service_client.js +518 -0
  118. package/build/src/v1beta/engine_service_client_config.json +12 -0
  119. package/build/src/v1beta/grounded_generation_service_client.d.ts +1406 -0
  120. package/build/src/v1beta/grounded_generation_service_client.js +2014 -0
  121. package/build/src/v1beta/grounded_generation_service_client_config.json +43 -0
  122. package/build/src/v1beta/index.d.ts +2 -0
  123. package/build/src/v1beta/index.js +5 -1
  124. package/build/src/v1beta/rank_service_client.d.ts +1416 -0
  125. package/build/src/v1beta/rank_service_client.js +2015 -0
  126. package/build/src/v1beta/rank_service_client_config.json +43 -0
  127. package/build/src/v1beta/recommendation_service_client.d.ts +315 -0
  128. package/build/src/v1beta/recommendation_service_client.js +432 -0
  129. package/build/src/v1beta/schema_service_client.d.ts +315 -0
  130. package/build/src/v1beta/schema_service_client.js +432 -0
  131. package/build/src/v1beta/search_service_client.d.ts +342 -12
  132. package/build/src/v1beta/search_service_client.js +450 -8
  133. package/build/src/v1beta/search_service_client_config.json +5 -5
  134. package/build/src/v1beta/search_tuning_service_client.d.ts +315 -0
  135. package/build/src/v1beta/search_tuning_service_client.js +432 -0
  136. package/build/src/v1beta/serving_config_service_client.d.ts +315 -0
  137. package/build/src/v1beta/serving_config_service_client.js +432 -0
  138. package/build/src/v1beta/site_search_engine_service_client.d.ts +315 -0
  139. package/build/src/v1beta/site_search_engine_service_client.js +432 -0
  140. package/build/src/v1beta/user_event_service_client.d.ts +315 -0
  141. package/build/src/v1beta/user_event_service_client.js +432 -0
  142. package/package.json +1 -1
@@ -0,0 +1,1432 @@
1
+ "use strict";
2
+ // Copyright 2024 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.RecommendationServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1/recommendation_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./recommendation_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for making recommendations.
31
+ * @class
32
+ * @memberof v1
33
+ */
34
+ class RecommendationServiceClient {
35
+ /**
36
+ * Construct an instance of RecommendationServiceClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
+ * For more information, please check the
65
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
67
+ * need to avoid loading the default gRPC version and want to use the fallback
68
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
69
+ * ```
70
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
+ * const client = new RecommendationServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b, _c, _d, _e;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this
85
+ .constructor;
86
+ if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
87
+ (opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
88
+ (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
89
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
90
+ }
91
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
92
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
93
+ : undefined;
94
+ this._universeDomain =
95
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
96
+ this._servicePath = 'discoveryengine.' + this._universeDomain;
97
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
98
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
99
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
100
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
101
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
102
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
103
+ // Request numeric enum values if REST transport is used.
104
+ opts.numericEnums = true;
105
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
106
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
107
+ opts['scopes'] = staticMembers.scopes;
108
+ }
109
+ // Load google-gax module synchronously if needed
110
+ if (!gaxInstance) {
111
+ gaxInstance = require('google-gax');
112
+ }
113
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
114
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
115
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
116
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
117
+ // Save options to use in initialize() method.
118
+ this._opts = opts;
119
+ // Save the auth object to the client, for use by other methods.
120
+ this.auth = this._gaxGrpc.auth;
121
+ // Set useJWTAccessWithScope on the auth object.
122
+ this.auth.useJWTAccessWithScope = true;
123
+ // Set defaultServicePath on the auth object.
124
+ this.auth.defaultServicePath = this._servicePath;
125
+ // Set the default scopes in auth client if needed.
126
+ if (servicePath === this._servicePath) {
127
+ this.auth.defaultScopes = staticMembers.scopes;
128
+ }
129
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
130
+ // Determine the client header string.
131
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
132
+ if (typeof process === 'object' && 'versions' in process) {
133
+ clientHeader.push(`gl-node/${process.versions.node}`);
134
+ }
135
+ else {
136
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
137
+ }
138
+ if (!opts.fallback) {
139
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
140
+ }
141
+ else {
142
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
143
+ }
144
+ if (opts.libName && opts.libVersion) {
145
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
146
+ }
147
+ // Load the applicable protos.
148
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
149
+ // This API contains "path templates"; forward-slash-separated
150
+ // identifiers to uniquely identify resources within the API.
151
+ // Create useful helper objects for these.
152
+ this.pathTemplates = {
153
+ enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
154
+ projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
155
+ projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
156
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
157
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
158
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
159
+ projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
160
+ projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
161
+ projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
162
+ projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
163
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
164
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
165
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
166
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
167
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
168
+ projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
169
+ projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
170
+ };
171
+ // Put together the default options sent with requests.
172
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.RecommendationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
173
+ // Set up a dictionary of "inner API calls"; the core implementation
174
+ // of calling the API is handled in `google-gax`, with this code
175
+ // merely providing the destination and request information.
176
+ this.innerApiCalls = {};
177
+ // Add a warn function to the client constructor so it can be easily tested.
178
+ this.warn = this._gaxModule.warn;
179
+ }
180
+ /**
181
+ * Initialize the client.
182
+ * Performs asynchronous operations (such as authentication) and prepares the client.
183
+ * This function will be called automatically when any class method is called for the
184
+ * first time, but if you need to initialize it before calling an actual method,
185
+ * feel free to call initialize() directly.
186
+ *
187
+ * You can await on this method if you want to make sure the client is initialized.
188
+ *
189
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
190
+ */
191
+ initialize() {
192
+ // If the client stub promise is already initialized, return immediately.
193
+ if (this.recommendationServiceStub) {
194
+ return this.recommendationServiceStub;
195
+ }
196
+ // Put together the "service stub" for
197
+ // google.cloud.discoveryengine.v1.RecommendationService.
198
+ this.recommendationServiceStub = this._gaxGrpc.createStub(this._opts.fallback
199
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1.RecommendationService')
200
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
201
+ this._protos.google.cloud.discoveryengine.v1
202
+ .RecommendationService, this._opts, this._providedCustomServicePath);
203
+ // Iterate over each of the methods that the service provides
204
+ // and create an API call method for each.
205
+ const recommendationServiceStubMethods = ['recommend'];
206
+ for (const methodName of recommendationServiceStubMethods) {
207
+ const callPromise = this.recommendationServiceStub.then(stub => (...args) => {
208
+ if (this._terminated) {
209
+ return Promise.reject('The client has already been closed.');
210
+ }
211
+ const func = stub[methodName];
212
+ return func.apply(stub, args);
213
+ }, (err) => () => {
214
+ throw err;
215
+ });
216
+ const descriptor = undefined;
217
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
218
+ this.innerApiCalls[methodName] = apiCall;
219
+ }
220
+ return this.recommendationServiceStub;
221
+ }
222
+ /**
223
+ * The DNS address for this API service.
224
+ * @deprecated Use the apiEndpoint method of the client instance.
225
+ * @returns {string} The DNS address for this service.
226
+ */
227
+ static get servicePath() {
228
+ if (typeof process === 'object' &&
229
+ typeof process.emitWarning === 'function') {
230
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
231
+ }
232
+ return 'discoveryengine.googleapis.com';
233
+ }
234
+ /**
235
+ * The DNS address for this API service - same as servicePath.
236
+ * @deprecated Use the apiEndpoint method of the client instance.
237
+ * @returns {string} The DNS address for this service.
238
+ */
239
+ static get apiEndpoint() {
240
+ if (typeof process === 'object' &&
241
+ typeof process.emitWarning === 'function') {
242
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
243
+ }
244
+ return 'discoveryengine.googleapis.com';
245
+ }
246
+ /**
247
+ * The DNS address for this API service.
248
+ * @returns {string} The DNS address for this service.
249
+ */
250
+ get apiEndpoint() {
251
+ return this._servicePath;
252
+ }
253
+ get universeDomain() {
254
+ return this._universeDomain;
255
+ }
256
+ /**
257
+ * The port for this API service.
258
+ * @returns {number} The default port for this service.
259
+ */
260
+ static get port() {
261
+ return 443;
262
+ }
263
+ /**
264
+ * The scopes needed to make gRPC calls for every method defined
265
+ * in this service.
266
+ * @returns {string[]} List of default scopes.
267
+ */
268
+ static get scopes() {
269
+ return ['https://www.googleapis.com/auth/cloud-platform'];
270
+ }
271
+ /**
272
+ * Return the project ID used by this class.
273
+ * @returns {Promise} A promise that resolves to string containing the project ID.
274
+ */
275
+ getProjectId(callback) {
276
+ if (callback) {
277
+ this.auth.getProjectId(callback);
278
+ return;
279
+ }
280
+ return this.auth.getProjectId();
281
+ }
282
+ recommend(request, optionsOrCallback, callback) {
283
+ var _a;
284
+ request = request || {};
285
+ let options;
286
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
287
+ callback = optionsOrCallback;
288
+ options = {};
289
+ }
290
+ else {
291
+ options = optionsOrCallback;
292
+ }
293
+ options = options || {};
294
+ options.otherArgs = options.otherArgs || {};
295
+ options.otherArgs.headers = options.otherArgs.headers || {};
296
+ options.otherArgs.headers['x-goog-request-params'] =
297
+ this._gaxModule.routingHeader.fromParams({
298
+ serving_config: (_a = request.servingConfig) !== null && _a !== void 0 ? _a : '',
299
+ });
300
+ this.initialize();
301
+ return this.innerApiCalls.recommend(request, options, callback);
302
+ }
303
+ /**
304
+ * Gets information about a location.
305
+ *
306
+ * @param {Object} request
307
+ * The request object that will be sent.
308
+ * @param {string} request.name
309
+ * Resource name for the location.
310
+ * @param {object} [options]
311
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
312
+ * @returns {Promise} - The promise which resolves to an array.
313
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
314
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
315
+ * for more details and examples.
316
+ * @example
317
+ * ```
318
+ * const [response] = await client.getLocation(request);
319
+ * ```
320
+ */
321
+ getLocation(request, options, callback) {
322
+ return this.locationsClient.getLocation(request, options, callback);
323
+ }
324
+ /**
325
+ * Lists information about the supported locations for this service. Returns an iterable object.
326
+ *
327
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
328
+ * @param {Object} request
329
+ * The request object that will be sent.
330
+ * @param {string} request.name
331
+ * The resource that owns the locations collection, if applicable.
332
+ * @param {string} request.filter
333
+ * The standard list filter.
334
+ * @param {number} request.pageSize
335
+ * The standard list page size.
336
+ * @param {string} request.pageToken
337
+ * The standard list page token.
338
+ * @param {object} [options]
339
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
340
+ * @returns {Object}
341
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
342
+ * When you iterate the returned iterable, each element will be an object representing
343
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
344
+ * so you can stop the iteration when you don't need more results.
345
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
346
+ * for more details and examples.
347
+ * @example
348
+ * ```
349
+ * const iterable = client.listLocationsAsync(request);
350
+ * for await (const response of iterable) {
351
+ * // process response
352
+ * }
353
+ * ```
354
+ */
355
+ listLocationsAsync(request, options) {
356
+ return this.locationsClient.listLocationsAsync(request, options);
357
+ }
358
+ // --------------------
359
+ // -- Path templates --
360
+ // --------------------
361
+ /**
362
+ * Return a fully-qualified engine resource name string.
363
+ *
364
+ * @param {string} project
365
+ * @param {string} location
366
+ * @param {string} collection
367
+ * @param {string} engine
368
+ * @returns {string} Resource name string.
369
+ */
370
+ enginePath(project, location, collection, engine) {
371
+ return this.pathTemplates.enginePathTemplate.render({
372
+ project: project,
373
+ location: location,
374
+ collection: collection,
375
+ engine: engine,
376
+ });
377
+ }
378
+ /**
379
+ * Parse the project from Engine resource.
380
+ *
381
+ * @param {string} engineName
382
+ * A fully-qualified path representing Engine resource.
383
+ * @returns {string} A string representing the project.
384
+ */
385
+ matchProjectFromEngineName(engineName) {
386
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
387
+ }
388
+ /**
389
+ * Parse the location from Engine resource.
390
+ *
391
+ * @param {string} engineName
392
+ * A fully-qualified path representing Engine resource.
393
+ * @returns {string} A string representing the location.
394
+ */
395
+ matchLocationFromEngineName(engineName) {
396
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
397
+ }
398
+ /**
399
+ * Parse the collection from Engine resource.
400
+ *
401
+ * @param {string} engineName
402
+ * A fully-qualified path representing Engine resource.
403
+ * @returns {string} A string representing the collection.
404
+ */
405
+ matchCollectionFromEngineName(engineName) {
406
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
407
+ }
408
+ /**
409
+ * Parse the engine from Engine resource.
410
+ *
411
+ * @param {string} engineName
412
+ * A fully-qualified path representing Engine resource.
413
+ * @returns {string} A string representing the engine.
414
+ */
415
+ matchEngineFromEngineName(engineName) {
416
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
417
+ }
418
+ /**
419
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
420
+ *
421
+ * @param {string} project
422
+ * @param {string} location
423
+ * @param {string} collection
424
+ * @param {string} data_store
425
+ * @returns {string} Resource name string.
426
+ */
427
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
428
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
429
+ project: project,
430
+ location: location,
431
+ collection: collection,
432
+ data_store: dataStore,
433
+ });
434
+ }
435
+ /**
436
+ * Parse the project from ProjectLocationCollectionDataStore resource.
437
+ *
438
+ * @param {string} projectLocationCollectionDataStoreName
439
+ * A fully-qualified path representing project_location_collection_data_store resource.
440
+ * @returns {string} A string representing the project.
441
+ */
442
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
443
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
444
+ }
445
+ /**
446
+ * Parse the location from ProjectLocationCollectionDataStore resource.
447
+ *
448
+ * @param {string} projectLocationCollectionDataStoreName
449
+ * A fully-qualified path representing project_location_collection_data_store resource.
450
+ * @returns {string} A string representing the location.
451
+ */
452
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
453
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
454
+ }
455
+ /**
456
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
457
+ *
458
+ * @param {string} projectLocationCollectionDataStoreName
459
+ * A fully-qualified path representing project_location_collection_data_store resource.
460
+ * @returns {string} A string representing the collection.
461
+ */
462
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
463
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
464
+ }
465
+ /**
466
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
467
+ *
468
+ * @param {string} projectLocationCollectionDataStoreName
469
+ * A fully-qualified path representing project_location_collection_data_store resource.
470
+ * @returns {string} A string representing the data_store.
471
+ */
472
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
473
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
474
+ }
475
+ /**
476
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
477
+ *
478
+ * @param {string} project
479
+ * @param {string} location
480
+ * @param {string} collection
481
+ * @param {string} data_store
482
+ * @param {string} branch
483
+ * @param {string} document
484
+ * @returns {string} Resource name string.
485
+ */
486
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
487
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
488
+ project: project,
489
+ location: location,
490
+ collection: collection,
491
+ data_store: dataStore,
492
+ branch: branch,
493
+ document: document,
494
+ });
495
+ }
496
+ /**
497
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
498
+ *
499
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
500
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
501
+ * @returns {string} A string representing the project.
502
+ */
503
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
504
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
505
+ }
506
+ /**
507
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
508
+ *
509
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
510
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
511
+ * @returns {string} A string representing the location.
512
+ */
513
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
514
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
515
+ }
516
+ /**
517
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
518
+ *
519
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
520
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
521
+ * @returns {string} A string representing the collection.
522
+ */
523
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
524
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
525
+ }
526
+ /**
527
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
528
+ *
529
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
530
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
531
+ * @returns {string} A string representing the data_store.
532
+ */
533
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
534
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
535
+ }
536
+ /**
537
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
538
+ *
539
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
540
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
541
+ * @returns {string} A string representing the branch.
542
+ */
543
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
544
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
545
+ }
546
+ /**
547
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
548
+ *
549
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
550
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
551
+ * @returns {string} A string representing the document.
552
+ */
553
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
554
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
555
+ }
556
+ /**
557
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
558
+ *
559
+ * @param {string} project
560
+ * @param {string} location
561
+ * @param {string} collection
562
+ * @param {string} data_store
563
+ * @param {string} conversation
564
+ * @returns {string} Resource name string.
565
+ */
566
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
567
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
568
+ project: project,
569
+ location: location,
570
+ collection: collection,
571
+ data_store: dataStore,
572
+ conversation: conversation,
573
+ });
574
+ }
575
+ /**
576
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
577
+ *
578
+ * @param {string} projectLocationCollectionDataStoreConversationName
579
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
580
+ * @returns {string} A string representing the project.
581
+ */
582
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
583
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
584
+ }
585
+ /**
586
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
587
+ *
588
+ * @param {string} projectLocationCollectionDataStoreConversationName
589
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
590
+ * @returns {string} A string representing the location.
591
+ */
592
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
593
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
594
+ }
595
+ /**
596
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
597
+ *
598
+ * @param {string} projectLocationCollectionDataStoreConversationName
599
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
600
+ * @returns {string} A string representing the collection.
601
+ */
602
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
603
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
604
+ }
605
+ /**
606
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
607
+ *
608
+ * @param {string} projectLocationCollectionDataStoreConversationName
609
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
610
+ * @returns {string} A string representing the data_store.
611
+ */
612
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
613
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
614
+ }
615
+ /**
616
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
617
+ *
618
+ * @param {string} projectLocationCollectionDataStoreConversationName
619
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
620
+ * @returns {string} A string representing the conversation.
621
+ */
622
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
623
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
624
+ }
625
+ /**
626
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
627
+ *
628
+ * @param {string} project
629
+ * @param {string} location
630
+ * @param {string} collection
631
+ * @param {string} data_store
632
+ * @param {string} schema
633
+ * @returns {string} Resource name string.
634
+ */
635
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
636
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
637
+ project: project,
638
+ location: location,
639
+ collection: collection,
640
+ data_store: dataStore,
641
+ schema: schema,
642
+ });
643
+ }
644
+ /**
645
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
646
+ *
647
+ * @param {string} projectLocationCollectionDataStoreSchemaName
648
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
649
+ * @returns {string} A string representing the project.
650
+ */
651
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
652
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
653
+ }
654
+ /**
655
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
656
+ *
657
+ * @param {string} projectLocationCollectionDataStoreSchemaName
658
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
659
+ * @returns {string} A string representing the location.
660
+ */
661
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
662
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
663
+ }
664
+ /**
665
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
666
+ *
667
+ * @param {string} projectLocationCollectionDataStoreSchemaName
668
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
669
+ * @returns {string} A string representing the collection.
670
+ */
671
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
672
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
673
+ }
674
+ /**
675
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
676
+ *
677
+ * @param {string} projectLocationCollectionDataStoreSchemaName
678
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
679
+ * @returns {string} A string representing the data_store.
680
+ */
681
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
682
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
683
+ }
684
+ /**
685
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
686
+ *
687
+ * @param {string} projectLocationCollectionDataStoreSchemaName
688
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
689
+ * @returns {string} A string representing the schema.
690
+ */
691
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
692
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
693
+ }
694
+ /**
695
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
696
+ *
697
+ * @param {string} project
698
+ * @param {string} location
699
+ * @param {string} collection
700
+ * @param {string} data_store
701
+ * @param {string} serving_config
702
+ * @returns {string} Resource name string.
703
+ */
704
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
705
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
706
+ project: project,
707
+ location: location,
708
+ collection: collection,
709
+ data_store: dataStore,
710
+ serving_config: servingConfig,
711
+ });
712
+ }
713
+ /**
714
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
715
+ *
716
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
717
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
718
+ * @returns {string} A string representing the project.
719
+ */
720
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
721
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
722
+ }
723
+ /**
724
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
725
+ *
726
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
727
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
728
+ * @returns {string} A string representing the location.
729
+ */
730
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
731
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
732
+ }
733
+ /**
734
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
735
+ *
736
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
737
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
738
+ * @returns {string} A string representing the collection.
739
+ */
740
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
741
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
742
+ }
743
+ /**
744
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
745
+ *
746
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
747
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
748
+ * @returns {string} A string representing the data_store.
749
+ */
750
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
751
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
752
+ }
753
+ /**
754
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
755
+ *
756
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
757
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
758
+ * @returns {string} A string representing the serving_config.
759
+ */
760
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
761
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
762
+ }
763
+ /**
764
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngine resource name string.
765
+ *
766
+ * @param {string} project
767
+ * @param {string} location
768
+ * @param {string} collection
769
+ * @param {string} data_store
770
+ * @returns {string} Resource name string.
771
+ */
772
+ projectLocationCollectionDataStoreSiteSearchEnginePath(project, location, collection, dataStore) {
773
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render({
774
+ project: project,
775
+ location: location,
776
+ collection: collection,
777
+ data_store: dataStore,
778
+ });
779
+ }
780
+ /**
781
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
782
+ *
783
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
784
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
785
+ * @returns {string} A string representing the project.
786
+ */
787
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
788
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).project;
789
+ }
790
+ /**
791
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
792
+ *
793
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
794
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
795
+ * @returns {string} A string representing the location.
796
+ */
797
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
798
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).location;
799
+ }
800
+ /**
801
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
802
+ *
803
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
804
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
805
+ * @returns {string} A string representing the collection.
806
+ */
807
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
808
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).collection;
809
+ }
810
+ /**
811
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
812
+ *
813
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
814
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
815
+ * @returns {string} A string representing the data_store.
816
+ */
817
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
818
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
819
+ }
820
+ /**
821
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
822
+ *
823
+ * @param {string} project
824
+ * @param {string} location
825
+ * @param {string} collection
826
+ * @param {string} data_store
827
+ * @param {string} target_site
828
+ * @returns {string} Resource name string.
829
+ */
830
+ projectLocationCollectionDataStoreSiteSearchEngineTargetSitePath(project, location, collection, dataStore, targetSite) {
831
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render({
832
+ project: project,
833
+ location: location,
834
+ collection: collection,
835
+ data_store: dataStore,
836
+ target_site: targetSite,
837
+ });
838
+ }
839
+ /**
840
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
841
+ *
842
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
843
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
844
+ * @returns {string} A string representing the project.
845
+ */
846
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
847
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).project;
848
+ }
849
+ /**
850
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
851
+ *
852
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
853
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
854
+ * @returns {string} A string representing the location.
855
+ */
856
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
857
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).location;
858
+ }
859
+ /**
860
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
861
+ *
862
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
863
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
864
+ * @returns {string} A string representing the collection.
865
+ */
866
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
867
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).collection;
868
+ }
869
+ /**
870
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
871
+ *
872
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
873
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
874
+ * @returns {string} A string representing the data_store.
875
+ */
876
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
877
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).data_store;
878
+ }
879
+ /**
880
+ * Parse the target_site from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
881
+ *
882
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
883
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
884
+ * @returns {string} A string representing the target_site.
885
+ */
886
+ matchTargetSiteFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
887
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).target_site;
888
+ }
889
+ /**
890
+ * Return a fully-qualified projectLocationCollectionEngineConversation resource name string.
891
+ *
892
+ * @param {string} project
893
+ * @param {string} location
894
+ * @param {string} collection
895
+ * @param {string} engine
896
+ * @param {string} conversation
897
+ * @returns {string} Resource name string.
898
+ */
899
+ projectLocationCollectionEngineConversationPath(project, location, collection, engine, conversation) {
900
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render({
901
+ project: project,
902
+ location: location,
903
+ collection: collection,
904
+ engine: engine,
905
+ conversation: conversation,
906
+ });
907
+ }
908
+ /**
909
+ * Parse the project from ProjectLocationCollectionEngineConversation resource.
910
+ *
911
+ * @param {string} projectLocationCollectionEngineConversationName
912
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
913
+ * @returns {string} A string representing the project.
914
+ */
915
+ matchProjectFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
916
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).project;
917
+ }
918
+ /**
919
+ * Parse the location from ProjectLocationCollectionEngineConversation resource.
920
+ *
921
+ * @param {string} projectLocationCollectionEngineConversationName
922
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
923
+ * @returns {string} A string representing the location.
924
+ */
925
+ matchLocationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
926
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).location;
927
+ }
928
+ /**
929
+ * Parse the collection from ProjectLocationCollectionEngineConversation resource.
930
+ *
931
+ * @param {string} projectLocationCollectionEngineConversationName
932
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
933
+ * @returns {string} A string representing the collection.
934
+ */
935
+ matchCollectionFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
936
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).collection;
937
+ }
938
+ /**
939
+ * Parse the engine from ProjectLocationCollectionEngineConversation resource.
940
+ *
941
+ * @param {string} projectLocationCollectionEngineConversationName
942
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
943
+ * @returns {string} A string representing the engine.
944
+ */
945
+ matchEngineFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
946
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).engine;
947
+ }
948
+ /**
949
+ * Parse the conversation from ProjectLocationCollectionEngineConversation resource.
950
+ *
951
+ * @param {string} projectLocationCollectionEngineConversationName
952
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
953
+ * @returns {string} A string representing the conversation.
954
+ */
955
+ matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
956
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
957
+ }
958
+ /**
959
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
960
+ *
961
+ * @param {string} project
962
+ * @param {string} location
963
+ * @param {string} collection
964
+ * @param {string} engine
965
+ * @param {string} serving_config
966
+ * @returns {string} Resource name string.
967
+ */
968
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
969
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
970
+ project: project,
971
+ location: location,
972
+ collection: collection,
973
+ engine: engine,
974
+ serving_config: servingConfig,
975
+ });
976
+ }
977
+ /**
978
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
979
+ *
980
+ * @param {string} projectLocationCollectionEngineServingConfigName
981
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
982
+ * @returns {string} A string representing the project.
983
+ */
984
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
985
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
986
+ }
987
+ /**
988
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
989
+ *
990
+ * @param {string} projectLocationCollectionEngineServingConfigName
991
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
992
+ * @returns {string} A string representing the location.
993
+ */
994
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
995
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
996
+ }
997
+ /**
998
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
999
+ *
1000
+ * @param {string} projectLocationCollectionEngineServingConfigName
1001
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1002
+ * @returns {string} A string representing the collection.
1003
+ */
1004
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1005
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
1006
+ }
1007
+ /**
1008
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
1009
+ *
1010
+ * @param {string} projectLocationCollectionEngineServingConfigName
1011
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1012
+ * @returns {string} A string representing the engine.
1013
+ */
1014
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1015
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
1016
+ }
1017
+ /**
1018
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
1019
+ *
1020
+ * @param {string} projectLocationCollectionEngineServingConfigName
1021
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1022
+ * @returns {string} A string representing the serving_config.
1023
+ */
1024
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1025
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
1026
+ }
1027
+ /**
1028
+ * Return a fully-qualified projectLocationDataStore resource name string.
1029
+ *
1030
+ * @param {string} project
1031
+ * @param {string} location
1032
+ * @param {string} data_store
1033
+ * @returns {string} Resource name string.
1034
+ */
1035
+ projectLocationDataStorePath(project, location, dataStore) {
1036
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
1037
+ project: project,
1038
+ location: location,
1039
+ data_store: dataStore,
1040
+ });
1041
+ }
1042
+ /**
1043
+ * Parse the project from ProjectLocationDataStore resource.
1044
+ *
1045
+ * @param {string} projectLocationDataStoreName
1046
+ * A fully-qualified path representing project_location_data_store resource.
1047
+ * @returns {string} A string representing the project.
1048
+ */
1049
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1050
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
1051
+ }
1052
+ /**
1053
+ * Parse the location from ProjectLocationDataStore resource.
1054
+ *
1055
+ * @param {string} projectLocationDataStoreName
1056
+ * A fully-qualified path representing project_location_data_store resource.
1057
+ * @returns {string} A string representing the location.
1058
+ */
1059
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1060
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
1061
+ }
1062
+ /**
1063
+ * Parse the data_store from ProjectLocationDataStore resource.
1064
+ *
1065
+ * @param {string} projectLocationDataStoreName
1066
+ * A fully-qualified path representing project_location_data_store resource.
1067
+ * @returns {string} A string representing the data_store.
1068
+ */
1069
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1070
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
1071
+ }
1072
+ /**
1073
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
1074
+ *
1075
+ * @param {string} project
1076
+ * @param {string} location
1077
+ * @param {string} data_store
1078
+ * @param {string} branch
1079
+ * @param {string} document
1080
+ * @returns {string} Resource name string.
1081
+ */
1082
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
1083
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
1084
+ project: project,
1085
+ location: location,
1086
+ data_store: dataStore,
1087
+ branch: branch,
1088
+ document: document,
1089
+ });
1090
+ }
1091
+ /**
1092
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
1093
+ *
1094
+ * @param {string} projectLocationDataStoreBranchDocumentName
1095
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1096
+ * @returns {string} A string representing the project.
1097
+ */
1098
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1099
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1100
+ }
1101
+ /**
1102
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1103
+ *
1104
+ * @param {string} projectLocationDataStoreBranchDocumentName
1105
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1106
+ * @returns {string} A string representing the location.
1107
+ */
1108
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1109
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1110
+ }
1111
+ /**
1112
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1113
+ *
1114
+ * @param {string} projectLocationDataStoreBranchDocumentName
1115
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1116
+ * @returns {string} A string representing the data_store.
1117
+ */
1118
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1119
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1120
+ }
1121
+ /**
1122
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1123
+ *
1124
+ * @param {string} projectLocationDataStoreBranchDocumentName
1125
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1126
+ * @returns {string} A string representing the branch.
1127
+ */
1128
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1129
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1130
+ }
1131
+ /**
1132
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1133
+ *
1134
+ * @param {string} projectLocationDataStoreBranchDocumentName
1135
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1136
+ * @returns {string} A string representing the document.
1137
+ */
1138
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1139
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1140
+ }
1141
+ /**
1142
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1143
+ *
1144
+ * @param {string} project
1145
+ * @param {string} location
1146
+ * @param {string} data_store
1147
+ * @param {string} conversation
1148
+ * @returns {string} Resource name string.
1149
+ */
1150
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1151
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1152
+ project: project,
1153
+ location: location,
1154
+ data_store: dataStore,
1155
+ conversation: conversation,
1156
+ });
1157
+ }
1158
+ /**
1159
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1160
+ *
1161
+ * @param {string} projectLocationDataStoreConversationName
1162
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1163
+ * @returns {string} A string representing the project.
1164
+ */
1165
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1166
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1167
+ }
1168
+ /**
1169
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1170
+ *
1171
+ * @param {string} projectLocationDataStoreConversationName
1172
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1173
+ * @returns {string} A string representing the location.
1174
+ */
1175
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1176
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1177
+ }
1178
+ /**
1179
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1180
+ *
1181
+ * @param {string} projectLocationDataStoreConversationName
1182
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1183
+ * @returns {string} A string representing the data_store.
1184
+ */
1185
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1186
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1187
+ }
1188
+ /**
1189
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1190
+ *
1191
+ * @param {string} projectLocationDataStoreConversationName
1192
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1193
+ * @returns {string} A string representing the conversation.
1194
+ */
1195
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1196
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1197
+ }
1198
+ /**
1199
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1200
+ *
1201
+ * @param {string} project
1202
+ * @param {string} location
1203
+ * @param {string} data_store
1204
+ * @param {string} schema
1205
+ * @returns {string} Resource name string.
1206
+ */
1207
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1208
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1209
+ project: project,
1210
+ location: location,
1211
+ data_store: dataStore,
1212
+ schema: schema,
1213
+ });
1214
+ }
1215
+ /**
1216
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1217
+ *
1218
+ * @param {string} projectLocationDataStoreSchemaName
1219
+ * A fully-qualified path representing project_location_data_store_schema resource.
1220
+ * @returns {string} A string representing the project.
1221
+ */
1222
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1223
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1224
+ }
1225
+ /**
1226
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1227
+ *
1228
+ * @param {string} projectLocationDataStoreSchemaName
1229
+ * A fully-qualified path representing project_location_data_store_schema resource.
1230
+ * @returns {string} A string representing the location.
1231
+ */
1232
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1233
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1234
+ }
1235
+ /**
1236
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1237
+ *
1238
+ * @param {string} projectLocationDataStoreSchemaName
1239
+ * A fully-qualified path representing project_location_data_store_schema resource.
1240
+ * @returns {string} A string representing the data_store.
1241
+ */
1242
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1243
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1244
+ }
1245
+ /**
1246
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1247
+ *
1248
+ * @param {string} projectLocationDataStoreSchemaName
1249
+ * A fully-qualified path representing project_location_data_store_schema resource.
1250
+ * @returns {string} A string representing the schema.
1251
+ */
1252
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1253
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1254
+ }
1255
+ /**
1256
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
1257
+ *
1258
+ * @param {string} project
1259
+ * @param {string} location
1260
+ * @param {string} data_store
1261
+ * @param {string} serving_config
1262
+ * @returns {string} Resource name string.
1263
+ */
1264
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
1265
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
1266
+ project: project,
1267
+ location: location,
1268
+ data_store: dataStore,
1269
+ serving_config: servingConfig,
1270
+ });
1271
+ }
1272
+ /**
1273
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
1274
+ *
1275
+ * @param {string} projectLocationDataStoreServingConfigName
1276
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1277
+ * @returns {string} A string representing the project.
1278
+ */
1279
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1280
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
1281
+ }
1282
+ /**
1283
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
1284
+ *
1285
+ * @param {string} projectLocationDataStoreServingConfigName
1286
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1287
+ * @returns {string} A string representing the location.
1288
+ */
1289
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1290
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
1291
+ }
1292
+ /**
1293
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
1294
+ *
1295
+ * @param {string} projectLocationDataStoreServingConfigName
1296
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1297
+ * @returns {string} A string representing the data_store.
1298
+ */
1299
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1300
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
1301
+ }
1302
+ /**
1303
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
1304
+ *
1305
+ * @param {string} projectLocationDataStoreServingConfigName
1306
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1307
+ * @returns {string} A string representing the serving_config.
1308
+ */
1309
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1310
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
1311
+ }
1312
+ /**
1313
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngine resource name string.
1314
+ *
1315
+ * @param {string} project
1316
+ * @param {string} location
1317
+ * @param {string} data_store
1318
+ * @returns {string} Resource name string.
1319
+ */
1320
+ projectLocationDataStoreSiteSearchEnginePath(project, location, dataStore) {
1321
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render({
1322
+ project: project,
1323
+ location: location,
1324
+ data_store: dataStore,
1325
+ });
1326
+ }
1327
+ /**
1328
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngine resource.
1329
+ *
1330
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1331
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1332
+ * @returns {string} A string representing the project.
1333
+ */
1334
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1335
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).project;
1336
+ }
1337
+ /**
1338
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngine resource.
1339
+ *
1340
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1341
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1342
+ * @returns {string} A string representing the location.
1343
+ */
1344
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1345
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).location;
1346
+ }
1347
+ /**
1348
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngine resource.
1349
+ *
1350
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1351
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1352
+ * @returns {string} A string representing the data_store.
1353
+ */
1354
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1355
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
1356
+ }
1357
+ /**
1358
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
1359
+ *
1360
+ * @param {string} project
1361
+ * @param {string} location
1362
+ * @param {string} data_store
1363
+ * @param {string} target_site
1364
+ * @returns {string} Resource name string.
1365
+ */
1366
+ projectLocationDataStoreSiteSearchEngineTargetSitePath(project, location, dataStore, targetSite) {
1367
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render({
1368
+ project: project,
1369
+ location: location,
1370
+ data_store: dataStore,
1371
+ target_site: targetSite,
1372
+ });
1373
+ }
1374
+ /**
1375
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1376
+ *
1377
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1378
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1379
+ * @returns {string} A string representing the project.
1380
+ */
1381
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1382
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).project;
1383
+ }
1384
+ /**
1385
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1386
+ *
1387
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1388
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1389
+ * @returns {string} A string representing the location.
1390
+ */
1391
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1392
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).location;
1393
+ }
1394
+ /**
1395
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1396
+ *
1397
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1398
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1399
+ * @returns {string} A string representing the data_store.
1400
+ */
1401
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1402
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).data_store;
1403
+ }
1404
+ /**
1405
+ * Parse the target_site from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1406
+ *
1407
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1408
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1409
+ * @returns {string} A string representing the target_site.
1410
+ */
1411
+ matchTargetSiteFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1412
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).target_site;
1413
+ }
1414
+ /**
1415
+ * Terminate the gRPC channel and close the client.
1416
+ *
1417
+ * The client will no longer be usable and all future behavior is undefined.
1418
+ * @returns {Promise} A promise that resolves when the client is closed.
1419
+ */
1420
+ close() {
1421
+ if (this.recommendationServiceStub && !this._terminated) {
1422
+ return this.recommendationServiceStub.then(stub => {
1423
+ this._terminated = true;
1424
+ stub.close();
1425
+ this.locationsClient.close();
1426
+ });
1427
+ }
1428
+ return Promise.resolve();
1429
+ }
1430
+ }
1431
+ exports.RecommendationServiceClient = RecommendationServiceClient;
1432
+ //# sourceMappingURL=recommendation_service_client.js.map