From f13c687a73fed4980aef6f6974bc006661e15946 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 28 Mar 2019 20:52:31 -0700 Subject: [PATCH] fix: include 'x-goog-request-params' header in requests (#310) --- .../src/v2/agents_client.js | 42 +++++++++++ .../src/v2/contexts_client.js | 42 +++++++++++ .../src/v2/entity_types_client.js | 70 +++++++++++++++++++ .../src/v2/intents_client.js | 49 +++++++++++++ .../src/v2/session_entity_types_client.js | 35 ++++++++++ .../src/v2/sessions_client.js | 7 ++ .../src/v2beta1/agents_client.js | 42 +++++++++++ .../src/v2beta1/contexts_client.js | 42 +++++++++++ .../src/v2beta1/documents_client.js | 28 ++++++++ .../src/v2beta1/entity_types_client.js | 70 +++++++++++++++++++ .../src/v2beta1/intents_client.js | 49 +++++++++++++ .../src/v2beta1/knowledge_bases_client.js | 28 ++++++++ .../v2beta1/session_entity_types_client.js | 35 ++++++++++ .../src/v2beta1/sessions_client.js | 7 ++ .../google-cloud-dialogflow/synth.metadata | 10 +-- 15 files changed, 551 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-dialogflow/src/v2/agents_client.js b/packages/google-cloud-dialogflow/src/v2/agents_client.js index 5140ea0c007..4c30a0bfb74 100644 --- a/packages/google-cloud-dialogflow/src/v2/agents_client.js +++ b/packages/google-cloud-dialogflow/src/v2/agents_client.js @@ -326,6 +326,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.getAgent(request, options, callback); } @@ -427,6 +434,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.searchAgents(request, options, callback); } @@ -577,6 +591,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.trainAgent(request, options, callback); } @@ -676,6 +697,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.exportAgent(request, options, callback); } @@ -792,6 +820,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.importAgent(request, options, callback); } @@ -907,6 +942,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.restoreAgent(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2/contexts_client.js b/packages/google-cloud-dialogflow/src/v2/contexts_client.js index 1ba86c6f4eb..13b1634d9bb 100644 --- a/packages/google-cloud-dialogflow/src/v2/contexts_client.js +++ b/packages/google-cloud-dialogflow/src/v2/contexts_client.js @@ -310,6 +310,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listContexts(request, options, callback); } @@ -413,6 +420,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getContext(request, options, callback); } @@ -469,6 +483,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createContext(request, options, callback); } @@ -521,6 +542,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'context.name': request.context.name, + }); return this._innerApiCalls.updateContext(request, options, callback); } @@ -560,6 +588,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteContext(request, options, callback); } @@ -599,6 +634,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.deleteAllContexts(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2/entity_types_client.js b/packages/google-cloud-dialogflow/src/v2/entity_types_client.js index a6d3b21c8b4..d8f06018fca 100644 --- a/packages/google-cloud-dialogflow/src/v2/entity_types_client.js +++ b/packages/google-cloud-dialogflow/src/v2/entity_types_client.js @@ -419,6 +419,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listEntityTypes(request, options, callback); } @@ -534,6 +541,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getEntityType(request, options, callback); } @@ -596,6 +610,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createEntityType(request, options, callback); } @@ -655,6 +676,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'entity_type.name': request.entityType.name, + }); return this._innerApiCalls.updateEntityType(request, options, callback); } @@ -694,6 +722,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteEntityType(request, options, callback); } @@ -808,6 +843,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchUpdateEntityTypes( request, @@ -924,6 +966,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchDeleteEntityTypes( request, @@ -1047,6 +1096,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchCreateEntities(request, options, callback); } @@ -1171,6 +1227,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchUpdateEntities(request, options, callback); } @@ -1290,6 +1353,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchDeleteEntities(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2/intents_client.js b/packages/google-cloud-dialogflow/src/v2/intents_client.js index ef82eef56b9..8282cf8b57f 100644 --- a/packages/google-cloud-dialogflow/src/v2/intents_client.js +++ b/packages/google-cloud-dialogflow/src/v2/intents_client.js @@ -385,6 +385,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listIntents(request, options, callback); } @@ -508,6 +515,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getIntent(request, options, callback); } @@ -574,6 +588,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createIntent(request, options, callback); } @@ -642,6 +663,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'intent.name': request.intent.name, + }); return this._innerApiCalls.updateIntent(request, options, callback); } @@ -681,6 +709,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteIntent(request, options, callback); } @@ -812,6 +847,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchUpdateIntents(request, options, callback); } @@ -925,6 +967,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchDeleteIntents(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.js b/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.js index a5fd13e7f5a..104adde4ce3 100644 --- a/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.js +++ b/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.js @@ -304,6 +304,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listSessionEntityTypes( request, @@ -412,6 +419,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getSessionEntityType(request, options, callback); } @@ -468,6 +482,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createSessionEntityType( request, @@ -526,6 +547,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'session_entity_type.name': request.sessionEntityType.name, + }); return this._innerApiCalls.updateSessionEntityType( request, @@ -570,6 +598,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteSessionEntityType( request, diff --git a/packages/google-cloud-dialogflow/src/v2/sessions_client.js b/packages/google-cloud-dialogflow/src/v2/sessions_client.js index 0f629548494..d89e7d85d80 100644 --- a/packages/google-cloud-dialogflow/src/v2/sessions_client.js +++ b/packages/google-cloud-dialogflow/src/v2/sessions_client.js @@ -267,6 +267,13 @@ class SessionsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + session: request.session, + }); return this._innerApiCalls.detectIntent(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/agents_client.js b/packages/google-cloud-dialogflow/src/v2beta1/agents_client.js index b424c699523..e6825834411 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/agents_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/agents_client.js @@ -327,6 +327,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.getAgent(request, options, callback); } @@ -428,6 +435,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.searchAgents(request, options, callback); } @@ -579,6 +593,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.trainAgent(request, options, callback); } @@ -681,6 +702,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.exportAgent(request, options, callback); } @@ -798,6 +826,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.importAgent(request, options, callback); } @@ -914,6 +949,13 @@ class AgentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.restoreAgent(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.js b/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.js index 8da8091cfc8..d05cae3250f 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.js @@ -320,6 +320,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listContexts(request, options, callback); } @@ -431,6 +438,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getContext(request, options, callback); } @@ -491,6 +505,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createContext(request, options, callback); } @@ -543,6 +564,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'context.name': request.context.name, + }); return this._innerApiCalls.updateContext(request, options, callback); } @@ -586,6 +614,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteContext(request, options, callback); } @@ -628,6 +663,13 @@ class ContextsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.deleteAllContexts(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/documents_client.js b/packages/google-cloud-dialogflow/src/v2beta1/documents_client.js index 82e4cc1c7f1..c7f46ced710 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/documents_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/documents_client.js @@ -339,6 +339,13 @@ class DocumentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listDocuments(request, options, callback); } @@ -443,6 +450,13 @@ class DocumentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getDocument(request, options, callback); } @@ -557,6 +571,13 @@ class DocumentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createDocument(request, options, callback); } @@ -653,6 +674,13 @@ class DocumentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteDocument(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.js b/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.js index f188b8b5c40..f345f4a3c41 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.js @@ -420,6 +420,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listEntityTypes(request, options, callback); } @@ -535,6 +542,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getEntityType(request, options, callback); } @@ -597,6 +611,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createEntityType(request, options, callback); } @@ -656,6 +677,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'entity_type.name': request.entityType.name, + }); return this._innerApiCalls.updateEntityType(request, options, callback); } @@ -695,6 +723,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteEntityType(request, options, callback); } @@ -809,6 +844,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchUpdateEntityTypes( request, @@ -925,6 +967,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchDeleteEntityTypes( request, @@ -1048,6 +1097,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchCreateEntities(request, options, callback); } @@ -1172,6 +1228,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchUpdateEntities(request, options, callback); } @@ -1291,6 +1354,13 @@ class EntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchDeleteEntities(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/intents_client.js b/packages/google-cloud-dialogflow/src/v2beta1/intents_client.js index 257a3557455..4ad2b2f6f77 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/intents_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/intents_client.js @@ -382,6 +382,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listIntents(request, options, callback); } @@ -505,6 +512,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getIntent(request, options, callback); } @@ -571,6 +585,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createIntent(request, options, callback); } @@ -639,6 +660,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'intent.name': request.intent.name, + }); return this._innerApiCalls.updateIntent(request, options, callback); } @@ -678,6 +706,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteIntent(request, options, callback); } @@ -809,6 +844,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchUpdateIntents(request, options, callback); } @@ -922,6 +964,13 @@ class IntentsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.batchDeleteIntents(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.js b/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.js index ee60b41f527..92b5d820e01 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.js @@ -292,6 +292,13 @@ class KnowledgeBasesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listKnowledgeBases(request, options, callback); } @@ -395,6 +402,13 @@ class KnowledgeBasesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getKnowledgeBase(request, options, callback); } @@ -451,6 +465,13 @@ class KnowledgeBasesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createKnowledgeBase(request, options, callback); } @@ -493,6 +514,13 @@ class KnowledgeBasesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteKnowledgeBase(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.js b/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.js index 6453258222e..6ca74e4bb16 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.js @@ -314,6 +314,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.listSessionEntityTypes( request, @@ -429,6 +436,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.getSessionEntityType(request, options, callback); } @@ -489,6 +503,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent, + }); return this._innerApiCalls.createSessionEntityType( request, @@ -550,6 +571,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'session_entity_type.name': request.sessionEntityType.name, + }); return this._innerApiCalls.updateSessionEntityType( request, @@ -597,6 +625,13 @@ class SessionEntityTypesClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name, + }); return this._innerApiCalls.deleteSessionEntityType( request, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.js b/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.js index 58bfbaa2d6a..ece14de9f63 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.js +++ b/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.js @@ -280,6 +280,13 @@ class SessionsClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + session: request.session, + }); return this._innerApiCalls.detectIntent(request, options, callback); } diff --git a/packages/google-cloud-dialogflow/synth.metadata b/packages/google-cloud-dialogflow/synth.metadata index 7a62b0cc3f6..18bb1eef69e 100644 --- a/packages/google-cloud-dialogflow/synth.metadata +++ b/packages/google-cloud-dialogflow/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-13T11:12:04.998039Z", + "updateTime": "2019-03-28T11:30:21.166786Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.17", - "dockerImage": "googleapis/artman@sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e340f4a01ec287f7bb86e2331b5e98c473d10afd", - "internalRef": "238151361" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } }, {