Skip to content

Commit a844577

Browse files
jmukstephenplusplus
authored andcommitted
Regenerate the codegen files to sync with the latest version. (#1640)
1 parent 72002ff commit a844577

2 files changed

Lines changed: 40 additions & 36 deletions

File tree

packages/google-cloud-speech/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@
5555
],
5656
"dependencies": {
5757
"@google-cloud/common": "^0.6.0",
58-
"arguejs": "^0.2.3",
5958
"events-intercept": "^2.0.0",
6059
"extend": "^3.0.0",
61-
"google-gax": "^0.6.0",
60+
"google-gax": "^0.7.0",
6261
"google-proto-files": "^0.8.0",
6362
"is": "^3.1.0",
6463
"modelo": "^4.2.0",

packages/google-cloud-speech/src/v1beta1/speech_api.js

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
/* jscs: disable maximumLineLength */
2828
'use strict';
2929

30-
var arguejs = require('arguejs');
3130
var configData = require('./speech_client_config');
3231
var extend = require('extend');
3332
var gax = require('google-gax');
@@ -38,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443;
3837

3938
var CODE_GEN_NAME_VERSION = 'gapic/0.1.0';
4039

41-
var DEFAULT_TIMEOUT = 30;
4240

4341
/**
4442
* The scopes needed to make gRPC calls to all of the methods defined in
@@ -69,7 +67,6 @@ function SpeechApi(gaxGrpc, grpcClients, opts) {
6967
var port = opts.port || DEFAULT_SERVICE_PORT;
7068
var sslCreds = opts.sslCreds || null;
7169
var clientConfig = opts.clientConfig || {};
72-
var timeout = opts.timeout || DEFAULT_TIMEOUT;
7370
var appName = opts.appName || 'gax';
7471
var appVersion = opts.appVersion || gax.version;
7572

@@ -83,7 +80,6 @@ function SpeechApi(gaxGrpc, grpcClients, opts) {
8380
'google.cloud.speech.v1beta1.Speech',
8481
configData,
8582
clientConfig,
86-
timeout,
8783
null,
8884
null,
8985
{'x-goog-api-client': googleApiClient});
@@ -121,9 +117,9 @@ function SpeechApi(gaxGrpc, grpcClients, opts) {
121117
* [Required] The audio data to be recognized.
122118
*
123119
* This object should have the same structure as [RecognitionAudio]{@link RecognitionAudio}
124-
* @param {gax.CallOptions=} options
125-
* Overrides the default settings for this call, e.g, timeout,
126-
* retries, etc.
120+
* @param {Object=} options
121+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
122+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
127123
* @param {function(?Error, ?Object)=} callback
128124
* The function which will be called with the result of the API call.
129125
*
@@ -144,24 +140,30 @@ function SpeechApi(gaxGrpc, grpcClients, opts) {
144140
* // doThingsWith(response)
145141
* });
146142
*/
147-
SpeechApi.prototype.syncRecognize = function syncRecognize() {
148-
var args = arguejs({
149-
config: Object,
150-
audio: Object,
151-
options: [gax.CallOptions],
152-
callback: [Function]
153-
}, arguments);
143+
SpeechApi.prototype.syncRecognize = function syncRecognize(
144+
config,
145+
audio,
146+
options,
147+
callback) {
148+
if (options instanceof Function && callback === undefined) {
149+
callback = options;
150+
options = {};
151+
}
152+
if (options === undefined) {
153+
options = {};
154+
}
154155
var req = {
155-
config: args.config,
156-
audio: args.audio
156+
config: config,
157+
audio: audio
157158
};
158-
return this._syncRecognize(req, args.options, args.callback);
159+
return this._syncRecognize(req, options, callback);
159160
};
160161

161162
/**
162163
* Perform asynchronous speech-recognition: receive results via the
163-
* google.longrunning.Operations interface. `Operation.response` returns
164-
* `AsyncRecognizeResponse`.
164+
* google.longrunning.Operations interface. Returns either an
165+
* `Operation.error` or an `Operation.response` which contains
166+
* an `AsyncRecognizeResponse` message.
165167
*
166168
* @param {Object} config
167169
* [Required] The `config` message provides information to the recognizer
@@ -172,9 +174,9 @@ SpeechApi.prototype.syncRecognize = function syncRecognize() {
172174
* [Required] The audio data to be recognized.
173175
*
174176
* This object should have the same structure as [RecognitionAudio]{@link RecognitionAudio}
175-
* @param {gax.CallOptions=} options
176-
* Overrides the default settings for this call, e.g, timeout,
177-
* retries, etc.
177+
* @param {Object=} options
178+
* Optional parameters. You can override the default settings for this call, e.g, timeout,
179+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
178180
* @param {function(?Error, ?Object)=} callback
179181
* The function which will be called with the result of the API call.
180182
*
@@ -195,18 +197,23 @@ SpeechApi.prototype.syncRecognize = function syncRecognize() {
195197
* // doThingsWith(response)
196198
* });
197199
*/
198-
SpeechApi.prototype.asyncRecognize = function asyncRecognize() {
199-
var args = arguejs({
200-
config: Object,
201-
audio: Object,
202-
options: [gax.CallOptions],
203-
callback: [Function]
204-
}, arguments);
200+
SpeechApi.prototype.asyncRecognize = function asyncRecognize(
201+
config,
202+
audio,
203+
options,
204+
callback) {
205+
if (options instanceof Function && callback === undefined) {
206+
callback = options;
207+
options = {};
208+
}
209+
if (options === undefined) {
210+
options = {};
211+
}
205212
var req = {
206-
config: args.config,
207-
audio: args.audio
213+
config: config,
214+
audio: audio
208215
};
209-
return this._asyncRecognize(req, args.options, args.callback);
216+
return this._asyncRecognize(req, options, callback);
210217
};
211218

212219
function SpeechApiBuilder(gaxGrpc) {
@@ -237,8 +244,6 @@ function SpeechApiBuilder(gaxGrpc) {
237244
* @param {Object=} opts.clientConfig
238245
* The customized config to build the call settings. See
239246
* {@link gax.constructSettings} for the format.
240-
* @param {number=} opts.timeout
241-
* The default timeout, in seconds, for calls made through this client.
242247
* @param {number=} opts.appName
243248
* The codename of the calling service.
244249
* @param {String=} opts.appVersion

0 commit comments

Comments
 (0)