@google-cloud/discoveryengine 1.3.1 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/README.md +64 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +54 -3
- package/build/protos/google/cloud/discoveryengine/v1/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +51 -4
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +40 -1
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +304 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +215 -0
- package/build/protos/google/cloud/discoveryengine/v1/engine_service.proto +242 -0
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +137 -4
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +170 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +691 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +3 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +49 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +79 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +72 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +137 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +77 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +44 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +6 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +44 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +80 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +83 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +127 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +13 -8
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +3 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +130 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +66 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +74 -13
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +24 -20
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +147 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +7 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +59 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +51 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +45 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +120 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +10 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +220 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +244 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +41 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +26 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +169 -15
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +265 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +148 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +170 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +695 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -3
- package/build/protos/protos.d.ts +48530 -23682
- package/build/protos/protos.js +122429 -63306
- package/build/protos/protos.json +13438 -7286
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1/completion_service_client.d.ts +489 -7
- package/build/src/v1/completion_service_client.js +715 -11
- package/build/src/v1/completion_service_client_config.json +10 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -3
- package/build/src/v1/conversational_search_service_client.js +466 -9
- package/build/src/v1/data_store_service_client.d.ts +1286 -0
- package/build/src/v1/data_store_service_client.js +1768 -0
- package/build/src/v1/data_store_service_client_config.json +46 -0
- package/build/src/v1/document_service_client.d.ts +347 -2
- package/build/src/v1/document_service_client.js +506 -9
- package/build/src/v1/engine_service_client.d.ts +1211 -0
- package/build/src/v1/engine_service_client.js +1731 -0
- package/build/src/v1/engine_service_client_config.json +46 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/schema_service_client.d.ts +272 -2
- package/build/src/v1/schema_service_client.js +402 -9
- package/build/src/v1/search_service_client.d.ts +515 -11
- package/build/src/v1/search_service_client.js +648 -15
- package/build/src/v1/site_search_engine_service_client.d.ts +1564 -0
- package/build/src/v1/site_search_engine_service_client.js +2075 -0
- package/build/src/v1/site_search_engine_service_client_config.json +74 -0
- package/build/src/v1/user_event_service_client.d.ts +272 -2
- package/build/src/v1/user_event_service_client.js +402 -9
- package/build/src/v1alpha/acl_config_service_client.d.ts +1233 -0
- package/build/src/v1alpha/acl_config_service_client.js +1765 -0
- package/build/src/v1alpha/acl_config_service_client_config.json +34 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +1350 -0
- package/build/src/v1alpha/chunk_service_client.js +1886 -0
- package/build/src/v1alpha/chunk_service_client_config.json +34 -0
- package/build/src/v1alpha/completion_service_client.d.ts +599 -5
- package/build/src/v1alpha/completion_service_client.js +868 -12
- package/build/src/v1alpha/completion_service_client_config.json +10 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +244 -3
- package/build/src/v1alpha/conversational_search_service_client.js +353 -10
- package/build/src/v1alpha/data_store_service_client.d.ts +462 -5
- package/build/src/v1alpha/data_store_service_client.js +599 -12
- package/build/src/v1alpha/data_store_service_client_config.json +8 -0
- package/build/src/v1alpha/document_service_client.d.ts +393 -2
- package/build/src/v1alpha/document_service_client.js +551 -10
- package/build/src/v1alpha/engine_service_client.d.ts +386 -4
- package/build/src/v1alpha/engine_service_client.js +551 -10
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +1367 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +2028 -0
- package/build/src/v1alpha/estimate_billing_service_client_config.json +30 -0
- package/build/src/v1alpha/index.d.ts +4 -0
- package/build/src/v1alpha/index.js +10 -2
- package/build/src/v1alpha/recommendation_service_client.d.ts +242 -3
- package/build/src/v1alpha/recommendation_service_client.js +353 -10
- package/build/src/v1alpha/schema_service_client.d.ts +383 -2
- package/build/src/v1alpha/schema_service_client.js +551 -10
- package/build/src/v1alpha/search_service_client.d.ts +269 -17
- package/build/src/v1alpha/search_service_client.js +373 -20
- package/build/src/v1alpha/search_tuning_service_client.d.ts +384 -3
- package/build/src/v1alpha/search_tuning_service_client.js +551 -10
- package/build/src/v1alpha/serving_config_service_client.d.ts +1369 -0
- package/build/src/v1alpha/serving_config_service_client.js +1935 -0
- package/build/src/v1alpha/serving_config_service_client_config.json +38 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +383 -2
- package/build/src/v1alpha/site_search_engine_service_client.js +551 -10
- package/build/src/v1alpha/user_event_service_client.d.ts +383 -2
- package/build/src/v1alpha/user_event_service_client.js +551 -10
- package/build/src/v1beta/completion_service_client.d.ts +708 -7
- package/build/src/v1beta/completion_service_client.js +1015 -11
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +420 -3
- package/build/src/v1beta/conversational_search_service_client.js +570 -9
- package/build/src/v1beta/data_store_service_client.d.ts +1508 -0
- package/build/src/v1beta/data_store_service_client.js +2070 -0
- package/build/src/v1beta/data_store_service_client_config.json +46 -0
- package/build/src/v1beta/document_service_client.d.ts +566 -2
- package/build/src/v1beta/document_service_client.js +810 -11
- package/build/src/v1beta/engine_service_client.d.ts +1432 -0
- package/build/src/v1beta/engine_service_client.js +2032 -0
- package/build/src/v1beta/engine_service_client_config.json +46 -0
- package/build/src/v1beta/index.d.ts +5 -0
- package/build/src/v1beta/index.js +11 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +495 -5
- package/build/src/v1beta/recommendation_service_client.js +674 -9
- package/build/src/v1beta/schema_service_client.d.ts +491 -2
- package/build/src/v1beta/schema_service_client.js +706 -11
- package/build/src/v1beta/search_service_client.d.ts +620 -29
- package/build/src/v1beta/search_service_client.js +772 -27
- package/build/src/v1beta/search_tuning_service_client.d.ts +1196 -0
- package/build/src/v1beta/search_tuning_service_client.js +1781 -0
- package/build/src/v1beta/search_tuning_service_client_config.json +30 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +1217 -0
- package/build/src/v1beta/serving_config_service_client.js +1724 -0
- package/build/src/v1beta/serving_config_service_client_config.json +38 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +1787 -0
- package/build/src/v1beta/site_search_engine_service_client.js +2375 -0
- package/build/src/v1beta/site_search_engine_service_client_config.json +74 -0
- package/build/src/v1beta/user_event_service_client.d.ts +491 -2
- package/build/src/v1beta/user_event_service_client.js +706 -11
- package/package.json +3 -3
@@ -72,7 +72,7 @@ class CompletionServiceClient {
|
|
72
72
|
* ```
|
73
73
|
*/
|
74
74
|
constructor(opts, gaxInstance) {
|
75
|
-
var _a, _b;
|
75
|
+
var _a, _b, _c, _d;
|
76
76
|
this._terminated = false;
|
77
77
|
this.descriptors = {
|
78
78
|
page: {},
|
@@ -82,16 +82,24 @@ class CompletionServiceClient {
|
|
82
82
|
};
|
83
83
|
// Ensure that options include all the required fields.
|
84
84
|
const staticMembers = this.constructor;
|
85
|
-
|
85
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
86
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
87
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
88
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
89
|
+
}
|
90
|
+
this._universeDomain =
|
91
|
+
(_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 : 'googleapis.com';
|
92
|
+
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
93
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
86
94
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
87
95
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
88
|
-
const clientConfig = (
|
89
|
-
const fallback = (
|
96
|
+
const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
|
97
|
+
const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
|
90
98
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
91
99
|
// Request numeric enum values if REST transport is used.
|
92
100
|
opts.numericEnums = true;
|
93
101
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
94
|
-
if (servicePath !==
|
102
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
95
103
|
opts['scopes'] = staticMembers.scopes;
|
96
104
|
}
|
97
105
|
// Load google-gax module synchronously if needed
|
@@ -109,9 +117,9 @@ class CompletionServiceClient {
|
|
109
117
|
// Set useJWTAccessWithScope on the auth object.
|
110
118
|
this.auth.useJWTAccessWithScope = true;
|
111
119
|
// Set defaultServicePath on the auth object.
|
112
|
-
this.auth.defaultServicePath =
|
120
|
+
this.auth.defaultServicePath = this._servicePath;
|
113
121
|
// Set the default scopes in auth client if needed.
|
114
|
-
if (servicePath ===
|
122
|
+
if (servicePath === this._servicePath) {
|
115
123
|
this.auth.defaultScopes = staticMembers.scopes;
|
116
124
|
}
|
117
125
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
@@ -138,14 +146,128 @@ class CompletionServiceClient {
|
|
138
146
|
// identifiers to uniquely identify resources within the API.
|
139
147
|
// Create useful helper objects for these.
|
140
148
|
this.pathTemplates = {
|
149
|
+
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
141
150
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
142
151
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
143
152
|
projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
|
144
153
|
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
154
|
+
projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
|
155
|
+
projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
|
156
|
+
projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
|
145
157
|
projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
|
146
158
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
147
159
|
projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
|
148
160
|
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
161
|
+
projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
|
162
|
+
projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
|
163
|
+
};
|
164
|
+
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
165
|
+
// This API contains "long-running operations", which return a
|
166
|
+
// an Operation object that allows for tracking of the operation,
|
167
|
+
// rather than holding a request open.
|
168
|
+
const lroOptions = {
|
169
|
+
auth: this.auth,
|
170
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
171
|
+
};
|
172
|
+
if (opts.fallback) {
|
173
|
+
lroOptions.protoJson = protoFilesRoot;
|
174
|
+
lroOptions.httpRules = [
|
175
|
+
{
|
176
|
+
selector: 'google.longrunning.Operations.GetOperation',
|
177
|
+
get: '/v1/{name=projects/*/operations/*}',
|
178
|
+
additional_bindings: [
|
179
|
+
{
|
180
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
181
|
+
},
|
182
|
+
{
|
183
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
184
|
+
},
|
185
|
+
{
|
186
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
187
|
+
},
|
188
|
+
{
|
189
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
190
|
+
},
|
191
|
+
{
|
192
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
193
|
+
},
|
194
|
+
{
|
195
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
196
|
+
},
|
197
|
+
{
|
198
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
199
|
+
},
|
200
|
+
{
|
201
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
202
|
+
},
|
203
|
+
{
|
204
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
205
|
+
},
|
206
|
+
{
|
207
|
+
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
208
|
+
},
|
209
|
+
{
|
210
|
+
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
211
|
+
},
|
212
|
+
{
|
213
|
+
get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
214
|
+
},
|
215
|
+
{ get: '/v1/{name=projects/*/locations/*/operations/*}' },
|
216
|
+
{ get: '/v1/{name=projects/*/operations/*}' },
|
217
|
+
],
|
218
|
+
},
|
219
|
+
{
|
220
|
+
selector: 'google.longrunning.Operations.ListOperations',
|
221
|
+
get: '/v1/{name=projects/*}/operations',
|
222
|
+
additional_bindings: [
|
223
|
+
{
|
224
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
225
|
+
},
|
226
|
+
{
|
227
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
228
|
+
},
|
229
|
+
{
|
230
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
231
|
+
},
|
232
|
+
{
|
233
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
234
|
+
},
|
235
|
+
{
|
236
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
237
|
+
},
|
238
|
+
{
|
239
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
240
|
+
},
|
241
|
+
{
|
242
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
243
|
+
},
|
244
|
+
{
|
245
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
246
|
+
},
|
247
|
+
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
248
|
+
{
|
249
|
+
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
250
|
+
},
|
251
|
+
{
|
252
|
+
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
253
|
+
},
|
254
|
+
{ get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
|
255
|
+
{ get: '/v1/{name=projects/*/locations/*}/operations' },
|
256
|
+
{ get: '/v1/{name=projects/*}/operations' },
|
257
|
+
],
|
258
|
+
},
|
259
|
+
];
|
260
|
+
}
|
261
|
+
this.operationsClient = this._gaxModule
|
262
|
+
.lro(lroOptions)
|
263
|
+
.operationsClient(opts);
|
264
|
+
const importSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse');
|
265
|
+
const importSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata');
|
266
|
+
const purgeSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse');
|
267
|
+
const purgeSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata');
|
268
|
+
this.descriptors.longrunning = {
|
269
|
+
importSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSuggestionDenyListEntriesResponse.decode.bind(importSuggestionDenyListEntriesResponse), importSuggestionDenyListEntriesMetadata.decode.bind(importSuggestionDenyListEntriesMetadata)),
|
270
|
+
purgeSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeSuggestionDenyListEntriesResponse.decode.bind(purgeSuggestionDenyListEntriesResponse), purgeSuggestionDenyListEntriesMetadata.decode.bind(purgeSuggestionDenyListEntriesMetadata)),
|
149
271
|
};
|
150
272
|
// Put together the default options sent with requests.
|
151
273
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.CompletionService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -181,7 +303,11 @@ class CompletionServiceClient {
|
|
181
303
|
.CompletionService, this._opts, this._providedCustomServicePath);
|
182
304
|
// Iterate over each of the methods that the service provides
|
183
305
|
// and create an API call method for each.
|
184
|
-
const completionServiceStubMethods = [
|
306
|
+
const completionServiceStubMethods = [
|
307
|
+
'completeQuery',
|
308
|
+
'importSuggestionDenyListEntries',
|
309
|
+
'purgeSuggestionDenyListEntries',
|
310
|
+
];
|
185
311
|
for (const methodName of completionServiceStubMethods) {
|
186
312
|
const callPromise = this.completionServiceStub.then(stub => (...args) => {
|
187
313
|
if (this._terminated) {
|
@@ -192,7 +318,7 @@ class CompletionServiceClient {
|
|
192
318
|
}, (err) => () => {
|
193
319
|
throw err;
|
194
320
|
});
|
195
|
-
const descriptor = undefined;
|
321
|
+
const descriptor = this.descriptors.longrunning[methodName] || undefined;
|
196
322
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
197
323
|
this.innerApiCalls[methodName] = apiCall;
|
198
324
|
}
|
@@ -200,19 +326,38 @@ class CompletionServiceClient {
|
|
200
326
|
}
|
201
327
|
/**
|
202
328
|
* The DNS address for this API service.
|
329
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
203
330
|
* @returns {string} The DNS address for this service.
|
204
331
|
*/
|
205
332
|
static get servicePath() {
|
333
|
+
if (typeof process !== undefined &&
|
334
|
+
typeof process.emitWarning === 'function') {
|
335
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
336
|
+
}
|
206
337
|
return 'discoveryengine.googleapis.com';
|
207
338
|
}
|
208
339
|
/**
|
209
|
-
* The DNS address for this API service - same as servicePath
|
210
|
-
*
|
340
|
+
* The DNS address for this API service - same as servicePath.
|
341
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
211
342
|
* @returns {string} The DNS address for this service.
|
212
343
|
*/
|
213
344
|
static get apiEndpoint() {
|
345
|
+
if (typeof process !== undefined &&
|
346
|
+
typeof process.emitWarning === 'function') {
|
347
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
348
|
+
}
|
214
349
|
return 'discoveryengine.googleapis.com';
|
215
350
|
}
|
351
|
+
/**
|
352
|
+
* The DNS address for this API service.
|
353
|
+
* @returns {string} The DNS address for this service.
|
354
|
+
*/
|
355
|
+
get apiEndpoint() {
|
356
|
+
return this._servicePath;
|
357
|
+
}
|
358
|
+
get universeDomain() {
|
359
|
+
return this._universeDomain;
|
360
|
+
}
|
216
361
|
/**
|
217
362
|
* The port for this API service.
|
218
363
|
* @returns {number} The default port for this service.
|
@@ -260,6 +405,82 @@ class CompletionServiceClient {
|
|
260
405
|
this.initialize();
|
261
406
|
return this.innerApiCalls.completeQuery(request, options, callback);
|
262
407
|
}
|
408
|
+
importSuggestionDenyListEntries(request, optionsOrCallback, callback) {
|
409
|
+
var _a;
|
410
|
+
request = request || {};
|
411
|
+
let options;
|
412
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
413
|
+
callback = optionsOrCallback;
|
414
|
+
options = {};
|
415
|
+
}
|
416
|
+
else {
|
417
|
+
options = optionsOrCallback;
|
418
|
+
}
|
419
|
+
options = options || {};
|
420
|
+
options.otherArgs = options.otherArgs || {};
|
421
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
422
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
423
|
+
this._gaxModule.routingHeader.fromParams({
|
424
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
425
|
+
});
|
426
|
+
this.initialize();
|
427
|
+
return this.innerApiCalls.importSuggestionDenyListEntries(request, options, callback);
|
428
|
+
}
|
429
|
+
/**
|
430
|
+
* Check the status of the long running operation returned by `importSuggestionDenyListEntries()`.
|
431
|
+
* @param {String} name
|
432
|
+
* The operation name that will be passed.
|
433
|
+
* @returns {Promise} - The promise which resolves to an object.
|
434
|
+
* The decoded operation object has result and metadata field to get information from.
|
435
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
436
|
+
* for more details and examples.
|
437
|
+
* @example <caption>include:samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js</caption>
|
438
|
+
* region_tag:discoveryengine_v1_generated_CompletionService_ImportSuggestionDenyListEntries_async
|
439
|
+
*/
|
440
|
+
async checkImportSuggestionDenyListEntriesProgress(name) {
|
441
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
442
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
443
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importSuggestionDenyListEntries, this._gaxModule.createDefaultBackoffSettings());
|
444
|
+
return decodeOperation;
|
445
|
+
}
|
446
|
+
purgeSuggestionDenyListEntries(request, optionsOrCallback, callback) {
|
447
|
+
var _a;
|
448
|
+
request = request || {};
|
449
|
+
let options;
|
450
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
451
|
+
callback = optionsOrCallback;
|
452
|
+
options = {};
|
453
|
+
}
|
454
|
+
else {
|
455
|
+
options = optionsOrCallback;
|
456
|
+
}
|
457
|
+
options = options || {};
|
458
|
+
options.otherArgs = options.otherArgs || {};
|
459
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
460
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
461
|
+
this._gaxModule.routingHeader.fromParams({
|
462
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
463
|
+
});
|
464
|
+
this.initialize();
|
465
|
+
return this.innerApiCalls.purgeSuggestionDenyListEntries(request, options, callback);
|
466
|
+
}
|
467
|
+
/**
|
468
|
+
* Check the status of the long running operation returned by `purgeSuggestionDenyListEntries()`.
|
469
|
+
* @param {String} name
|
470
|
+
* The operation name that will be passed.
|
471
|
+
* @returns {Promise} - The promise which resolves to an object.
|
472
|
+
* The decoded operation object has result and metadata field to get information from.
|
473
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
474
|
+
* for more details and examples.
|
475
|
+
* @example <caption>include:samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js</caption>
|
476
|
+
* region_tag:discoveryengine_v1_generated_CompletionService_PurgeSuggestionDenyListEntries_async
|
477
|
+
*/
|
478
|
+
async checkPurgeSuggestionDenyListEntriesProgress(name) {
|
479
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
480
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
481
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeSuggestionDenyListEntries, this._gaxModule.createDefaultBackoffSettings());
|
482
|
+
return decodeOperation;
|
483
|
+
}
|
263
484
|
/**
|
264
485
|
* Gets information about a location.
|
265
486
|
*
|
@@ -315,9 +536,194 @@ class CompletionServiceClient {
|
|
315
536
|
listLocationsAsync(request, options) {
|
316
537
|
return this.locationsClient.listLocationsAsync(request, options);
|
317
538
|
}
|
539
|
+
/**
|
540
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
541
|
+
* method to poll the operation result at intervals as recommended by the API
|
542
|
+
* service.
|
543
|
+
*
|
544
|
+
* @param {Object} request - The request object that will be sent.
|
545
|
+
* @param {string} request.name - The name of the operation resource.
|
546
|
+
* @param {Object=} options
|
547
|
+
* Optional parameters. You can override the default settings for this call,
|
548
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
549
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
550
|
+
* for the details.
|
551
|
+
* @param {function(?Error, ?Object)=} callback
|
552
|
+
* The function which will be called with the result of the API call.
|
553
|
+
*
|
554
|
+
* The second parameter to the callback is an object representing
|
555
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
556
|
+
* @return {Promise} - The promise which resolves to an array.
|
557
|
+
* The first element of the array is an object representing
|
558
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
559
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
560
|
+
*
|
561
|
+
* @example
|
562
|
+
* ```
|
563
|
+
* const client = longrunning.operationsClient();
|
564
|
+
* const name = '';
|
565
|
+
* const [response] = await client.getOperation({name});
|
566
|
+
* // doThingsWith(response)
|
567
|
+
* ```
|
568
|
+
*/
|
569
|
+
getOperation(request, options, callback) {
|
570
|
+
return this.operationsClient.getOperation(request, options, callback);
|
571
|
+
}
|
572
|
+
/**
|
573
|
+
* Lists operations that match the specified filter in the request. If the
|
574
|
+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
|
575
|
+
*
|
576
|
+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
|
577
|
+
*
|
578
|
+
* @param {Object} request - The request object that will be sent.
|
579
|
+
* @param {string} request.name - The name of the operation collection.
|
580
|
+
* @param {string} request.filter - The standard list filter.
|
581
|
+
* @param {number=} request.pageSize -
|
582
|
+
* The maximum number of resources contained in the underlying API
|
583
|
+
* response. If page streaming is performed per-resource, this
|
584
|
+
* parameter does not affect the return value. If page streaming is
|
585
|
+
* performed per-page, this determines the maximum number of
|
586
|
+
* resources in a page.
|
587
|
+
* @param {Object=} options
|
588
|
+
* Optional parameters. You can override the default settings for this call,
|
589
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
590
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
591
|
+
* details.
|
592
|
+
* @returns {Object}
|
593
|
+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
|
594
|
+
*
|
595
|
+
* @example
|
596
|
+
* ```
|
597
|
+
* const client = longrunning.operationsClient();
|
598
|
+
* for await (const response of client.listOperationsAsync(request));
|
599
|
+
* // doThingsWith(response)
|
600
|
+
* ```
|
601
|
+
*/
|
602
|
+
listOperationsAsync(request, options) {
|
603
|
+
return this.operationsClient.listOperationsAsync(request, options);
|
604
|
+
}
|
605
|
+
/**
|
606
|
+
* Starts asynchronous cancellation on a long-running operation. The server
|
607
|
+
* makes a best effort to cancel the operation, but success is not
|
608
|
+
* guaranteed. If the server doesn't support this method, it returns
|
609
|
+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
610
|
+
* {@link Operations.GetOperation} or
|
611
|
+
* other methods to check whether the cancellation succeeded or whether the
|
612
|
+
* operation completed despite cancellation. On successful cancellation,
|
613
|
+
* the operation is not deleted; instead, it becomes an operation with
|
614
|
+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
|
615
|
+
* 1, corresponding to `Code.CANCELLED`.
|
616
|
+
*
|
617
|
+
* @param {Object} request - The request object that will be sent.
|
618
|
+
* @param {string} request.name - The name of the operation resource to be cancelled.
|
619
|
+
* @param {Object=} options
|
620
|
+
* Optional parameters. You can override the default settings for this call,
|
621
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
622
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
623
|
+
* details.
|
624
|
+
* @param {function(?Error)=} callback
|
625
|
+
* The function which will be called with the result of the API call.
|
626
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
627
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
628
|
+
* call.
|
629
|
+
*
|
630
|
+
* @example
|
631
|
+
* ```
|
632
|
+
* const client = longrunning.operationsClient();
|
633
|
+
* await client.cancelOperation({name: ''});
|
634
|
+
* ```
|
635
|
+
*/
|
636
|
+
cancelOperation(request, options, callback) {
|
637
|
+
return this.operationsClient.cancelOperation(request, options, callback);
|
638
|
+
}
|
639
|
+
/**
|
640
|
+
* Deletes a long-running operation. This method indicates that the client is
|
641
|
+
* no longer interested in the operation result. It does not cancel the
|
642
|
+
* operation. If the server doesn't support this method, it returns
|
643
|
+
* `google.rpc.Code.UNIMPLEMENTED`.
|
644
|
+
*
|
645
|
+
* @param {Object} request - The request object that will be sent.
|
646
|
+
* @param {string} request.name - The name of the operation resource to be deleted.
|
647
|
+
* @param {Object=} options
|
648
|
+
* Optional parameters. You can override the default settings for this call,
|
649
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
650
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
651
|
+
* for the details.
|
652
|
+
* @param {function(?Error)=} callback
|
653
|
+
* The function which will be called with the result of the API call.
|
654
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
655
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
656
|
+
* call.
|
657
|
+
*
|
658
|
+
* @example
|
659
|
+
* ```
|
660
|
+
* const client = longrunning.operationsClient();
|
661
|
+
* await client.deleteOperation({name: ''});
|
662
|
+
* ```
|
663
|
+
*/
|
664
|
+
deleteOperation(request, options, callback) {
|
665
|
+
return this.operationsClient.deleteOperation(request, options, callback);
|
666
|
+
}
|
318
667
|
// --------------------
|
319
668
|
// -- Path templates --
|
320
669
|
// --------------------
|
670
|
+
/**
|
671
|
+
* Return a fully-qualified engine resource name string.
|
672
|
+
*
|
673
|
+
* @param {string} project
|
674
|
+
* @param {string} location
|
675
|
+
* @param {string} collection
|
676
|
+
* @param {string} engine
|
677
|
+
* @returns {string} Resource name string.
|
678
|
+
*/
|
679
|
+
enginePath(project, location, collection, engine) {
|
680
|
+
return this.pathTemplates.enginePathTemplate.render({
|
681
|
+
project: project,
|
682
|
+
location: location,
|
683
|
+
collection: collection,
|
684
|
+
engine: engine,
|
685
|
+
});
|
686
|
+
}
|
687
|
+
/**
|
688
|
+
* Parse the project from Engine resource.
|
689
|
+
*
|
690
|
+
* @param {string} engineName
|
691
|
+
* A fully-qualified path representing Engine resource.
|
692
|
+
* @returns {string} A string representing the project.
|
693
|
+
*/
|
694
|
+
matchProjectFromEngineName(engineName) {
|
695
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).project;
|
696
|
+
}
|
697
|
+
/**
|
698
|
+
* Parse the location from Engine resource.
|
699
|
+
*
|
700
|
+
* @param {string} engineName
|
701
|
+
* A fully-qualified path representing Engine resource.
|
702
|
+
* @returns {string} A string representing the location.
|
703
|
+
*/
|
704
|
+
matchLocationFromEngineName(engineName) {
|
705
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).location;
|
706
|
+
}
|
707
|
+
/**
|
708
|
+
* Parse the collection from Engine resource.
|
709
|
+
*
|
710
|
+
* @param {string} engineName
|
711
|
+
* A fully-qualified path representing Engine resource.
|
712
|
+
* @returns {string} A string representing the collection.
|
713
|
+
*/
|
714
|
+
matchCollectionFromEngineName(engineName) {
|
715
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).collection;
|
716
|
+
}
|
717
|
+
/**
|
718
|
+
* Parse the engine from Engine resource.
|
719
|
+
*
|
720
|
+
* @param {string} engineName
|
721
|
+
* A fully-qualified path representing Engine resource.
|
722
|
+
* @returns {string} A string representing the engine.
|
723
|
+
*/
|
724
|
+
matchEngineFromEngineName(engineName) {
|
725
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
726
|
+
}
|
321
727
|
/**
|
322
728
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
323
729
|
*
|
@@ -594,6 +1000,201 @@ class CompletionServiceClient {
|
|
594
1000
|
matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
595
1001
|
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
|
596
1002
|
}
|
1003
|
+
/**
|
1004
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngine resource name string.
|
1005
|
+
*
|
1006
|
+
* @param {string} project
|
1007
|
+
* @param {string} location
|
1008
|
+
* @param {string} collection
|
1009
|
+
* @param {string} data_store
|
1010
|
+
* @returns {string} Resource name string.
|
1011
|
+
*/
|
1012
|
+
projectLocationCollectionDataStoreSiteSearchEnginePath(project, location, collection, dataStore) {
|
1013
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render({
|
1014
|
+
project: project,
|
1015
|
+
location: location,
|
1016
|
+
collection: collection,
|
1017
|
+
data_store: dataStore,
|
1018
|
+
});
|
1019
|
+
}
|
1020
|
+
/**
|
1021
|
+
* Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
|
1022
|
+
*
|
1023
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
|
1024
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
|
1025
|
+
* @returns {string} A string representing the project.
|
1026
|
+
*/
|
1027
|
+
matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
|
1028
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).project;
|
1029
|
+
}
|
1030
|
+
/**
|
1031
|
+
* Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
|
1032
|
+
*
|
1033
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
|
1034
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
|
1035
|
+
* @returns {string} A string representing the location.
|
1036
|
+
*/
|
1037
|
+
matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
|
1038
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).location;
|
1039
|
+
}
|
1040
|
+
/**
|
1041
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
|
1042
|
+
*
|
1043
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
|
1044
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
|
1045
|
+
* @returns {string} A string representing the collection.
|
1046
|
+
*/
|
1047
|
+
matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
|
1048
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).collection;
|
1049
|
+
}
|
1050
|
+
/**
|
1051
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
|
1052
|
+
*
|
1053
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
|
1054
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
|
1055
|
+
* @returns {string} A string representing the data_store.
|
1056
|
+
*/
|
1057
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
|
1058
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
|
1059
|
+
}
|
1060
|
+
/**
|
1061
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
|
1062
|
+
*
|
1063
|
+
* @param {string} project
|
1064
|
+
* @param {string} location
|
1065
|
+
* @param {string} collection
|
1066
|
+
* @param {string} data_store
|
1067
|
+
* @param {string} target_site
|
1068
|
+
* @returns {string} Resource name string.
|
1069
|
+
*/
|
1070
|
+
projectLocationCollectionDataStoreSiteSearchEngineTargetSitePath(project, location, collection, dataStore, targetSite) {
|
1071
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render({
|
1072
|
+
project: project,
|
1073
|
+
location: location,
|
1074
|
+
collection: collection,
|
1075
|
+
data_store: dataStore,
|
1076
|
+
target_site: targetSite,
|
1077
|
+
});
|
1078
|
+
}
|
1079
|
+
/**
|
1080
|
+
* Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
|
1081
|
+
*
|
1082
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
|
1083
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
|
1084
|
+
* @returns {string} A string representing the project.
|
1085
|
+
*/
|
1086
|
+
matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
|
1087
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).project;
|
1088
|
+
}
|
1089
|
+
/**
|
1090
|
+
* Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
|
1091
|
+
*
|
1092
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
|
1093
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
|
1094
|
+
* @returns {string} A string representing the location.
|
1095
|
+
*/
|
1096
|
+
matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
|
1097
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).location;
|
1098
|
+
}
|
1099
|
+
/**
|
1100
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
|
1101
|
+
*
|
1102
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
|
1103
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
|
1104
|
+
* @returns {string} A string representing the collection.
|
1105
|
+
*/
|
1106
|
+
matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
|
1107
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).collection;
|
1108
|
+
}
|
1109
|
+
/**
|
1110
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
|
1111
|
+
*
|
1112
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
|
1113
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
|
1114
|
+
* @returns {string} A string representing the data_store.
|
1115
|
+
*/
|
1116
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
|
1117
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).data_store;
|
1118
|
+
}
|
1119
|
+
/**
|
1120
|
+
* Parse the target_site from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
|
1121
|
+
*
|
1122
|
+
* @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
|
1123
|
+
* A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
|
1124
|
+
* @returns {string} A string representing the target_site.
|
1125
|
+
*/
|
1126
|
+
matchTargetSiteFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
|
1127
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).target_site;
|
1128
|
+
}
|
1129
|
+
/**
|
1130
|
+
* Return a fully-qualified projectLocationCollectionEngineConversation resource name string.
|
1131
|
+
*
|
1132
|
+
* @param {string} project
|
1133
|
+
* @param {string} location
|
1134
|
+
* @param {string} collection
|
1135
|
+
* @param {string} engine
|
1136
|
+
* @param {string} conversation
|
1137
|
+
* @returns {string} Resource name string.
|
1138
|
+
*/
|
1139
|
+
projectLocationCollectionEngineConversationPath(project, location, collection, engine, conversation) {
|
1140
|
+
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render({
|
1141
|
+
project: project,
|
1142
|
+
location: location,
|
1143
|
+
collection: collection,
|
1144
|
+
engine: engine,
|
1145
|
+
conversation: conversation,
|
1146
|
+
});
|
1147
|
+
}
|
1148
|
+
/**
|
1149
|
+
* Parse the project from ProjectLocationCollectionEngineConversation resource.
|
1150
|
+
*
|
1151
|
+
* @param {string} projectLocationCollectionEngineConversationName
|
1152
|
+
* A fully-qualified path representing project_location_collection_engine_conversation resource.
|
1153
|
+
* @returns {string} A string representing the project.
|
1154
|
+
*/
|
1155
|
+
matchProjectFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
|
1156
|
+
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).project;
|
1157
|
+
}
|
1158
|
+
/**
|
1159
|
+
* Parse the location from ProjectLocationCollectionEngineConversation resource.
|
1160
|
+
*
|
1161
|
+
* @param {string} projectLocationCollectionEngineConversationName
|
1162
|
+
* A fully-qualified path representing project_location_collection_engine_conversation resource.
|
1163
|
+
* @returns {string} A string representing the location.
|
1164
|
+
*/
|
1165
|
+
matchLocationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
|
1166
|
+
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).location;
|
1167
|
+
}
|
1168
|
+
/**
|
1169
|
+
* Parse the collection from ProjectLocationCollectionEngineConversation resource.
|
1170
|
+
*
|
1171
|
+
* @param {string} projectLocationCollectionEngineConversationName
|
1172
|
+
* A fully-qualified path representing project_location_collection_engine_conversation resource.
|
1173
|
+
* @returns {string} A string representing the collection.
|
1174
|
+
*/
|
1175
|
+
matchCollectionFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
|
1176
|
+
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).collection;
|
1177
|
+
}
|
1178
|
+
/**
|
1179
|
+
* Parse the engine from ProjectLocationCollectionEngineConversation resource.
|
1180
|
+
*
|
1181
|
+
* @param {string} projectLocationCollectionEngineConversationName
|
1182
|
+
* A fully-qualified path representing project_location_collection_engine_conversation resource.
|
1183
|
+
* @returns {string} A string representing the engine.
|
1184
|
+
*/
|
1185
|
+
matchEngineFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
|
1186
|
+
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).engine;
|
1187
|
+
}
|
1188
|
+
/**
|
1189
|
+
* Parse the conversation from ProjectLocationCollectionEngineConversation resource.
|
1190
|
+
*
|
1191
|
+
* @param {string} projectLocationCollectionEngineConversationName
|
1192
|
+
* A fully-qualified path representing project_location_collection_engine_conversation resource.
|
1193
|
+
* @returns {string} A string representing the conversation.
|
1194
|
+
*/
|
1195
|
+
matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
|
1196
|
+
return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
|
1197
|
+
}
|
597
1198
|
/**
|
598
1199
|
* Return a fully-qualified projectLocationDataStore resource name string.
|
599
1200
|
*
|
@@ -822,6 +1423,108 @@ class CompletionServiceClient {
|
|
822
1423
|
matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
823
1424
|
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
|
824
1425
|
}
|
1426
|
+
/**
|
1427
|
+
* Return a fully-qualified projectLocationDataStoreSiteSearchEngine resource name string.
|
1428
|
+
*
|
1429
|
+
* @param {string} project
|
1430
|
+
* @param {string} location
|
1431
|
+
* @param {string} data_store
|
1432
|
+
* @returns {string} Resource name string.
|
1433
|
+
*/
|
1434
|
+
projectLocationDataStoreSiteSearchEnginePath(project, location, dataStore) {
|
1435
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render({
|
1436
|
+
project: project,
|
1437
|
+
location: location,
|
1438
|
+
data_store: dataStore,
|
1439
|
+
});
|
1440
|
+
}
|
1441
|
+
/**
|
1442
|
+
* Parse the project from ProjectLocationDataStoreSiteSearchEngine resource.
|
1443
|
+
*
|
1444
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineName
|
1445
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
|
1446
|
+
* @returns {string} A string representing the project.
|
1447
|
+
*/
|
1448
|
+
matchProjectFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
|
1449
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).project;
|
1450
|
+
}
|
1451
|
+
/**
|
1452
|
+
* Parse the location from ProjectLocationDataStoreSiteSearchEngine resource.
|
1453
|
+
*
|
1454
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineName
|
1455
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
|
1456
|
+
* @returns {string} A string representing the location.
|
1457
|
+
*/
|
1458
|
+
matchLocationFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
|
1459
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).location;
|
1460
|
+
}
|
1461
|
+
/**
|
1462
|
+
* Parse the data_store from ProjectLocationDataStoreSiteSearchEngine resource.
|
1463
|
+
*
|
1464
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineName
|
1465
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
|
1466
|
+
* @returns {string} A string representing the data_store.
|
1467
|
+
*/
|
1468
|
+
matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
|
1469
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
|
1470
|
+
}
|
1471
|
+
/**
|
1472
|
+
* Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
|
1473
|
+
*
|
1474
|
+
* @param {string} project
|
1475
|
+
* @param {string} location
|
1476
|
+
* @param {string} data_store
|
1477
|
+
* @param {string} target_site
|
1478
|
+
* @returns {string} Resource name string.
|
1479
|
+
*/
|
1480
|
+
projectLocationDataStoreSiteSearchEngineTargetSitePath(project, location, dataStore, targetSite) {
|
1481
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render({
|
1482
|
+
project: project,
|
1483
|
+
location: location,
|
1484
|
+
data_store: dataStore,
|
1485
|
+
target_site: targetSite,
|
1486
|
+
});
|
1487
|
+
}
|
1488
|
+
/**
|
1489
|
+
* Parse the project from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
|
1490
|
+
*
|
1491
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
|
1492
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
|
1493
|
+
* @returns {string} A string representing the project.
|
1494
|
+
*/
|
1495
|
+
matchProjectFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
|
1496
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).project;
|
1497
|
+
}
|
1498
|
+
/**
|
1499
|
+
* Parse the location from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
|
1500
|
+
*
|
1501
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
|
1502
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
|
1503
|
+
* @returns {string} A string representing the location.
|
1504
|
+
*/
|
1505
|
+
matchLocationFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
|
1506
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).location;
|
1507
|
+
}
|
1508
|
+
/**
|
1509
|
+
* Parse the data_store from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
|
1510
|
+
*
|
1511
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
|
1512
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
|
1513
|
+
* @returns {string} A string representing the data_store.
|
1514
|
+
*/
|
1515
|
+
matchDataStoreFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
|
1516
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).data_store;
|
1517
|
+
}
|
1518
|
+
/**
|
1519
|
+
* Parse the target_site from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
|
1520
|
+
*
|
1521
|
+
* @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
|
1522
|
+
* A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
|
1523
|
+
* @returns {string} A string representing the target_site.
|
1524
|
+
*/
|
1525
|
+
matchTargetSiteFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
|
1526
|
+
return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).target_site;
|
1527
|
+
}
|
825
1528
|
/**
|
826
1529
|
* Terminate the gRPC channel and close the client.
|
827
1530
|
*
|
@@ -834,6 +1537,7 @@ class CompletionServiceClient {
|
|
834
1537
|
this._terminated = true;
|
835
1538
|
stub.close();
|
836
1539
|
this.locationsClient.close();
|
1540
|
+
this.operationsClient.close();
|
837
1541
|
});
|
838
1542
|
}
|
839
1543
|
return Promise.resolve();
|