@googlemaps/fleetengine 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,631 @@
1
+ "use strict";
2
+ // Copyright 2024 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.TripServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1/trip_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./trip_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Trip management service.
31
+ * @class
32
+ * @memberof v1
33
+ */
34
+ class TripServiceClient {
35
+ /**
36
+ * Construct an instance of TripServiceClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
+ * For more information, please check the
65
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
67
+ * need to avoid loading the default gRPC version and want to use the fallback
68
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
69
+ * ```
70
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
+ * const client = new TripServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b, _c, _d, _e;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this.constructor;
85
+ if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) && (opts === null || opts === void 0 ? void 0 : opts.universeDomain) && (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
86
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
87
+ }
88
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
89
+ this._universeDomain = (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
90
+ this._servicePath = 'fleetengine.' + this._universeDomain;
91
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
92
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
93
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
94
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
95
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
96
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
97
+ // Request numeric enum values if REST transport is used.
98
+ opts.numericEnums = true;
99
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
100
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
101
+ opts['scopes'] = staticMembers.scopes;
102
+ }
103
+ // Load google-gax module synchronously if needed
104
+ if (!gaxInstance) {
105
+ gaxInstance = require('google-gax');
106
+ }
107
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
108
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
109
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
110
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
111
+ // Save options to use in initialize() method.
112
+ this._opts = opts;
113
+ // Save the auth object to the client, for use by other methods.
114
+ this.auth = this._gaxGrpc.auth;
115
+ // Set useJWTAccessWithScope on the auth object.
116
+ this.auth.useJWTAccessWithScope = true;
117
+ // Set defaultServicePath on the auth object.
118
+ this.auth.defaultServicePath = this._servicePath;
119
+ // Set the default scopes in auth client if needed.
120
+ if (servicePath === this._servicePath) {
121
+ this.auth.defaultScopes = staticMembers.scopes;
122
+ }
123
+ // Determine the client header string.
124
+ const clientHeader = [
125
+ `gax/${this._gaxModule.version}`,
126
+ `gapic/${version}`,
127
+ ];
128
+ if (typeof process === 'object' && 'versions' in process) {
129
+ clientHeader.push(`gl-node/${process.versions.node}`);
130
+ }
131
+ else {
132
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
133
+ }
134
+ if (!opts.fallback) {
135
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
136
+ }
137
+ else {
138
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
139
+ }
140
+ if (opts.libName && opts.libVersion) {
141
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
142
+ }
143
+ // Load the applicable protos.
144
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
145
+ // This API contains "path templates"; forward-slash-separated
146
+ // identifiers to uniquely identify resources within the API.
147
+ // Create useful helper objects for these.
148
+ this.pathTemplates = {
149
+ tripPathTemplate: new this._gaxModule.PathTemplate('providers/{provider}/trips/{trip}'),
150
+ vehiclePathTemplate: new this._gaxModule.PathTemplate('providers/{provider}/vehicles/{vehicle}'),
151
+ };
152
+ // Some of the methods on this service return "paged" results,
153
+ // (e.g. 50 results at a time, with tokens to get subsequent
154
+ // pages). Denote the keys used for pagination and results.
155
+ this.descriptors.page = {
156
+ searchTrips: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'trips')
157
+ };
158
+ // Put together the default options sent with requests.
159
+ this._defaults = this._gaxGrpc.constructSettings('maps.fleetengine.v1.TripService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
160
+ // Set up a dictionary of "inner API calls"; the core implementation
161
+ // of calling the API is handled in `google-gax`, with this code
162
+ // merely providing the destination and request information.
163
+ this.innerApiCalls = {};
164
+ // Add a warn function to the client constructor so it can be easily tested.
165
+ this.warn = this._gaxModule.warn;
166
+ }
167
+ /**
168
+ * Initialize the client.
169
+ * Performs asynchronous operations (such as authentication) and prepares the client.
170
+ * This function will be called automatically when any class method is called for the
171
+ * first time, but if you need to initialize it before calling an actual method,
172
+ * feel free to call initialize() directly.
173
+ *
174
+ * You can await on this method if you want to make sure the client is initialized.
175
+ *
176
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
177
+ */
178
+ initialize() {
179
+ // If the client stub promise is already initialized, return immediately.
180
+ if (this.tripServiceStub) {
181
+ return this.tripServiceStub;
182
+ }
183
+ // Put together the "service stub" for
184
+ // maps.fleetengine.v1.TripService.
185
+ this.tripServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
186
+ this._protos.lookupService('maps.fleetengine.v1.TripService') :
187
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
188
+ this._protos.maps.fleetengine.v1.TripService, this._opts, this._providedCustomServicePath);
189
+ // Iterate over each of the methods that the service provides
190
+ // and create an API call method for each.
191
+ const tripServiceStubMethods = ['createTrip', 'getTrip', 'reportBillableTrip', 'searchTrips', 'updateTrip'];
192
+ for (const methodName of tripServiceStubMethods) {
193
+ const callPromise = this.tripServiceStub.then(stub => (...args) => {
194
+ if (this._terminated) {
195
+ return Promise.reject('The client has already been closed.');
196
+ }
197
+ const func = stub[methodName];
198
+ return func.apply(stub, args);
199
+ }, (err) => () => {
200
+ throw err;
201
+ });
202
+ const descriptor = this.descriptors.page[methodName] ||
203
+ undefined;
204
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
205
+ this.innerApiCalls[methodName] = apiCall;
206
+ }
207
+ return this.tripServiceStub;
208
+ }
209
+ /**
210
+ * The DNS address for this API service.
211
+ * @deprecated Use the apiEndpoint method of the client instance.
212
+ * @returns {string} The DNS address for this service.
213
+ */
214
+ static get servicePath() {
215
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
216
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
217
+ }
218
+ return 'fleetengine.googleapis.com';
219
+ }
220
+ /**
221
+ * The DNS address for this API service - same as servicePath.
222
+ * @deprecated Use the apiEndpoint method of the client instance.
223
+ * @returns {string} The DNS address for this service.
224
+ */
225
+ static get apiEndpoint() {
226
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
227
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
228
+ }
229
+ return 'fleetengine.googleapis.com';
230
+ }
231
+ /**
232
+ * The DNS address for this API service.
233
+ * @returns {string} The DNS address for this service.
234
+ */
235
+ get apiEndpoint() {
236
+ return this._servicePath;
237
+ }
238
+ get universeDomain() {
239
+ return this._universeDomain;
240
+ }
241
+ /**
242
+ * The port for this API service.
243
+ * @returns {number} The default port for this service.
244
+ */
245
+ static get port() {
246
+ return 443;
247
+ }
248
+ /**
249
+ * The scopes needed to make gRPC calls for every method defined
250
+ * in this service.
251
+ * @returns {string[]} List of default scopes.
252
+ */
253
+ static get scopes() {
254
+ return [
255
+ 'https://www.googleapis.com/auth/cloud-platform'
256
+ ];
257
+ }
258
+ /**
259
+ * Return the project ID used by this class.
260
+ * @returns {Promise} A promise that resolves to string containing the project ID.
261
+ */
262
+ getProjectId(callback) {
263
+ if (callback) {
264
+ this.auth.getProjectId(callback);
265
+ return;
266
+ }
267
+ return this.auth.getProjectId();
268
+ }
269
+ createTrip(request, optionsOrCallback, callback) {
270
+ var _a, _b;
271
+ request = request || {};
272
+ let options;
273
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
274
+ callback = optionsOrCallback;
275
+ options = {};
276
+ }
277
+ else {
278
+ options = optionsOrCallback;
279
+ }
280
+ options = options || {};
281
+ options.otherArgs = options.otherArgs || {};
282
+ options.otherArgs.headers = options.otherArgs.headers || {};
283
+ let routingParameter = {};
284
+ {
285
+ const fieldValue = request.parent;
286
+ if (fieldValue !== undefined && fieldValue !== null) {
287
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
288
+ if (match) {
289
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
290
+ Object.assign(routingParameter, { provider_id: parameterValue });
291
+ }
292
+ }
293
+ }
294
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
295
+ this.initialize();
296
+ return this.innerApiCalls.createTrip(request, options, callback);
297
+ }
298
+ getTrip(request, optionsOrCallback, callback) {
299
+ var _a, _b;
300
+ request = request || {};
301
+ let options;
302
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
303
+ callback = optionsOrCallback;
304
+ options = {};
305
+ }
306
+ else {
307
+ options = optionsOrCallback;
308
+ }
309
+ options = options || {};
310
+ options.otherArgs = options.otherArgs || {};
311
+ options.otherArgs.headers = options.otherArgs.headers || {};
312
+ let routingParameter = {};
313
+ {
314
+ const fieldValue = request.name;
315
+ if (fieldValue !== undefined && fieldValue !== null) {
316
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
317
+ if (match) {
318
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
319
+ Object.assign(routingParameter, { provider_id: parameterValue });
320
+ }
321
+ }
322
+ }
323
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
324
+ this.initialize();
325
+ return this.innerApiCalls.getTrip(request, options, callback);
326
+ }
327
+ reportBillableTrip(request, optionsOrCallback, callback) {
328
+ var _a, _b;
329
+ request = request || {};
330
+ let options;
331
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
332
+ callback = optionsOrCallback;
333
+ options = {};
334
+ }
335
+ else {
336
+ options = optionsOrCallback;
337
+ }
338
+ options = options || {};
339
+ options.otherArgs = options.otherArgs || {};
340
+ options.otherArgs.headers = options.otherArgs.headers || {};
341
+ let routingParameter = {};
342
+ {
343
+ const fieldValue = request.name;
344
+ if (fieldValue !== undefined && fieldValue !== null) {
345
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
346
+ if (match) {
347
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
348
+ Object.assign(routingParameter, { provider_id: parameterValue });
349
+ }
350
+ }
351
+ }
352
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
353
+ this.initialize();
354
+ return this.innerApiCalls.reportBillableTrip(request, options, callback);
355
+ }
356
+ updateTrip(request, optionsOrCallback, callback) {
357
+ var _a, _b;
358
+ request = request || {};
359
+ let options;
360
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
361
+ callback = optionsOrCallback;
362
+ options = {};
363
+ }
364
+ else {
365
+ options = optionsOrCallback;
366
+ }
367
+ options = options || {};
368
+ options.otherArgs = options.otherArgs || {};
369
+ options.otherArgs.headers = options.otherArgs.headers || {};
370
+ let routingParameter = {};
371
+ {
372
+ const fieldValue = request.name;
373
+ if (fieldValue !== undefined && fieldValue !== null) {
374
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
375
+ if (match) {
376
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
377
+ Object.assign(routingParameter, { provider_id: parameterValue });
378
+ }
379
+ }
380
+ }
381
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
382
+ this.initialize();
383
+ return this.innerApiCalls.updateTrip(request, options, callback);
384
+ }
385
+ searchTrips(request, optionsOrCallback, callback) {
386
+ var _a, _b;
387
+ request = request || {};
388
+ let options;
389
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
390
+ callback = optionsOrCallback;
391
+ options = {};
392
+ }
393
+ else {
394
+ options = optionsOrCallback;
395
+ }
396
+ options = options || {};
397
+ options.otherArgs = options.otherArgs || {};
398
+ options.otherArgs.headers = options.otherArgs.headers || {};
399
+ let routingParameter = {};
400
+ {
401
+ const fieldValue = request.parent;
402
+ if (fieldValue !== undefined && fieldValue !== null) {
403
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
404
+ if (match) {
405
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
406
+ Object.assign(routingParameter, { provider_id: parameterValue });
407
+ }
408
+ }
409
+ }
410
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
411
+ this.initialize();
412
+ return this.innerApiCalls.searchTrips(request, options, callback);
413
+ }
414
+ /**
415
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
416
+ * @param {Object} request
417
+ * The request object that will be sent.
418
+ * @param {maps.fleetengine.v1.RequestHeader} request.header
419
+ * The standard Fleet Engine request header.
420
+ * @param {string} request.parent
421
+ * Required. Must be in the format `providers/{provider}`.
422
+ * The provider must be the Project ID (for example, `sample-cloud-project`)
423
+ * of the Google Cloud Project of which the service account making
424
+ * this call is a member.
425
+ * @param {string} request.vehicleId
426
+ * The vehicle associated with the trips in the request. If unspecified, the
427
+ * returned trips do not contain:
428
+ *
429
+ * * `current_route_segment`
430
+ * * `remaining_waypoints`
431
+ * * `remaining_distance_meters`
432
+ * * `eta_to_first_waypoint`
433
+ * @param {boolean} request.activeTripsOnly
434
+ * If set to true, the response includes Trips that influence a driver's
435
+ * route.
436
+ * @param {number} request.pageSize
437
+ * If not set, the server decides the number of results to return.
438
+ * @param {string} request.pageToken
439
+ * Set this to a value previously returned in the `SearchTripsResponse` to
440
+ * continue from previous results.
441
+ * @param {google.protobuf.Duration} request.minimumStaleness
442
+ * If specified, returns the trips that have not been updated after the time
443
+ * `(current - minimum_staleness)`.
444
+ * @param {object} [options]
445
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
446
+ * @returns {Stream}
447
+ * An object stream which emits an object representing {@link protos.maps.fleetengine.v1.Trip|Trip} on 'data' event.
448
+ * The client library will perform auto-pagination by default: it will call the API as many
449
+ * times as needed. Note that it can affect your quota.
450
+ * We recommend using `searchTripsAsync()`
451
+ * method described below for async iteration which you can stop as needed.
452
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
453
+ * for more details and examples.
454
+ */
455
+ searchTripsStream(request, options) {
456
+ var _a, _b;
457
+ request = request || {};
458
+ options = options || {};
459
+ options.otherArgs = options.otherArgs || {};
460
+ options.otherArgs.headers = options.otherArgs.headers || {};
461
+ let routingParameter = {};
462
+ {
463
+ const fieldValue = request.parent;
464
+ if (fieldValue !== undefined && fieldValue !== null) {
465
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
466
+ if (match) {
467
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
468
+ Object.assign(routingParameter, { provider_id: parameterValue });
469
+ }
470
+ }
471
+ }
472
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
473
+ const defaultCallSettings = this._defaults['searchTrips'];
474
+ const callSettings = defaultCallSettings.merge(options);
475
+ this.initialize();
476
+ return this.descriptors.page.searchTrips.createStream(this.innerApiCalls.searchTrips, request, callSettings);
477
+ }
478
+ /**
479
+ * Equivalent to `searchTrips`, but returns an iterable object.
480
+ *
481
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
482
+ * @param {Object} request
483
+ * The request object that will be sent.
484
+ * @param {maps.fleetengine.v1.RequestHeader} request.header
485
+ * The standard Fleet Engine request header.
486
+ * @param {string} request.parent
487
+ * Required. Must be in the format `providers/{provider}`.
488
+ * The provider must be the Project ID (for example, `sample-cloud-project`)
489
+ * of the Google Cloud Project of which the service account making
490
+ * this call is a member.
491
+ * @param {string} request.vehicleId
492
+ * The vehicle associated with the trips in the request. If unspecified, the
493
+ * returned trips do not contain:
494
+ *
495
+ * * `current_route_segment`
496
+ * * `remaining_waypoints`
497
+ * * `remaining_distance_meters`
498
+ * * `eta_to_first_waypoint`
499
+ * @param {boolean} request.activeTripsOnly
500
+ * If set to true, the response includes Trips that influence a driver's
501
+ * route.
502
+ * @param {number} request.pageSize
503
+ * If not set, the server decides the number of results to return.
504
+ * @param {string} request.pageToken
505
+ * Set this to a value previously returned in the `SearchTripsResponse` to
506
+ * continue from previous results.
507
+ * @param {google.protobuf.Duration} request.minimumStaleness
508
+ * If specified, returns the trips that have not been updated after the time
509
+ * `(current - minimum_staleness)`.
510
+ * @param {object} [options]
511
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
512
+ * @returns {Object}
513
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
514
+ * When you iterate the returned iterable, each element will be an object representing
515
+ * {@link protos.maps.fleetengine.v1.Trip|Trip}. The API will be called under the hood as needed, once per the page,
516
+ * so you can stop the iteration when you don't need more results.
517
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
518
+ * for more details and examples.
519
+ * @example <caption>include:samples/generated/v1/trip_service.search_trips.js</caption>
520
+ * region_tag:fleetengine_v1_generated_TripService_SearchTrips_async
521
+ */
522
+ searchTripsAsync(request, options) {
523
+ var _a, _b;
524
+ request = request || {};
525
+ options = options || {};
526
+ options.otherArgs = options.otherArgs || {};
527
+ options.otherArgs.headers = options.otherArgs.headers || {};
528
+ let routingParameter = {};
529
+ {
530
+ const fieldValue = request.parent;
531
+ if (fieldValue !== undefined && fieldValue !== null) {
532
+ const match = fieldValue.toString().match(RegExp('(?<provider_id>providers/[^/]+)'));
533
+ if (match) {
534
+ const parameterValue = (_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a['provider_id']) !== null && _b !== void 0 ? _b : fieldValue;
535
+ Object.assign(routingParameter, { provider_id: parameterValue });
536
+ }
537
+ }
538
+ }
539
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter);
540
+ const defaultCallSettings = this._defaults['searchTrips'];
541
+ const callSettings = defaultCallSettings.merge(options);
542
+ this.initialize();
543
+ return this.descriptors.page.searchTrips.asyncIterate(this.innerApiCalls['searchTrips'], request, callSettings);
544
+ }
545
+ // --------------------
546
+ // -- Path templates --
547
+ // --------------------
548
+ /**
549
+ * Return a fully-qualified trip resource name string.
550
+ *
551
+ * @param {string} provider
552
+ * @param {string} trip
553
+ * @returns {string} Resource name string.
554
+ */
555
+ tripPath(provider, trip) {
556
+ return this.pathTemplates.tripPathTemplate.render({
557
+ provider: provider,
558
+ trip: trip,
559
+ });
560
+ }
561
+ /**
562
+ * Parse the provider from Trip resource.
563
+ *
564
+ * @param {string} tripName
565
+ * A fully-qualified path representing Trip resource.
566
+ * @returns {string} A string representing the provider.
567
+ */
568
+ matchProviderFromTripName(tripName) {
569
+ return this.pathTemplates.tripPathTemplate.match(tripName).provider;
570
+ }
571
+ /**
572
+ * Parse the trip from Trip resource.
573
+ *
574
+ * @param {string} tripName
575
+ * A fully-qualified path representing Trip resource.
576
+ * @returns {string} A string representing the trip.
577
+ */
578
+ matchTripFromTripName(tripName) {
579
+ return this.pathTemplates.tripPathTemplate.match(tripName).trip;
580
+ }
581
+ /**
582
+ * Return a fully-qualified vehicle resource name string.
583
+ *
584
+ * @param {string} provider
585
+ * @param {string} vehicle
586
+ * @returns {string} Resource name string.
587
+ */
588
+ vehiclePath(provider, vehicle) {
589
+ return this.pathTemplates.vehiclePathTemplate.render({
590
+ provider: provider,
591
+ vehicle: vehicle,
592
+ });
593
+ }
594
+ /**
595
+ * Parse the provider from Vehicle resource.
596
+ *
597
+ * @param {string} vehicleName
598
+ * A fully-qualified path representing Vehicle resource.
599
+ * @returns {string} A string representing the provider.
600
+ */
601
+ matchProviderFromVehicleName(vehicleName) {
602
+ return this.pathTemplates.vehiclePathTemplate.match(vehicleName).provider;
603
+ }
604
+ /**
605
+ * Parse the vehicle from Vehicle resource.
606
+ *
607
+ * @param {string} vehicleName
608
+ * A fully-qualified path representing Vehicle resource.
609
+ * @returns {string} A string representing the vehicle.
610
+ */
611
+ matchVehicleFromVehicleName(vehicleName) {
612
+ return this.pathTemplates.vehiclePathTemplate.match(vehicleName).vehicle;
613
+ }
614
+ /**
615
+ * Terminate the gRPC channel and close the client.
616
+ *
617
+ * The client will no longer be usable and all future behavior is undefined.
618
+ * @returns {Promise} A promise that resolves when the client is closed.
619
+ */
620
+ close() {
621
+ if (this.tripServiceStub && !this._terminated) {
622
+ return this.tripServiceStub.then(stub => {
623
+ this._terminated = true;
624
+ stub.close();
625
+ });
626
+ }
627
+ return Promise.resolve();
628
+ }
629
+ }
630
+ exports.TripServiceClient = TripServiceClient;
631
+ //# sourceMappingURL=trip_service_client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trip_service_client.js","sourceRoot":"","sources":["../../../src/v1/trip_service_client.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAOrD,uDAAwD;AAExD;;;;GAIG;AACH,iEAAiE;AACjE,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAA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