@google-cloud/logging-api 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.
Files changed (33) hide show
  1. package/README.md +111 -0
  2. package/build/protos/google/logging/type/http_request.proto +95 -0
  3. package/build/protos/google/logging/type/log_severity.proto +71 -0
  4. package/build/protos/google/logging/v2/log_entry.proto +280 -0
  5. package/build/protos/google/logging/v2/logging.proto +483 -0
  6. package/build/protos/google/logging/v2/logging_config.proto +2317 -0
  7. package/build/protos/google/logging/v2/logging_metrics.proto +339 -0
  8. package/build/protos/protos.d.ts +19677 -0
  9. package/build/protos/protos.js +1 -0
  10. package/build/protos/protos.json +1 -0
  11. package/build/src/index.d.ts +17 -0
  12. package/build/src/index.js +32 -0
  13. package/build/src/index.js.map +1 -0
  14. package/build/src/v2/config_service_v2_client.d.ts +2879 -0
  15. package/build/src/v2/config_service_v2_client.js +3801 -0
  16. package/build/src/v2/config_service_v2_client.js.map +1 -0
  17. package/build/src/v2/config_service_v2_client_config.json +169 -0
  18. package/build/src/v2/config_service_v2_proto_list.json +8 -0
  19. package/build/src/v2/gapic_metadata.json +512 -0
  20. package/build/src/v2/index.d.ts +3 -0
  21. package/build/src/v2/index.js +27 -0
  22. package/build/src/v2/index.js.map +1 -0
  23. package/build/src/v2/logging_service_v2_client.d.ts +1617 -0
  24. package/build/src/v2/logging_service_v2_client.js +2177 -0
  25. package/build/src/v2/logging_service_v2_client.js.map +1 -0
  26. package/build/src/v2/logging_service_v2_client_config.json +61 -0
  27. package/build/src/v2/logging_service_v2_proto_list.json +8 -0
  28. package/build/src/v2/metrics_service_v2_client.d.ts +1249 -0
  29. package/build/src/v2/metrics_service_v2_client.js +1911 -0
  30. package/build/src/v2/metrics_service_v2_client.js.map +1 -0
  31. package/build/src/v2/metrics_service_v2_client_config.json +56 -0
  32. package/build/src/v2/metrics_service_v2_proto_list.json +8 -0
  33. package/package.json +67 -0
@@ -0,0 +1,2177 @@
1
+ "use strict";
2
+ // Copyright 2026 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.LoggingServiceV2Client = void 0;
21
+ const stream_1 = require("stream");
22
+ const jsonProtos = require("../../protos/protos.json");
23
+ const google_gax_1 = require("google-gax");
24
+ /**
25
+ * Client JSON configuration object, loaded from
26
+ * `src/v2/logging_service_v2_client_config.json`.
27
+ * This file defines retry strategy and timeouts for all API methods in this library.
28
+ */
29
+ const gapicConfig = require("./logging_service_v2_client_config.json");
30
+ const version = require('../../../package.json').version;
31
+ /**
32
+ * Service for ingesting and querying logs.
33
+ * @class
34
+ * @memberof v2
35
+ */
36
+ class LoggingServiceV2Client {
37
+ _terminated = false;
38
+ _opts;
39
+ _providedCustomServicePath;
40
+ _gaxModule;
41
+ _gaxGrpc;
42
+ _protos;
43
+ _defaults;
44
+ _universeDomain;
45
+ _servicePath;
46
+ _log = google_gax_1.loggingUtils.log('logging-api');
47
+ auth;
48
+ descriptors = {
49
+ page: {},
50
+ stream: {},
51
+ longrunning: {},
52
+ batching: {},
53
+ };
54
+ warn;
55
+ innerApiCalls;
56
+ pathTemplates;
57
+ loggingServiceV2Stub;
58
+ /**
59
+ * Construct an instance of LoggingServiceV2Client.
60
+ *
61
+ * @param {object} [options] - The configuration object.
62
+ * The options accepted by the constructor are described in detail
63
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
64
+ * The common options are:
65
+ * @param {object} [options.credentials] - Credentials object.
66
+ * @param {string} [options.credentials.client_email]
67
+ * @param {string} [options.credentials.private_key]
68
+ * @param {string} [options.email] - Account email address. Required when
69
+ * using a .pem or .p12 keyFilename.
70
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
71
+ * .p12 key downloaded from the Google Developers Console. If you provide
72
+ * a path to a JSON file, the projectId option below is not necessary.
73
+ * NOTE: .pem and .p12 require you to specify options.email as well.
74
+ * @param {number} [options.port] - The port on which to connect to
75
+ * the remote host.
76
+ * @param {string} [options.projectId] - The project ID from the Google
77
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
78
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
79
+ * app is running in an environment which supports
80
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
81
+ * your project ID will be detected automatically.
82
+ * @param {string} [options.apiEndpoint] - The domain name of the
83
+ * API remote host.
84
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
85
+ * Follows the structure of {@link gapicConfig}.
86
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
87
+ * For more information, please check the
88
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
89
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
90
+ * need to avoid loading the default gRPC version and want to use the fallback
91
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
92
+ * ```
93
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
94
+ * const client = new LoggingServiceV2Client({fallback: true}, gax);
95
+ * ```
96
+ */
97
+ constructor(opts, gaxInstance) {
98
+ // Ensure that options include all the required fields.
99
+ const staticMembers = this.constructor;
100
+ if (opts?.universe_domain &&
101
+ opts?.universeDomain &&
102
+ opts?.universe_domain !== opts?.universeDomain) {
103
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
104
+ }
105
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
106
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
107
+ : undefined;
108
+ this._universeDomain =
109
+ opts?.universeDomain ??
110
+ opts?.universe_domain ??
111
+ universeDomainEnvVar ??
112
+ 'googleapis.com';
113
+ this._servicePath = 'logging.' + this._universeDomain;
114
+ const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
115
+ this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
116
+ const port = opts?.port || staticMembers.port;
117
+ const clientConfig = opts?.clientConfig ?? {};
118
+ const fallback = opts?.fallback ??
119
+ (typeof window !== 'undefined' && typeof window?.fetch === 'function');
120
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
121
+ // Request numeric enum values if REST transport is used.
122
+ opts.numericEnums = true;
123
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
124
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
125
+ opts['scopes'] = staticMembers.scopes;
126
+ }
127
+ // Load google-gax module synchronously if needed
128
+ if (!gaxInstance) {
129
+ gaxInstance = require('google-gax');
130
+ }
131
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
132
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
133
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
134
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
135
+ // Save options to use in initialize() method.
136
+ this._opts = opts;
137
+ // Save the auth object to the client, for use by other methods.
138
+ this.auth = this._gaxGrpc.auth;
139
+ // Set useJWTAccessWithScope on the auth object.
140
+ this.auth.useJWTAccessWithScope = true;
141
+ // Set defaultServicePath on the auth object.
142
+ this.auth.defaultServicePath = this._servicePath;
143
+ // Set the default scopes in auth client if needed.
144
+ if (servicePath === this._servicePath) {
145
+ this.auth.defaultScopes = staticMembers.scopes;
146
+ }
147
+ // Determine the client header string.
148
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
149
+ if (typeof process === 'object' && 'versions' in process) {
150
+ clientHeader.push(`gl-node/${process.versions.node}`);
151
+ }
152
+ else {
153
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
154
+ }
155
+ if (!opts.fallback) {
156
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
157
+ }
158
+ else {
159
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
160
+ }
161
+ if (opts.libName && opts.libVersion) {
162
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
163
+ }
164
+ // Load the applicable protos.
165
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
166
+ // This API contains "path templates"; forward-slash-separated
167
+ // identifiers to uniquely identify resources within the API.
168
+ // Create useful helper objects for these.
169
+ this.pathTemplates = {
170
+ billingAccountCmekSettingsPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/cmekSettings'),
171
+ billingAccountExclusionPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/exclusions/{exclusion}'),
172
+ billingAccountLocationBucketPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}'),
173
+ billingAccountLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}'),
174
+ billingAccountLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}'),
175
+ billingAccountLogPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/logs/{log}'),
176
+ billingAccountSettingsPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/settings'),
177
+ billingAccountSinkPathTemplate: new this._gaxModule.PathTemplate('billingAccounts/{billing_account}/sinks/{sink}'),
178
+ folderCmekSettingsPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/cmekSettings'),
179
+ folderExclusionPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/exclusions/{exclusion}'),
180
+ folderLocationBucketPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/locations/{location}/buckets/{bucket}'),
181
+ folderLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}'),
182
+ folderLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}'),
183
+ folderLogPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/logs/{log}'),
184
+ folderSettingsPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/settings'),
185
+ folderSinkPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}/sinks/{sink}'),
186
+ logMetricPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/metrics/{metric}'),
187
+ organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/cmekSettings'),
188
+ organizationExclusionPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/exclusions/{exclusion}'),
189
+ organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}'),
190
+ organizationLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}'),
191
+ organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}'),
192
+ organizationLogPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/logs/{log}'),
193
+ organizationSettingsPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/settings'),
194
+ organizationSinkPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/sinks/{sink}'),
195
+ projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
196
+ projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/cmekSettings'),
197
+ projectExclusionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/exclusions/{exclusion}'),
198
+ projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}'),
199
+ projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/links/{link}'),
200
+ projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/views/{view}'),
201
+ projectLogPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/logs/{log}'),
202
+ projectSettingsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/settings'),
203
+ projectSinkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/sinks/{sink}'),
204
+ };
205
+ // Some of the methods on this service return "paged" results,
206
+ // (e.g. 50 results at a time, with tokens to get subsequent
207
+ // pages). Denote the keys used for pagination and results.
208
+ this.descriptors.page = {
209
+ listLogEntries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entries'),
210
+ listMonitoredResourceDescriptors: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceDescriptors'),
211
+ listLogs: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'logNames'),
212
+ };
213
+ // Some of the methods on this service provide streaming responses.
214
+ // Provide descriptors for these.
215
+ this.descriptors.stream = {
216
+ tailLogEntries: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries),
217
+ };
218
+ // Put together the default options sent with requests.
219
+ this._defaults = this._gaxGrpc.constructSettings('google.logging.v2.LoggingServiceV2', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
220
+ // Set up a dictionary of "inner API calls"; the core implementation
221
+ // of calling the API is handled in `google-gax`, with this code
222
+ // merely providing the destination and request information.
223
+ this.innerApiCalls = {};
224
+ // Add a warn function to the client constructor so it can be easily tested.
225
+ this.warn = this._gaxModule.warn;
226
+ }
227
+ /**
228
+ * Initialize the client.
229
+ * Performs asynchronous operations (such as authentication) and prepares the client.
230
+ * This function will be called automatically when any class method is called for the
231
+ * first time, but if you need to initialize it before calling an actual method,
232
+ * feel free to call initialize() directly.
233
+ *
234
+ * You can await on this method if you want to make sure the client is initialized.
235
+ *
236
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
237
+ */
238
+ initialize() {
239
+ // If the client stub promise is already initialized, return immediately.
240
+ if (this.loggingServiceV2Stub) {
241
+ return this.loggingServiceV2Stub;
242
+ }
243
+ // Put together the "service stub" for
244
+ // google.logging.v2.LoggingServiceV2.
245
+ this.loggingServiceV2Stub = this._gaxGrpc.createStub(this._opts.fallback
246
+ ? this._protos.lookupService('google.logging.v2.LoggingServiceV2')
247
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
248
+ this._protos.google.logging.v2.LoggingServiceV2, this._opts, this._providedCustomServicePath);
249
+ // Iterate over each of the methods that the service provides
250
+ // and create an API call method for each.
251
+ const loggingServiceV2StubMethods = [
252
+ 'deleteLog',
253
+ 'writeLogEntries',
254
+ 'listLogEntries',
255
+ 'listMonitoredResourceDescriptors',
256
+ 'listLogs',
257
+ 'tailLogEntries',
258
+ ];
259
+ for (const methodName of loggingServiceV2StubMethods) {
260
+ const callPromise = this.loggingServiceV2Stub.then((stub) => (...args) => {
261
+ if (this._terminated) {
262
+ if (methodName in this.descriptors.stream) {
263
+ const stream = new stream_1.PassThrough({ objectMode: true });
264
+ setImmediate(() => {
265
+ stream.emit('error', new this._gaxModule.GoogleError('The client has already been closed.'));
266
+ });
267
+ return stream;
268
+ }
269
+ return Promise.reject('The client has already been closed.');
270
+ }
271
+ const func = stub[methodName];
272
+ return func.apply(stub, args);
273
+ }, (err) => () => {
274
+ throw err;
275
+ });
276
+ const descriptor = this.descriptors.page[methodName] ||
277
+ this.descriptors.stream[methodName] ||
278
+ undefined;
279
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
280
+ this.innerApiCalls[methodName] = apiCall;
281
+ }
282
+ return this.loggingServiceV2Stub;
283
+ }
284
+ /**
285
+ * The DNS address for this API service.
286
+ * @deprecated Use the apiEndpoint method of the client instance.
287
+ * @returns {string} The DNS address for this service.
288
+ */
289
+ static get servicePath() {
290
+ if (typeof process === 'object' &&
291
+ typeof process.emitWarning === 'function') {
292
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
293
+ }
294
+ return 'logging.googleapis.com';
295
+ }
296
+ /**
297
+ * The DNS address for this API service - same as servicePath.
298
+ * @deprecated Use the apiEndpoint method of the client instance.
299
+ * @returns {string} The DNS address for this service.
300
+ */
301
+ static get apiEndpoint() {
302
+ if (typeof process === 'object' &&
303
+ typeof process.emitWarning === 'function') {
304
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
305
+ }
306
+ return 'logging.googleapis.com';
307
+ }
308
+ /**
309
+ * The DNS address for this API service.
310
+ * @returns {string} The DNS address for this service.
311
+ */
312
+ get apiEndpoint() {
313
+ return this._servicePath;
314
+ }
315
+ get universeDomain() {
316
+ return this._universeDomain;
317
+ }
318
+ /**
319
+ * The port for this API service.
320
+ * @returns {number} The default port for this service.
321
+ */
322
+ static get port() {
323
+ return 443;
324
+ }
325
+ /**
326
+ * The scopes needed to make gRPC calls for every method defined
327
+ * in this service.
328
+ * @returns {string[]} List of default scopes.
329
+ */
330
+ static get scopes() {
331
+ return [
332
+ 'https://www.googleapis.com/auth/cloud-platform',
333
+ 'https://www.googleapis.com/auth/cloud-platform.read-only',
334
+ 'https://www.googleapis.com/auth/logging.admin',
335
+ 'https://www.googleapis.com/auth/logging.read',
336
+ 'https://www.googleapis.com/auth/logging.write',
337
+ ];
338
+ }
339
+ /**
340
+ * Return the project ID used by this class.
341
+ * @returns {Promise} A promise that resolves to string containing the project ID.
342
+ */
343
+ getProjectId(callback) {
344
+ if (callback) {
345
+ this.auth.getProjectId(callback);
346
+ return;
347
+ }
348
+ return this.auth.getProjectId();
349
+ }
350
+ deleteLog(request, optionsOrCallback, callback) {
351
+ request = request || {};
352
+ let options;
353
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
354
+ callback = optionsOrCallback;
355
+ options = {};
356
+ }
357
+ else {
358
+ options = optionsOrCallback;
359
+ }
360
+ options = options || {};
361
+ options.otherArgs = options.otherArgs || {};
362
+ options.otherArgs.headers = options.otherArgs.headers || {};
363
+ options.otherArgs.headers['x-goog-request-params'] =
364
+ this._gaxModule.routingHeader.fromParams({
365
+ log_name: request.logName ?? '',
366
+ });
367
+ this.initialize().catch((err) => {
368
+ throw err;
369
+ });
370
+ this._log.info('deleteLog request %j', request);
371
+ const wrappedCallback = callback
372
+ ? (error, response, options, rawResponse) => {
373
+ this._log.info('deleteLog response %j', response);
374
+ callback(error, response, options, rawResponse); // We verified callback above.
375
+ }
376
+ : undefined;
377
+ return this.innerApiCalls
378
+ .deleteLog(request, options, wrappedCallback)
379
+ ?.then(([response, options, rawResponse]) => {
380
+ this._log.info('deleteLog response %j', response);
381
+ return [response, options, rawResponse];
382
+ })
383
+ .catch((error) => {
384
+ if (error &&
385
+ 'statusDetails' in error &&
386
+ error.statusDetails instanceof Array) {
387
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
388
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
389
+ }
390
+ throw error;
391
+ });
392
+ }
393
+ writeLogEntries(request, optionsOrCallback, callback) {
394
+ request = request || {};
395
+ let options;
396
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
397
+ callback = optionsOrCallback;
398
+ options = {};
399
+ }
400
+ else {
401
+ options = optionsOrCallback;
402
+ }
403
+ options = options || {};
404
+ options.otherArgs = options.otherArgs || {};
405
+ options.otherArgs.headers = options.otherArgs.headers || {};
406
+ this.initialize().catch((err) => {
407
+ throw err;
408
+ });
409
+ this._log.info('writeLogEntries request %j', request);
410
+ const wrappedCallback = callback
411
+ ? (error, response, options, rawResponse) => {
412
+ this._log.info('writeLogEntries response %j', response);
413
+ callback(error, response, options, rawResponse); // We verified callback above.
414
+ }
415
+ : undefined;
416
+ return this.innerApiCalls
417
+ .writeLogEntries(request, options, wrappedCallback)
418
+ ?.then(([response, options, rawResponse]) => {
419
+ this._log.info('writeLogEntries response %j', response);
420
+ return [response, options, rawResponse];
421
+ })
422
+ .catch((error) => {
423
+ if (error &&
424
+ 'statusDetails' in error &&
425
+ error.statusDetails instanceof Array) {
426
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
427
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
428
+ }
429
+ throw error;
430
+ });
431
+ }
432
+ /**
433
+ * Streaming read of log entries as they are ingested. Until the stream is
434
+ * terminated, it will continue reading logs.
435
+ *
436
+ * @param {object} [options]
437
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
438
+ * @returns {Stream}
439
+ * An object stream which is both readable and writable. It accepts objects
440
+ * representing {@link protos.google.logging.v2.TailLogEntriesRequest|TailLogEntriesRequest} for write() method, and
441
+ * will emit objects representing {@link protos.google.logging.v2.TailLogEntriesResponse|TailLogEntriesResponse} on 'data' event asynchronously.
442
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation }
443
+ * for more details and examples.
444
+ * @example <caption>include:samples/generated/v2/logging_service_v2.tail_log_entries.js</caption>
445
+ * region_tag:logging_v2_generated_LoggingServiceV2_TailLogEntries_async
446
+ */
447
+ tailLogEntries(options) {
448
+ this.initialize().catch((err) => {
449
+ throw err;
450
+ });
451
+ this._log.info('tailLogEntries stream %j', options);
452
+ return this.innerApiCalls.tailLogEntries(null, options);
453
+ }
454
+ listLogEntries(request, optionsOrCallback, callback) {
455
+ request = request || {};
456
+ let options;
457
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
458
+ callback = optionsOrCallback;
459
+ options = {};
460
+ }
461
+ else {
462
+ options = optionsOrCallback;
463
+ }
464
+ options = options || {};
465
+ options.otherArgs = options.otherArgs || {};
466
+ options.otherArgs.headers = options.otherArgs.headers || {};
467
+ this.initialize().catch((err) => {
468
+ throw err;
469
+ });
470
+ const wrappedCallback = callback
471
+ ? (error, values, nextPageRequest, rawResponse) => {
472
+ this._log.info('listLogEntries values %j', values);
473
+ callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
474
+ }
475
+ : undefined;
476
+ this._log.info('listLogEntries request %j', request);
477
+ return this.innerApiCalls
478
+ .listLogEntries(request, options, wrappedCallback)
479
+ ?.then(([response, input, output]) => {
480
+ this._log.info('listLogEntries values %j', response);
481
+ return [response, input, output];
482
+ });
483
+ }
484
+ /**
485
+ * Equivalent to `listLogEntries`, but returns a NodeJS Stream object.
486
+ * @param {Object} request
487
+ * The request object that will be sent.
488
+ * @param {string[]} request.resourceNames
489
+ * Required. Names of one or more parent resources from which to
490
+ * retrieve log entries:
491
+ *
492
+ * * `projects/[PROJECT_ID]`
493
+ * * `organizations/[ORGANIZATION_ID]`
494
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]`
495
+ * * `folders/[FOLDER_ID]`
496
+ *
497
+ * May alternatively be one or more views:
498
+ *
499
+ * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
500
+ * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
501
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
502
+ * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
503
+ *
504
+ * Projects listed in the `project_ids` field are added to this list.
505
+ * A maximum of 100 resources may be specified in a single request.
506
+ * @param {string} [request.filter]
507
+ * Optional. Only log entries that match the filter are returned. An empty
508
+ * filter matches all log entries in the resources listed in `resource_names`.
509
+ * Referencing a parent resource that is not listed in `resource_names` will
510
+ * cause the filter to return no results. The maximum length of a filter is
511
+ * 20,000 characters.
512
+ * @param {string} [request.orderBy]
513
+ * Optional. How the results should be sorted. Presently, the only permitted
514
+ * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
515
+ * option returns entries in order of increasing values of
516
+ * `LogEntry.timestamp` (oldest first), and the second option returns entries
517
+ * in order of decreasing timestamps (newest first). Entries with equal
518
+ * timestamps are returned in order of their `insert_id` values.
519
+ * @param {number} [request.pageSize]
520
+ * Optional. The maximum number of results to return from this request.
521
+ * Default is 50. If the value is negative or exceeds 1000, the request is
522
+ * rejected. The presence of `next_page_token` in the response indicates that
523
+ * more results might be available.
524
+ * @param {string} [request.pageToken]
525
+ * Optional. If present, then retrieve the next batch of results from the
526
+ * preceding call to this method. `page_token` must be the value of
527
+ * `next_page_token` from the previous response. The values of other method
528
+ * parameters should be identical to those in the previous call.
529
+ * @param {object} [options]
530
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
531
+ * @returns {Stream}
532
+ * An object stream which emits an object representing {@link protos.google.logging.v2.LogEntry|LogEntry} on 'data' event.
533
+ * The client library will perform auto-pagination by default: it will call the API as many
534
+ * times as needed. Note that it can affect your quota.
535
+ * We recommend using `listLogEntriesAsync()`
536
+ * method described below for async iteration which you can stop as needed.
537
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
538
+ * for more details and examples.
539
+ */
540
+ listLogEntriesStream(request, options) {
541
+ request = request || {};
542
+ options = options || {};
543
+ options.otherArgs = options.otherArgs || {};
544
+ options.otherArgs.headers = options.otherArgs.headers || {};
545
+ const defaultCallSettings = this._defaults['listLogEntries'];
546
+ const callSettings = defaultCallSettings.merge(options);
547
+ this.initialize().catch((err) => {
548
+ throw err;
549
+ });
550
+ this._log.info('listLogEntries stream %j', request);
551
+ return this.descriptors.page.listLogEntries.createStream(this.innerApiCalls.listLogEntries, request, callSettings);
552
+ }
553
+ /**
554
+ * Equivalent to `listLogEntries`, but returns an iterable object.
555
+ *
556
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
557
+ * @param {Object} request
558
+ * The request object that will be sent.
559
+ * @param {string[]} request.resourceNames
560
+ * Required. Names of one or more parent resources from which to
561
+ * retrieve log entries:
562
+ *
563
+ * * `projects/[PROJECT_ID]`
564
+ * * `organizations/[ORGANIZATION_ID]`
565
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]`
566
+ * * `folders/[FOLDER_ID]`
567
+ *
568
+ * May alternatively be one or more views:
569
+ *
570
+ * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
571
+ * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
572
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
573
+ * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
574
+ *
575
+ * Projects listed in the `project_ids` field are added to this list.
576
+ * A maximum of 100 resources may be specified in a single request.
577
+ * @param {string} [request.filter]
578
+ * Optional. Only log entries that match the filter are returned. An empty
579
+ * filter matches all log entries in the resources listed in `resource_names`.
580
+ * Referencing a parent resource that is not listed in `resource_names` will
581
+ * cause the filter to return no results. The maximum length of a filter is
582
+ * 20,000 characters.
583
+ * @param {string} [request.orderBy]
584
+ * Optional. How the results should be sorted. Presently, the only permitted
585
+ * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
586
+ * option returns entries in order of increasing values of
587
+ * `LogEntry.timestamp` (oldest first), and the second option returns entries
588
+ * in order of decreasing timestamps (newest first). Entries with equal
589
+ * timestamps are returned in order of their `insert_id` values.
590
+ * @param {number} [request.pageSize]
591
+ * Optional. The maximum number of results to return from this request.
592
+ * Default is 50. If the value is negative or exceeds 1000, the request is
593
+ * rejected. The presence of `next_page_token` in the response indicates that
594
+ * more results might be available.
595
+ * @param {string} [request.pageToken]
596
+ * Optional. If present, then retrieve the next batch of results from the
597
+ * preceding call to this method. `page_token` must be the value of
598
+ * `next_page_token` from the previous response. The values of other method
599
+ * parameters should be identical to those in the previous call.
600
+ * @param {object} [options]
601
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
602
+ * @returns {Object}
603
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
604
+ * When you iterate the returned iterable, each element will be an object representing
605
+ * {@link protos.google.logging.v2.LogEntry|LogEntry}. The API will be called under the hood as needed, once per the page,
606
+ * so you can stop the iteration when you don't need more results.
607
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
608
+ * for more details and examples.
609
+ * @example <caption>include:samples/generated/v2/logging_service_v2.list_log_entries.js</caption>
610
+ * region_tag:logging_v2_generated_LoggingServiceV2_ListLogEntries_async
611
+ */
612
+ listLogEntriesAsync(request, options) {
613
+ request = request || {};
614
+ options = options || {};
615
+ options.otherArgs = options.otherArgs || {};
616
+ options.otherArgs.headers = options.otherArgs.headers || {};
617
+ const defaultCallSettings = this._defaults['listLogEntries'];
618
+ const callSettings = defaultCallSettings.merge(options);
619
+ this.initialize().catch((err) => {
620
+ throw err;
621
+ });
622
+ this._log.info('listLogEntries iterate %j', request);
623
+ return this.descriptors.page.listLogEntries.asyncIterate(this.innerApiCalls['listLogEntries'], request, callSettings);
624
+ }
625
+ listMonitoredResourceDescriptors(request, optionsOrCallback, callback) {
626
+ request = request || {};
627
+ let options;
628
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
629
+ callback = optionsOrCallback;
630
+ options = {};
631
+ }
632
+ else {
633
+ options = optionsOrCallback;
634
+ }
635
+ options = options || {};
636
+ options.otherArgs = options.otherArgs || {};
637
+ options.otherArgs.headers = options.otherArgs.headers || {};
638
+ this.initialize().catch((err) => {
639
+ throw err;
640
+ });
641
+ const wrappedCallback = callback
642
+ ? (error, values, nextPageRequest, rawResponse) => {
643
+ this._log.info('listMonitoredResourceDescriptors values %j', values);
644
+ callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
645
+ }
646
+ : undefined;
647
+ this._log.info('listMonitoredResourceDescriptors request %j', request);
648
+ return this.innerApiCalls
649
+ .listMonitoredResourceDescriptors(request, options, wrappedCallback)
650
+ ?.then(([response, input, output]) => {
651
+ this._log.info('listMonitoredResourceDescriptors values %j', response);
652
+ return [response, input, output];
653
+ });
654
+ }
655
+ /**
656
+ * Equivalent to `listMonitoredResourceDescriptors`, but returns a NodeJS Stream object.
657
+ * @param {Object} request
658
+ * The request object that will be sent.
659
+ * @param {number} [request.pageSize]
660
+ * Optional. The maximum number of results to return from this request.
661
+ * Non-positive values are ignored. The presence of `nextPageToken` in the
662
+ * response indicates that more results might be available.
663
+ * @param {string} [request.pageToken]
664
+ * Optional. If present, then retrieve the next batch of results from the
665
+ * preceding call to this method. `pageToken` must be the value of
666
+ * `nextPageToken` from the previous response. The values of other method
667
+ * parameters should be identical to those in the previous call.
668
+ * @param {object} [options]
669
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
670
+ * @returns {Stream}
671
+ * An object stream which emits an object representing {@link protos.google.api.MonitoredResourceDescriptor|MonitoredResourceDescriptor} on 'data' event.
672
+ * The client library will perform auto-pagination by default: it will call the API as many
673
+ * times as needed. Note that it can affect your quota.
674
+ * We recommend using `listMonitoredResourceDescriptorsAsync()`
675
+ * method described below for async iteration which you can stop as needed.
676
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
677
+ * for more details and examples.
678
+ */
679
+ listMonitoredResourceDescriptorsStream(request, options) {
680
+ request = request || {};
681
+ options = options || {};
682
+ options.otherArgs = options.otherArgs || {};
683
+ options.otherArgs.headers = options.otherArgs.headers || {};
684
+ const defaultCallSettings = this._defaults['listMonitoredResourceDescriptors'];
685
+ const callSettings = defaultCallSettings.merge(options);
686
+ this.initialize().catch((err) => {
687
+ throw err;
688
+ });
689
+ this._log.info('listMonitoredResourceDescriptors stream %j', request);
690
+ return this.descriptors.page.listMonitoredResourceDescriptors.createStream(this.innerApiCalls.listMonitoredResourceDescriptors, request, callSettings);
691
+ }
692
+ /**
693
+ * Equivalent to `listMonitoredResourceDescriptors`, but returns an iterable object.
694
+ *
695
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
696
+ * @param {Object} request
697
+ * The request object that will be sent.
698
+ * @param {number} [request.pageSize]
699
+ * Optional. The maximum number of results to return from this request.
700
+ * Non-positive values are ignored. The presence of `nextPageToken` in the
701
+ * response indicates that more results might be available.
702
+ * @param {string} [request.pageToken]
703
+ * Optional. If present, then retrieve the next batch of results from the
704
+ * preceding call to this method. `pageToken` must be the value of
705
+ * `nextPageToken` from the previous response. The values of other method
706
+ * parameters should be identical to those in the previous call.
707
+ * @param {object} [options]
708
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
709
+ * @returns {Object}
710
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
711
+ * When you iterate the returned iterable, each element will be an object representing
712
+ * {@link protos.google.api.MonitoredResourceDescriptor|MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page,
713
+ * so you can stop the iteration when you don't need more results.
714
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
715
+ * for more details and examples.
716
+ * @example <caption>include:samples/generated/v2/logging_service_v2.list_monitored_resource_descriptors.js</caption>
717
+ * region_tag:logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_async
718
+ */
719
+ listMonitoredResourceDescriptorsAsync(request, options) {
720
+ request = request || {};
721
+ options = options || {};
722
+ options.otherArgs = options.otherArgs || {};
723
+ options.otherArgs.headers = options.otherArgs.headers || {};
724
+ const defaultCallSettings = this._defaults['listMonitoredResourceDescriptors'];
725
+ const callSettings = defaultCallSettings.merge(options);
726
+ this.initialize().catch((err) => {
727
+ throw err;
728
+ });
729
+ this._log.info('listMonitoredResourceDescriptors iterate %j', request);
730
+ return this.descriptors.page.listMonitoredResourceDescriptors.asyncIterate(this.innerApiCalls['listMonitoredResourceDescriptors'], request, callSettings);
731
+ }
732
+ listLogs(request, optionsOrCallback, callback) {
733
+ request = request || {};
734
+ let options;
735
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
736
+ callback = optionsOrCallback;
737
+ options = {};
738
+ }
739
+ else {
740
+ options = optionsOrCallback;
741
+ }
742
+ options = options || {};
743
+ options.otherArgs = options.otherArgs || {};
744
+ options.otherArgs.headers = options.otherArgs.headers || {};
745
+ options.otherArgs.headers['x-goog-request-params'] =
746
+ this._gaxModule.routingHeader.fromParams({
747
+ parent: request.parent ?? '',
748
+ });
749
+ this.initialize().catch((err) => {
750
+ throw err;
751
+ });
752
+ const wrappedCallback = callback
753
+ ? (error, values, nextPageRequest, rawResponse) => {
754
+ this._log.info('listLogs values %j', values);
755
+ callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
756
+ }
757
+ : undefined;
758
+ this._log.info('listLogs request %j', request);
759
+ return this.innerApiCalls
760
+ .listLogs(request, options, wrappedCallback)
761
+ ?.then(([response, input, output]) => {
762
+ this._log.info('listLogs values %j', response);
763
+ return [response, input, output];
764
+ });
765
+ }
766
+ /**
767
+ * Equivalent to `listLogs`, but returns a NodeJS Stream object.
768
+ * @param {Object} request
769
+ * The request object that will be sent.
770
+ * @param {string} request.parent
771
+ * Required. The resource name to list logs for:
772
+ *
773
+ * * `projects/[PROJECT_ID]`
774
+ * * `organizations/[ORGANIZATION_ID]`
775
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]`
776
+ * * `folders/[FOLDER_ID]`
777
+ * @param {string[]} [request.resourceNames]
778
+ * Optional. List of resource names to list logs for:
779
+ *
780
+ * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
781
+ * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
782
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
783
+ * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
784
+ *
785
+ * To support legacy queries, it could also be:
786
+ *
787
+ * * `projects/[PROJECT_ID]`
788
+ * * `organizations/[ORGANIZATION_ID]`
789
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]`
790
+ * * `folders/[FOLDER_ID]`
791
+ *
792
+ * The resource name in the `parent` field is added to this list.
793
+ * @param {number} [request.pageSize]
794
+ * Optional. The maximum number of results to return from this request.
795
+ * Non-positive values are ignored. The presence of `nextPageToken` in the
796
+ * response indicates that more results might be available.
797
+ * @param {string} [request.pageToken]
798
+ * Optional. If present, then retrieve the next batch of results from the
799
+ * preceding call to this method. `pageToken` must be the value of
800
+ * `nextPageToken` from the previous response. The values of other method
801
+ * parameters should be identical to those in the previous call.
802
+ * @param {object} [options]
803
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
804
+ * @returns {Stream}
805
+ * An object stream which emits an object representing string on 'data' event.
806
+ * The client library will perform auto-pagination by default: it will call the API as many
807
+ * times as needed. Note that it can affect your quota.
808
+ * We recommend using `listLogsAsync()`
809
+ * method described below for async iteration which you can stop as needed.
810
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
811
+ * for more details and examples.
812
+ */
813
+ listLogsStream(request, options) {
814
+ request = request || {};
815
+ options = options || {};
816
+ options.otherArgs = options.otherArgs || {};
817
+ options.otherArgs.headers = options.otherArgs.headers || {};
818
+ options.otherArgs.headers['x-goog-request-params'] =
819
+ this._gaxModule.routingHeader.fromParams({
820
+ parent: request.parent ?? '',
821
+ });
822
+ const defaultCallSettings = this._defaults['listLogs'];
823
+ const callSettings = defaultCallSettings.merge(options);
824
+ this.initialize().catch((err) => {
825
+ throw err;
826
+ });
827
+ this._log.info('listLogs stream %j', request);
828
+ return this.descriptors.page.listLogs.createStream(this.innerApiCalls.listLogs, request, callSettings);
829
+ }
830
+ /**
831
+ * Equivalent to `listLogs`, but returns an iterable object.
832
+ *
833
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
834
+ * @param {Object} request
835
+ * The request object that will be sent.
836
+ * @param {string} request.parent
837
+ * Required. The resource name to list logs for:
838
+ *
839
+ * * `projects/[PROJECT_ID]`
840
+ * * `organizations/[ORGANIZATION_ID]`
841
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]`
842
+ * * `folders/[FOLDER_ID]`
843
+ * @param {string[]} [request.resourceNames]
844
+ * Optional. List of resource names to list logs for:
845
+ *
846
+ * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
847
+ * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
848
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
849
+ * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`
850
+ *
851
+ * To support legacy queries, it could also be:
852
+ *
853
+ * * `projects/[PROJECT_ID]`
854
+ * * `organizations/[ORGANIZATION_ID]`
855
+ * * `billingAccounts/[BILLING_ACCOUNT_ID]`
856
+ * * `folders/[FOLDER_ID]`
857
+ *
858
+ * The resource name in the `parent` field is added to this list.
859
+ * @param {number} [request.pageSize]
860
+ * Optional. The maximum number of results to return from this request.
861
+ * Non-positive values are ignored. The presence of `nextPageToken` in the
862
+ * response indicates that more results might be available.
863
+ * @param {string} [request.pageToken]
864
+ * Optional. If present, then retrieve the next batch of results from the
865
+ * preceding call to this method. `pageToken` must be the value of
866
+ * `nextPageToken` from the previous response. The values of other method
867
+ * parameters should be identical to those in the previous call.
868
+ * @param {object} [options]
869
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
870
+ * @returns {Object}
871
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
872
+ * When you iterate the returned iterable, each element will be an object representing
873
+ * string. The API will be called under the hood as needed, once per the page,
874
+ * so you can stop the iteration when you don't need more results.
875
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
876
+ * for more details and examples.
877
+ * @example <caption>include:samples/generated/v2/logging_service_v2.list_logs.js</caption>
878
+ * region_tag:logging_v2_generated_LoggingServiceV2_ListLogs_async
879
+ */
880
+ listLogsAsync(request, options) {
881
+ request = request || {};
882
+ options = options || {};
883
+ options.otherArgs = options.otherArgs || {};
884
+ options.otherArgs.headers = options.otherArgs.headers || {};
885
+ options.otherArgs.headers['x-goog-request-params'] =
886
+ this._gaxModule.routingHeader.fromParams({
887
+ parent: request.parent ?? '',
888
+ });
889
+ const defaultCallSettings = this._defaults['listLogs'];
890
+ const callSettings = defaultCallSettings.merge(options);
891
+ this.initialize().catch((err) => {
892
+ throw err;
893
+ });
894
+ this._log.info('listLogs iterate %j', request);
895
+ return this.descriptors.page.listLogs.asyncIterate(this.innerApiCalls['listLogs'], request, callSettings);
896
+ }
897
+ // --------------------
898
+ // -- Path templates --
899
+ // --------------------
900
+ /**
901
+ * Return a fully-qualified billingAccountCmekSettings resource name string.
902
+ *
903
+ * @param {string} billing_account
904
+ * @returns {string} Resource name string.
905
+ */
906
+ billingAccountCmekSettingsPath(billingAccount) {
907
+ return this.pathTemplates.billingAccountCmekSettingsPathTemplate.render({
908
+ billing_account: billingAccount,
909
+ });
910
+ }
911
+ /**
912
+ * Parse the billing_account from BillingAccountCmekSettings resource.
913
+ *
914
+ * @param {string} billingAccountCmekSettingsName
915
+ * A fully-qualified path representing billing_account_cmekSettings resource.
916
+ * @returns {string} A string representing the billing_account.
917
+ */
918
+ matchBillingAccountFromBillingAccountCmekSettingsName(billingAccountCmekSettingsName) {
919
+ return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match(billingAccountCmekSettingsName).billing_account;
920
+ }
921
+ /**
922
+ * Return a fully-qualified billingAccountExclusion resource name string.
923
+ *
924
+ * @param {string} billing_account
925
+ * @param {string} exclusion
926
+ * @returns {string} Resource name string.
927
+ */
928
+ billingAccountExclusionPath(billingAccount, exclusion) {
929
+ return this.pathTemplates.billingAccountExclusionPathTemplate.render({
930
+ billing_account: billingAccount,
931
+ exclusion: exclusion,
932
+ });
933
+ }
934
+ /**
935
+ * Parse the billing_account from BillingAccountExclusion resource.
936
+ *
937
+ * @param {string} billingAccountExclusionName
938
+ * A fully-qualified path representing billing_account_exclusion resource.
939
+ * @returns {string} A string representing the billing_account.
940
+ */
941
+ matchBillingAccountFromBillingAccountExclusionName(billingAccountExclusionName) {
942
+ return this.pathTemplates.billingAccountExclusionPathTemplate.match(billingAccountExclusionName).billing_account;
943
+ }
944
+ /**
945
+ * Parse the exclusion from BillingAccountExclusion resource.
946
+ *
947
+ * @param {string} billingAccountExclusionName
948
+ * A fully-qualified path representing billing_account_exclusion resource.
949
+ * @returns {string} A string representing the exclusion.
950
+ */
951
+ matchExclusionFromBillingAccountExclusionName(billingAccountExclusionName) {
952
+ return this.pathTemplates.billingAccountExclusionPathTemplate.match(billingAccountExclusionName).exclusion;
953
+ }
954
+ /**
955
+ * Return a fully-qualified billingAccountLocationBucket resource name string.
956
+ *
957
+ * @param {string} billing_account
958
+ * @param {string} location
959
+ * @param {string} bucket
960
+ * @returns {string} Resource name string.
961
+ */
962
+ billingAccountLocationBucketPath(billingAccount, location, bucket) {
963
+ return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({
964
+ billing_account: billingAccount,
965
+ location: location,
966
+ bucket: bucket,
967
+ });
968
+ }
969
+ /**
970
+ * Parse the billing_account from BillingAccountLocationBucket resource.
971
+ *
972
+ * @param {string} billingAccountLocationBucketName
973
+ * A fully-qualified path representing billing_account_location_bucket resource.
974
+ * @returns {string} A string representing the billing_account.
975
+ */
976
+ matchBillingAccountFromBillingAccountLocationBucketName(billingAccountLocationBucketName) {
977
+ return this.pathTemplates.billingAccountLocationBucketPathTemplate.match(billingAccountLocationBucketName).billing_account;
978
+ }
979
+ /**
980
+ * Parse the location from BillingAccountLocationBucket resource.
981
+ *
982
+ * @param {string} billingAccountLocationBucketName
983
+ * A fully-qualified path representing billing_account_location_bucket resource.
984
+ * @returns {string} A string representing the location.
985
+ */
986
+ matchLocationFromBillingAccountLocationBucketName(billingAccountLocationBucketName) {
987
+ return this.pathTemplates.billingAccountLocationBucketPathTemplate.match(billingAccountLocationBucketName).location;
988
+ }
989
+ /**
990
+ * Parse the bucket from BillingAccountLocationBucket resource.
991
+ *
992
+ * @param {string} billingAccountLocationBucketName
993
+ * A fully-qualified path representing billing_account_location_bucket resource.
994
+ * @returns {string} A string representing the bucket.
995
+ */
996
+ matchBucketFromBillingAccountLocationBucketName(billingAccountLocationBucketName) {
997
+ return this.pathTemplates.billingAccountLocationBucketPathTemplate.match(billingAccountLocationBucketName).bucket;
998
+ }
999
+ /**
1000
+ * Return a fully-qualified billingAccountLocationBucketLink resource name string.
1001
+ *
1002
+ * @param {string} billing_account
1003
+ * @param {string} location
1004
+ * @param {string} bucket
1005
+ * @param {string} link
1006
+ * @returns {string} Resource name string.
1007
+ */
1008
+ billingAccountLocationBucketLinkPath(billingAccount, location, bucket, link) {
1009
+ return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render({
1010
+ billing_account: billingAccount,
1011
+ location: location,
1012
+ bucket: bucket,
1013
+ link: link,
1014
+ });
1015
+ }
1016
+ /**
1017
+ * Parse the billing_account from BillingAccountLocationBucketLink resource.
1018
+ *
1019
+ * @param {string} billingAccountLocationBucketLinkName
1020
+ * A fully-qualified path representing billing_account_location_bucket_link resource.
1021
+ * @returns {string} A string representing the billing_account.
1022
+ */
1023
+ matchBillingAccountFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
1024
+ return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).billing_account;
1025
+ }
1026
+ /**
1027
+ * Parse the location from BillingAccountLocationBucketLink resource.
1028
+ *
1029
+ * @param {string} billingAccountLocationBucketLinkName
1030
+ * A fully-qualified path representing billing_account_location_bucket_link resource.
1031
+ * @returns {string} A string representing the location.
1032
+ */
1033
+ matchLocationFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
1034
+ return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).location;
1035
+ }
1036
+ /**
1037
+ * Parse the bucket from BillingAccountLocationBucketLink resource.
1038
+ *
1039
+ * @param {string} billingAccountLocationBucketLinkName
1040
+ * A fully-qualified path representing billing_account_location_bucket_link resource.
1041
+ * @returns {string} A string representing the bucket.
1042
+ */
1043
+ matchBucketFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
1044
+ return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).bucket;
1045
+ }
1046
+ /**
1047
+ * Parse the link from BillingAccountLocationBucketLink resource.
1048
+ *
1049
+ * @param {string} billingAccountLocationBucketLinkName
1050
+ * A fully-qualified path representing billing_account_location_bucket_link resource.
1051
+ * @returns {string} A string representing the link.
1052
+ */
1053
+ matchLinkFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
1054
+ return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).link;
1055
+ }
1056
+ /**
1057
+ * Return a fully-qualified billingAccountLocationBucketView resource name string.
1058
+ *
1059
+ * @param {string} billing_account
1060
+ * @param {string} location
1061
+ * @param {string} bucket
1062
+ * @param {string} view
1063
+ * @returns {string} Resource name string.
1064
+ */
1065
+ billingAccountLocationBucketViewPath(billingAccount, location, bucket, view) {
1066
+ return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render({
1067
+ billing_account: billingAccount,
1068
+ location: location,
1069
+ bucket: bucket,
1070
+ view: view,
1071
+ });
1072
+ }
1073
+ /**
1074
+ * Parse the billing_account from BillingAccountLocationBucketView resource.
1075
+ *
1076
+ * @param {string} billingAccountLocationBucketViewName
1077
+ * A fully-qualified path representing billing_account_location_bucket_view resource.
1078
+ * @returns {string} A string representing the billing_account.
1079
+ */
1080
+ matchBillingAccountFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
1081
+ return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).billing_account;
1082
+ }
1083
+ /**
1084
+ * Parse the location from BillingAccountLocationBucketView resource.
1085
+ *
1086
+ * @param {string} billingAccountLocationBucketViewName
1087
+ * A fully-qualified path representing billing_account_location_bucket_view resource.
1088
+ * @returns {string} A string representing the location.
1089
+ */
1090
+ matchLocationFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
1091
+ return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).location;
1092
+ }
1093
+ /**
1094
+ * Parse the bucket from BillingAccountLocationBucketView resource.
1095
+ *
1096
+ * @param {string} billingAccountLocationBucketViewName
1097
+ * A fully-qualified path representing billing_account_location_bucket_view resource.
1098
+ * @returns {string} A string representing the bucket.
1099
+ */
1100
+ matchBucketFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
1101
+ return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).bucket;
1102
+ }
1103
+ /**
1104
+ * Parse the view from BillingAccountLocationBucketView resource.
1105
+ *
1106
+ * @param {string} billingAccountLocationBucketViewName
1107
+ * A fully-qualified path representing billing_account_location_bucket_view resource.
1108
+ * @returns {string} A string representing the view.
1109
+ */
1110
+ matchViewFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
1111
+ return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).view;
1112
+ }
1113
+ /**
1114
+ * Return a fully-qualified billingAccountLog resource name string.
1115
+ *
1116
+ * @param {string} billing_account
1117
+ * @param {string} log
1118
+ * @returns {string} Resource name string.
1119
+ */
1120
+ billingAccountLogPath(billingAccount, log) {
1121
+ return this.pathTemplates.billingAccountLogPathTemplate.render({
1122
+ billing_account: billingAccount,
1123
+ log: log,
1124
+ });
1125
+ }
1126
+ /**
1127
+ * Parse the billing_account from BillingAccountLog resource.
1128
+ *
1129
+ * @param {string} billingAccountLogName
1130
+ * A fully-qualified path representing billing_account_log resource.
1131
+ * @returns {string} A string representing the billing_account.
1132
+ */
1133
+ matchBillingAccountFromBillingAccountLogName(billingAccountLogName) {
1134
+ return this.pathTemplates.billingAccountLogPathTemplate.match(billingAccountLogName).billing_account;
1135
+ }
1136
+ /**
1137
+ * Parse the log from BillingAccountLog resource.
1138
+ *
1139
+ * @param {string} billingAccountLogName
1140
+ * A fully-qualified path representing billing_account_log resource.
1141
+ * @returns {string} A string representing the log.
1142
+ */
1143
+ matchLogFromBillingAccountLogName(billingAccountLogName) {
1144
+ return this.pathTemplates.billingAccountLogPathTemplate.match(billingAccountLogName).log;
1145
+ }
1146
+ /**
1147
+ * Return a fully-qualified billingAccountSettings resource name string.
1148
+ *
1149
+ * @param {string} billing_account
1150
+ * @returns {string} Resource name string.
1151
+ */
1152
+ billingAccountSettingsPath(billingAccount) {
1153
+ return this.pathTemplates.billingAccountSettingsPathTemplate.render({
1154
+ billing_account: billingAccount,
1155
+ });
1156
+ }
1157
+ /**
1158
+ * Parse the billing_account from BillingAccountSettings resource.
1159
+ *
1160
+ * @param {string} billingAccountSettingsName
1161
+ * A fully-qualified path representing billing_account_settings resource.
1162
+ * @returns {string} A string representing the billing_account.
1163
+ */
1164
+ matchBillingAccountFromBillingAccountSettingsName(billingAccountSettingsName) {
1165
+ return this.pathTemplates.billingAccountSettingsPathTemplate.match(billingAccountSettingsName).billing_account;
1166
+ }
1167
+ /**
1168
+ * Return a fully-qualified billingAccountSink resource name string.
1169
+ *
1170
+ * @param {string} billing_account
1171
+ * @param {string} sink
1172
+ * @returns {string} Resource name string.
1173
+ */
1174
+ billingAccountSinkPath(billingAccount, sink) {
1175
+ return this.pathTemplates.billingAccountSinkPathTemplate.render({
1176
+ billing_account: billingAccount,
1177
+ sink: sink,
1178
+ });
1179
+ }
1180
+ /**
1181
+ * Parse the billing_account from BillingAccountSink resource.
1182
+ *
1183
+ * @param {string} billingAccountSinkName
1184
+ * A fully-qualified path representing billing_account_sink resource.
1185
+ * @returns {string} A string representing the billing_account.
1186
+ */
1187
+ matchBillingAccountFromBillingAccountSinkName(billingAccountSinkName) {
1188
+ return this.pathTemplates.billingAccountSinkPathTemplate.match(billingAccountSinkName).billing_account;
1189
+ }
1190
+ /**
1191
+ * Parse the sink from BillingAccountSink resource.
1192
+ *
1193
+ * @param {string} billingAccountSinkName
1194
+ * A fully-qualified path representing billing_account_sink resource.
1195
+ * @returns {string} A string representing the sink.
1196
+ */
1197
+ matchSinkFromBillingAccountSinkName(billingAccountSinkName) {
1198
+ return this.pathTemplates.billingAccountSinkPathTemplate.match(billingAccountSinkName).sink;
1199
+ }
1200
+ /**
1201
+ * Return a fully-qualified folderCmekSettings resource name string.
1202
+ *
1203
+ * @param {string} folder
1204
+ * @returns {string} Resource name string.
1205
+ */
1206
+ folderCmekSettingsPath(folder) {
1207
+ return this.pathTemplates.folderCmekSettingsPathTemplate.render({
1208
+ folder: folder,
1209
+ });
1210
+ }
1211
+ /**
1212
+ * Parse the folder from FolderCmekSettings resource.
1213
+ *
1214
+ * @param {string} folderCmekSettingsName
1215
+ * A fully-qualified path representing folder_cmekSettings resource.
1216
+ * @returns {string} A string representing the folder.
1217
+ */
1218
+ matchFolderFromFolderCmekSettingsName(folderCmekSettingsName) {
1219
+ return this.pathTemplates.folderCmekSettingsPathTemplate.match(folderCmekSettingsName).folder;
1220
+ }
1221
+ /**
1222
+ * Return a fully-qualified folderExclusion resource name string.
1223
+ *
1224
+ * @param {string} folder
1225
+ * @param {string} exclusion
1226
+ * @returns {string} Resource name string.
1227
+ */
1228
+ folderExclusionPath(folder, exclusion) {
1229
+ return this.pathTemplates.folderExclusionPathTemplate.render({
1230
+ folder: folder,
1231
+ exclusion: exclusion,
1232
+ });
1233
+ }
1234
+ /**
1235
+ * Parse the folder from FolderExclusion resource.
1236
+ *
1237
+ * @param {string} folderExclusionName
1238
+ * A fully-qualified path representing folder_exclusion resource.
1239
+ * @returns {string} A string representing the folder.
1240
+ */
1241
+ matchFolderFromFolderExclusionName(folderExclusionName) {
1242
+ return this.pathTemplates.folderExclusionPathTemplate.match(folderExclusionName).folder;
1243
+ }
1244
+ /**
1245
+ * Parse the exclusion from FolderExclusion resource.
1246
+ *
1247
+ * @param {string} folderExclusionName
1248
+ * A fully-qualified path representing folder_exclusion resource.
1249
+ * @returns {string} A string representing the exclusion.
1250
+ */
1251
+ matchExclusionFromFolderExclusionName(folderExclusionName) {
1252
+ return this.pathTemplates.folderExclusionPathTemplate.match(folderExclusionName).exclusion;
1253
+ }
1254
+ /**
1255
+ * Return a fully-qualified folderLocationBucket resource name string.
1256
+ *
1257
+ * @param {string} folder
1258
+ * @param {string} location
1259
+ * @param {string} bucket
1260
+ * @returns {string} Resource name string.
1261
+ */
1262
+ folderLocationBucketPath(folder, location, bucket) {
1263
+ return this.pathTemplates.folderLocationBucketPathTemplate.render({
1264
+ folder: folder,
1265
+ location: location,
1266
+ bucket: bucket,
1267
+ });
1268
+ }
1269
+ /**
1270
+ * Parse the folder from FolderLocationBucket resource.
1271
+ *
1272
+ * @param {string} folderLocationBucketName
1273
+ * A fully-qualified path representing folder_location_bucket resource.
1274
+ * @returns {string} A string representing the folder.
1275
+ */
1276
+ matchFolderFromFolderLocationBucketName(folderLocationBucketName) {
1277
+ return this.pathTemplates.folderLocationBucketPathTemplate.match(folderLocationBucketName).folder;
1278
+ }
1279
+ /**
1280
+ * Parse the location from FolderLocationBucket resource.
1281
+ *
1282
+ * @param {string} folderLocationBucketName
1283
+ * A fully-qualified path representing folder_location_bucket resource.
1284
+ * @returns {string} A string representing the location.
1285
+ */
1286
+ matchLocationFromFolderLocationBucketName(folderLocationBucketName) {
1287
+ return this.pathTemplates.folderLocationBucketPathTemplate.match(folderLocationBucketName).location;
1288
+ }
1289
+ /**
1290
+ * Parse the bucket from FolderLocationBucket resource.
1291
+ *
1292
+ * @param {string} folderLocationBucketName
1293
+ * A fully-qualified path representing folder_location_bucket resource.
1294
+ * @returns {string} A string representing the bucket.
1295
+ */
1296
+ matchBucketFromFolderLocationBucketName(folderLocationBucketName) {
1297
+ return this.pathTemplates.folderLocationBucketPathTemplate.match(folderLocationBucketName).bucket;
1298
+ }
1299
+ /**
1300
+ * Return a fully-qualified folderLocationBucketLink resource name string.
1301
+ *
1302
+ * @param {string} folder
1303
+ * @param {string} location
1304
+ * @param {string} bucket
1305
+ * @param {string} link
1306
+ * @returns {string} Resource name string.
1307
+ */
1308
+ folderLocationBucketLinkPath(folder, location, bucket, link) {
1309
+ return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({
1310
+ folder: folder,
1311
+ location: location,
1312
+ bucket: bucket,
1313
+ link: link,
1314
+ });
1315
+ }
1316
+ /**
1317
+ * Parse the folder from FolderLocationBucketLink resource.
1318
+ *
1319
+ * @param {string} folderLocationBucketLinkName
1320
+ * A fully-qualified path representing folder_location_bucket_link resource.
1321
+ * @returns {string} A string representing the folder.
1322
+ */
1323
+ matchFolderFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
1324
+ return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).folder;
1325
+ }
1326
+ /**
1327
+ * Parse the location from FolderLocationBucketLink resource.
1328
+ *
1329
+ * @param {string} folderLocationBucketLinkName
1330
+ * A fully-qualified path representing folder_location_bucket_link resource.
1331
+ * @returns {string} A string representing the location.
1332
+ */
1333
+ matchLocationFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
1334
+ return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).location;
1335
+ }
1336
+ /**
1337
+ * Parse the bucket from FolderLocationBucketLink resource.
1338
+ *
1339
+ * @param {string} folderLocationBucketLinkName
1340
+ * A fully-qualified path representing folder_location_bucket_link resource.
1341
+ * @returns {string} A string representing the bucket.
1342
+ */
1343
+ matchBucketFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
1344
+ return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).bucket;
1345
+ }
1346
+ /**
1347
+ * Parse the link from FolderLocationBucketLink resource.
1348
+ *
1349
+ * @param {string} folderLocationBucketLinkName
1350
+ * A fully-qualified path representing folder_location_bucket_link resource.
1351
+ * @returns {string} A string representing the link.
1352
+ */
1353
+ matchLinkFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
1354
+ return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).link;
1355
+ }
1356
+ /**
1357
+ * Return a fully-qualified folderLocationBucketView resource name string.
1358
+ *
1359
+ * @param {string} folder
1360
+ * @param {string} location
1361
+ * @param {string} bucket
1362
+ * @param {string} view
1363
+ * @returns {string} Resource name string.
1364
+ */
1365
+ folderLocationBucketViewPath(folder, location, bucket, view) {
1366
+ return this.pathTemplates.folderLocationBucketViewPathTemplate.render({
1367
+ folder: folder,
1368
+ location: location,
1369
+ bucket: bucket,
1370
+ view: view,
1371
+ });
1372
+ }
1373
+ /**
1374
+ * Parse the folder from FolderLocationBucketView resource.
1375
+ *
1376
+ * @param {string} folderLocationBucketViewName
1377
+ * A fully-qualified path representing folder_location_bucket_view resource.
1378
+ * @returns {string} A string representing the folder.
1379
+ */
1380
+ matchFolderFromFolderLocationBucketViewName(folderLocationBucketViewName) {
1381
+ return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).folder;
1382
+ }
1383
+ /**
1384
+ * Parse the location from FolderLocationBucketView resource.
1385
+ *
1386
+ * @param {string} folderLocationBucketViewName
1387
+ * A fully-qualified path representing folder_location_bucket_view resource.
1388
+ * @returns {string} A string representing the location.
1389
+ */
1390
+ matchLocationFromFolderLocationBucketViewName(folderLocationBucketViewName) {
1391
+ return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).location;
1392
+ }
1393
+ /**
1394
+ * Parse the bucket from FolderLocationBucketView resource.
1395
+ *
1396
+ * @param {string} folderLocationBucketViewName
1397
+ * A fully-qualified path representing folder_location_bucket_view resource.
1398
+ * @returns {string} A string representing the bucket.
1399
+ */
1400
+ matchBucketFromFolderLocationBucketViewName(folderLocationBucketViewName) {
1401
+ return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).bucket;
1402
+ }
1403
+ /**
1404
+ * Parse the view from FolderLocationBucketView resource.
1405
+ *
1406
+ * @param {string} folderLocationBucketViewName
1407
+ * A fully-qualified path representing folder_location_bucket_view resource.
1408
+ * @returns {string} A string representing the view.
1409
+ */
1410
+ matchViewFromFolderLocationBucketViewName(folderLocationBucketViewName) {
1411
+ return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).view;
1412
+ }
1413
+ /**
1414
+ * Return a fully-qualified folderLog resource name string.
1415
+ *
1416
+ * @param {string} folder
1417
+ * @param {string} log
1418
+ * @returns {string} Resource name string.
1419
+ */
1420
+ folderLogPath(folder, log) {
1421
+ return this.pathTemplates.folderLogPathTemplate.render({
1422
+ folder: folder,
1423
+ log: log,
1424
+ });
1425
+ }
1426
+ /**
1427
+ * Parse the folder from FolderLog resource.
1428
+ *
1429
+ * @param {string} folderLogName
1430
+ * A fully-qualified path representing folder_log resource.
1431
+ * @returns {string} A string representing the folder.
1432
+ */
1433
+ matchFolderFromFolderLogName(folderLogName) {
1434
+ return this.pathTemplates.folderLogPathTemplate.match(folderLogName).folder;
1435
+ }
1436
+ /**
1437
+ * Parse the log from FolderLog resource.
1438
+ *
1439
+ * @param {string} folderLogName
1440
+ * A fully-qualified path representing folder_log resource.
1441
+ * @returns {string} A string representing the log.
1442
+ */
1443
+ matchLogFromFolderLogName(folderLogName) {
1444
+ return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log;
1445
+ }
1446
+ /**
1447
+ * Return a fully-qualified folderSettings resource name string.
1448
+ *
1449
+ * @param {string} folder
1450
+ * @returns {string} Resource name string.
1451
+ */
1452
+ folderSettingsPath(folder) {
1453
+ return this.pathTemplates.folderSettingsPathTemplate.render({
1454
+ folder: folder,
1455
+ });
1456
+ }
1457
+ /**
1458
+ * Parse the folder from FolderSettings resource.
1459
+ *
1460
+ * @param {string} folderSettingsName
1461
+ * A fully-qualified path representing folder_settings resource.
1462
+ * @returns {string} A string representing the folder.
1463
+ */
1464
+ matchFolderFromFolderSettingsName(folderSettingsName) {
1465
+ return this.pathTemplates.folderSettingsPathTemplate.match(folderSettingsName).folder;
1466
+ }
1467
+ /**
1468
+ * Return a fully-qualified folderSink resource name string.
1469
+ *
1470
+ * @param {string} folder
1471
+ * @param {string} sink
1472
+ * @returns {string} Resource name string.
1473
+ */
1474
+ folderSinkPath(folder, sink) {
1475
+ return this.pathTemplates.folderSinkPathTemplate.render({
1476
+ folder: folder,
1477
+ sink: sink,
1478
+ });
1479
+ }
1480
+ /**
1481
+ * Parse the folder from FolderSink resource.
1482
+ *
1483
+ * @param {string} folderSinkName
1484
+ * A fully-qualified path representing folder_sink resource.
1485
+ * @returns {string} A string representing the folder.
1486
+ */
1487
+ matchFolderFromFolderSinkName(folderSinkName) {
1488
+ return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName)
1489
+ .folder;
1490
+ }
1491
+ /**
1492
+ * Parse the sink from FolderSink resource.
1493
+ *
1494
+ * @param {string} folderSinkName
1495
+ * A fully-qualified path representing folder_sink resource.
1496
+ * @returns {string} A string representing the sink.
1497
+ */
1498
+ matchSinkFromFolderSinkName(folderSinkName) {
1499
+ return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName).sink;
1500
+ }
1501
+ /**
1502
+ * Return a fully-qualified logMetric resource name string.
1503
+ *
1504
+ * @param {string} project
1505
+ * @param {string} metric
1506
+ * @returns {string} Resource name string.
1507
+ */
1508
+ logMetricPath(project, metric) {
1509
+ return this.pathTemplates.logMetricPathTemplate.render({
1510
+ project: project,
1511
+ metric: metric,
1512
+ });
1513
+ }
1514
+ /**
1515
+ * Parse the project from LogMetric resource.
1516
+ *
1517
+ * @param {string} logMetricName
1518
+ * A fully-qualified path representing LogMetric resource.
1519
+ * @returns {string} A string representing the project.
1520
+ */
1521
+ matchProjectFromLogMetricName(logMetricName) {
1522
+ return this.pathTemplates.logMetricPathTemplate.match(logMetricName)
1523
+ .project;
1524
+ }
1525
+ /**
1526
+ * Parse the metric from LogMetric resource.
1527
+ *
1528
+ * @param {string} logMetricName
1529
+ * A fully-qualified path representing LogMetric resource.
1530
+ * @returns {string} A string representing the metric.
1531
+ */
1532
+ matchMetricFromLogMetricName(logMetricName) {
1533
+ return this.pathTemplates.logMetricPathTemplate.match(logMetricName).metric;
1534
+ }
1535
+ /**
1536
+ * Return a fully-qualified organizationCmekSettings resource name string.
1537
+ *
1538
+ * @param {string} organization
1539
+ * @returns {string} Resource name string.
1540
+ */
1541
+ organizationCmekSettingsPath(organization) {
1542
+ return this.pathTemplates.organizationCmekSettingsPathTemplate.render({
1543
+ organization: organization,
1544
+ });
1545
+ }
1546
+ /**
1547
+ * Parse the organization from OrganizationCmekSettings resource.
1548
+ *
1549
+ * @param {string} organizationCmekSettingsName
1550
+ * A fully-qualified path representing organization_cmekSettings resource.
1551
+ * @returns {string} A string representing the organization.
1552
+ */
1553
+ matchOrganizationFromOrganizationCmekSettingsName(organizationCmekSettingsName) {
1554
+ return this.pathTemplates.organizationCmekSettingsPathTemplate.match(organizationCmekSettingsName).organization;
1555
+ }
1556
+ /**
1557
+ * Return a fully-qualified organizationExclusion resource name string.
1558
+ *
1559
+ * @param {string} organization
1560
+ * @param {string} exclusion
1561
+ * @returns {string} Resource name string.
1562
+ */
1563
+ organizationExclusionPath(organization, exclusion) {
1564
+ return this.pathTemplates.organizationExclusionPathTemplate.render({
1565
+ organization: organization,
1566
+ exclusion: exclusion,
1567
+ });
1568
+ }
1569
+ /**
1570
+ * Parse the organization from OrganizationExclusion resource.
1571
+ *
1572
+ * @param {string} organizationExclusionName
1573
+ * A fully-qualified path representing organization_exclusion resource.
1574
+ * @returns {string} A string representing the organization.
1575
+ */
1576
+ matchOrganizationFromOrganizationExclusionName(organizationExclusionName) {
1577
+ return this.pathTemplates.organizationExclusionPathTemplate.match(organizationExclusionName).organization;
1578
+ }
1579
+ /**
1580
+ * Parse the exclusion from OrganizationExclusion resource.
1581
+ *
1582
+ * @param {string} organizationExclusionName
1583
+ * A fully-qualified path representing organization_exclusion resource.
1584
+ * @returns {string} A string representing the exclusion.
1585
+ */
1586
+ matchExclusionFromOrganizationExclusionName(organizationExclusionName) {
1587
+ return this.pathTemplates.organizationExclusionPathTemplate.match(organizationExclusionName).exclusion;
1588
+ }
1589
+ /**
1590
+ * Return a fully-qualified organizationLocationBucket resource name string.
1591
+ *
1592
+ * @param {string} organization
1593
+ * @param {string} location
1594
+ * @param {string} bucket
1595
+ * @returns {string} Resource name string.
1596
+ */
1597
+ organizationLocationBucketPath(organization, location, bucket) {
1598
+ return this.pathTemplates.organizationLocationBucketPathTemplate.render({
1599
+ organization: organization,
1600
+ location: location,
1601
+ bucket: bucket,
1602
+ });
1603
+ }
1604
+ /**
1605
+ * Parse the organization from OrganizationLocationBucket resource.
1606
+ *
1607
+ * @param {string} organizationLocationBucketName
1608
+ * A fully-qualified path representing organization_location_bucket resource.
1609
+ * @returns {string} A string representing the organization.
1610
+ */
1611
+ matchOrganizationFromOrganizationLocationBucketName(organizationLocationBucketName) {
1612
+ return this.pathTemplates.organizationLocationBucketPathTemplate.match(organizationLocationBucketName).organization;
1613
+ }
1614
+ /**
1615
+ * Parse the location from OrganizationLocationBucket resource.
1616
+ *
1617
+ * @param {string} organizationLocationBucketName
1618
+ * A fully-qualified path representing organization_location_bucket resource.
1619
+ * @returns {string} A string representing the location.
1620
+ */
1621
+ matchLocationFromOrganizationLocationBucketName(organizationLocationBucketName) {
1622
+ return this.pathTemplates.organizationLocationBucketPathTemplate.match(organizationLocationBucketName).location;
1623
+ }
1624
+ /**
1625
+ * Parse the bucket from OrganizationLocationBucket resource.
1626
+ *
1627
+ * @param {string} organizationLocationBucketName
1628
+ * A fully-qualified path representing organization_location_bucket resource.
1629
+ * @returns {string} A string representing the bucket.
1630
+ */
1631
+ matchBucketFromOrganizationLocationBucketName(organizationLocationBucketName) {
1632
+ return this.pathTemplates.organizationLocationBucketPathTemplate.match(organizationLocationBucketName).bucket;
1633
+ }
1634
+ /**
1635
+ * Return a fully-qualified organizationLocationBucketLink resource name string.
1636
+ *
1637
+ * @param {string} organization
1638
+ * @param {string} location
1639
+ * @param {string} bucket
1640
+ * @param {string} link
1641
+ * @returns {string} Resource name string.
1642
+ */
1643
+ organizationLocationBucketLinkPath(organization, location, bucket, link) {
1644
+ return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render({
1645
+ organization: organization,
1646
+ location: location,
1647
+ bucket: bucket,
1648
+ link: link,
1649
+ });
1650
+ }
1651
+ /**
1652
+ * Parse the organization from OrganizationLocationBucketLink resource.
1653
+ *
1654
+ * @param {string} organizationLocationBucketLinkName
1655
+ * A fully-qualified path representing organization_location_bucket_link resource.
1656
+ * @returns {string} A string representing the organization.
1657
+ */
1658
+ matchOrganizationFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
1659
+ return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).organization;
1660
+ }
1661
+ /**
1662
+ * Parse the location from OrganizationLocationBucketLink resource.
1663
+ *
1664
+ * @param {string} organizationLocationBucketLinkName
1665
+ * A fully-qualified path representing organization_location_bucket_link resource.
1666
+ * @returns {string} A string representing the location.
1667
+ */
1668
+ matchLocationFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
1669
+ return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).location;
1670
+ }
1671
+ /**
1672
+ * Parse the bucket from OrganizationLocationBucketLink resource.
1673
+ *
1674
+ * @param {string} organizationLocationBucketLinkName
1675
+ * A fully-qualified path representing organization_location_bucket_link resource.
1676
+ * @returns {string} A string representing the bucket.
1677
+ */
1678
+ matchBucketFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
1679
+ return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).bucket;
1680
+ }
1681
+ /**
1682
+ * Parse the link from OrganizationLocationBucketLink resource.
1683
+ *
1684
+ * @param {string} organizationLocationBucketLinkName
1685
+ * A fully-qualified path representing organization_location_bucket_link resource.
1686
+ * @returns {string} A string representing the link.
1687
+ */
1688
+ matchLinkFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
1689
+ return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).link;
1690
+ }
1691
+ /**
1692
+ * Return a fully-qualified organizationLocationBucketView resource name string.
1693
+ *
1694
+ * @param {string} organization
1695
+ * @param {string} location
1696
+ * @param {string} bucket
1697
+ * @param {string} view
1698
+ * @returns {string} Resource name string.
1699
+ */
1700
+ organizationLocationBucketViewPath(organization, location, bucket, view) {
1701
+ return this.pathTemplates.organizationLocationBucketViewPathTemplate.render({
1702
+ organization: organization,
1703
+ location: location,
1704
+ bucket: bucket,
1705
+ view: view,
1706
+ });
1707
+ }
1708
+ /**
1709
+ * Parse the organization from OrganizationLocationBucketView resource.
1710
+ *
1711
+ * @param {string} organizationLocationBucketViewName
1712
+ * A fully-qualified path representing organization_location_bucket_view resource.
1713
+ * @returns {string} A string representing the organization.
1714
+ */
1715
+ matchOrganizationFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
1716
+ return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).organization;
1717
+ }
1718
+ /**
1719
+ * Parse the location from OrganizationLocationBucketView resource.
1720
+ *
1721
+ * @param {string} organizationLocationBucketViewName
1722
+ * A fully-qualified path representing organization_location_bucket_view resource.
1723
+ * @returns {string} A string representing the location.
1724
+ */
1725
+ matchLocationFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
1726
+ return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).location;
1727
+ }
1728
+ /**
1729
+ * Parse the bucket from OrganizationLocationBucketView resource.
1730
+ *
1731
+ * @param {string} organizationLocationBucketViewName
1732
+ * A fully-qualified path representing organization_location_bucket_view resource.
1733
+ * @returns {string} A string representing the bucket.
1734
+ */
1735
+ matchBucketFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
1736
+ return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).bucket;
1737
+ }
1738
+ /**
1739
+ * Parse the view from OrganizationLocationBucketView resource.
1740
+ *
1741
+ * @param {string} organizationLocationBucketViewName
1742
+ * A fully-qualified path representing organization_location_bucket_view resource.
1743
+ * @returns {string} A string representing the view.
1744
+ */
1745
+ matchViewFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
1746
+ return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).view;
1747
+ }
1748
+ /**
1749
+ * Return a fully-qualified organizationLog resource name string.
1750
+ *
1751
+ * @param {string} organization
1752
+ * @param {string} log
1753
+ * @returns {string} Resource name string.
1754
+ */
1755
+ organizationLogPath(organization, log) {
1756
+ return this.pathTemplates.organizationLogPathTemplate.render({
1757
+ organization: organization,
1758
+ log: log,
1759
+ });
1760
+ }
1761
+ /**
1762
+ * Parse the organization from OrganizationLog resource.
1763
+ *
1764
+ * @param {string} organizationLogName
1765
+ * A fully-qualified path representing organization_log resource.
1766
+ * @returns {string} A string representing the organization.
1767
+ */
1768
+ matchOrganizationFromOrganizationLogName(organizationLogName) {
1769
+ return this.pathTemplates.organizationLogPathTemplate.match(organizationLogName).organization;
1770
+ }
1771
+ /**
1772
+ * Parse the log from OrganizationLog resource.
1773
+ *
1774
+ * @param {string} organizationLogName
1775
+ * A fully-qualified path representing organization_log resource.
1776
+ * @returns {string} A string representing the log.
1777
+ */
1778
+ matchLogFromOrganizationLogName(organizationLogName) {
1779
+ return this.pathTemplates.organizationLogPathTemplate.match(organizationLogName).log;
1780
+ }
1781
+ /**
1782
+ * Return a fully-qualified organizationSettings resource name string.
1783
+ *
1784
+ * @param {string} organization
1785
+ * @returns {string} Resource name string.
1786
+ */
1787
+ organizationSettingsPath(organization) {
1788
+ return this.pathTemplates.organizationSettingsPathTemplate.render({
1789
+ organization: organization,
1790
+ });
1791
+ }
1792
+ /**
1793
+ * Parse the organization from OrganizationSettings resource.
1794
+ *
1795
+ * @param {string} organizationSettingsName
1796
+ * A fully-qualified path representing organization_settings resource.
1797
+ * @returns {string} A string representing the organization.
1798
+ */
1799
+ matchOrganizationFromOrganizationSettingsName(organizationSettingsName) {
1800
+ return this.pathTemplates.organizationSettingsPathTemplate.match(organizationSettingsName).organization;
1801
+ }
1802
+ /**
1803
+ * Return a fully-qualified organizationSink resource name string.
1804
+ *
1805
+ * @param {string} organization
1806
+ * @param {string} sink
1807
+ * @returns {string} Resource name string.
1808
+ */
1809
+ organizationSinkPath(organization, sink) {
1810
+ return this.pathTemplates.organizationSinkPathTemplate.render({
1811
+ organization: organization,
1812
+ sink: sink,
1813
+ });
1814
+ }
1815
+ /**
1816
+ * Parse the organization from OrganizationSink resource.
1817
+ *
1818
+ * @param {string} organizationSinkName
1819
+ * A fully-qualified path representing organization_sink resource.
1820
+ * @returns {string} A string representing the organization.
1821
+ */
1822
+ matchOrganizationFromOrganizationSinkName(organizationSinkName) {
1823
+ return this.pathTemplates.organizationSinkPathTemplate.match(organizationSinkName).organization;
1824
+ }
1825
+ /**
1826
+ * Parse the sink from OrganizationSink resource.
1827
+ *
1828
+ * @param {string} organizationSinkName
1829
+ * A fully-qualified path representing organization_sink resource.
1830
+ * @returns {string} A string representing the sink.
1831
+ */
1832
+ matchSinkFromOrganizationSinkName(organizationSinkName) {
1833
+ return this.pathTemplates.organizationSinkPathTemplate.match(organizationSinkName).sink;
1834
+ }
1835
+ /**
1836
+ * Return a fully-qualified project resource name string.
1837
+ *
1838
+ * @param {string} project
1839
+ * @returns {string} Resource name string.
1840
+ */
1841
+ projectPath(project) {
1842
+ return this.pathTemplates.projectPathTemplate.render({
1843
+ project: project,
1844
+ });
1845
+ }
1846
+ /**
1847
+ * Parse the project from Project resource.
1848
+ *
1849
+ * @param {string} projectName
1850
+ * A fully-qualified path representing Project resource.
1851
+ * @returns {string} A string representing the project.
1852
+ */
1853
+ matchProjectFromProjectName(projectName) {
1854
+ return this.pathTemplates.projectPathTemplate.match(projectName).project;
1855
+ }
1856
+ /**
1857
+ * Return a fully-qualified projectCmekSettings resource name string.
1858
+ *
1859
+ * @param {string} project
1860
+ * @returns {string} Resource name string.
1861
+ */
1862
+ projectCmekSettingsPath(project) {
1863
+ return this.pathTemplates.projectCmekSettingsPathTemplate.render({
1864
+ project: project,
1865
+ });
1866
+ }
1867
+ /**
1868
+ * Parse the project from ProjectCmekSettings resource.
1869
+ *
1870
+ * @param {string} projectCmekSettingsName
1871
+ * A fully-qualified path representing project_cmekSettings resource.
1872
+ * @returns {string} A string representing the project.
1873
+ */
1874
+ matchProjectFromProjectCmekSettingsName(projectCmekSettingsName) {
1875
+ return this.pathTemplates.projectCmekSettingsPathTemplate.match(projectCmekSettingsName).project;
1876
+ }
1877
+ /**
1878
+ * Return a fully-qualified projectExclusion resource name string.
1879
+ *
1880
+ * @param {string} project
1881
+ * @param {string} exclusion
1882
+ * @returns {string} Resource name string.
1883
+ */
1884
+ projectExclusionPath(project, exclusion) {
1885
+ return this.pathTemplates.projectExclusionPathTemplate.render({
1886
+ project: project,
1887
+ exclusion: exclusion,
1888
+ });
1889
+ }
1890
+ /**
1891
+ * Parse the project from ProjectExclusion resource.
1892
+ *
1893
+ * @param {string} projectExclusionName
1894
+ * A fully-qualified path representing project_exclusion resource.
1895
+ * @returns {string} A string representing the project.
1896
+ */
1897
+ matchProjectFromProjectExclusionName(projectExclusionName) {
1898
+ return this.pathTemplates.projectExclusionPathTemplate.match(projectExclusionName).project;
1899
+ }
1900
+ /**
1901
+ * Parse the exclusion from ProjectExclusion resource.
1902
+ *
1903
+ * @param {string} projectExclusionName
1904
+ * A fully-qualified path representing project_exclusion resource.
1905
+ * @returns {string} A string representing the exclusion.
1906
+ */
1907
+ matchExclusionFromProjectExclusionName(projectExclusionName) {
1908
+ return this.pathTemplates.projectExclusionPathTemplate.match(projectExclusionName).exclusion;
1909
+ }
1910
+ /**
1911
+ * Return a fully-qualified projectLocationBucket resource name string.
1912
+ *
1913
+ * @param {string} project
1914
+ * @param {string} location
1915
+ * @param {string} bucket
1916
+ * @returns {string} Resource name string.
1917
+ */
1918
+ projectLocationBucketPath(project, location, bucket) {
1919
+ return this.pathTemplates.projectLocationBucketPathTemplate.render({
1920
+ project: project,
1921
+ location: location,
1922
+ bucket: bucket,
1923
+ });
1924
+ }
1925
+ /**
1926
+ * Parse the project from ProjectLocationBucket resource.
1927
+ *
1928
+ * @param {string} projectLocationBucketName
1929
+ * A fully-qualified path representing project_location_bucket resource.
1930
+ * @returns {string} A string representing the project.
1931
+ */
1932
+ matchProjectFromProjectLocationBucketName(projectLocationBucketName) {
1933
+ return this.pathTemplates.projectLocationBucketPathTemplate.match(projectLocationBucketName).project;
1934
+ }
1935
+ /**
1936
+ * Parse the location from ProjectLocationBucket resource.
1937
+ *
1938
+ * @param {string} projectLocationBucketName
1939
+ * A fully-qualified path representing project_location_bucket resource.
1940
+ * @returns {string} A string representing the location.
1941
+ */
1942
+ matchLocationFromProjectLocationBucketName(projectLocationBucketName) {
1943
+ return this.pathTemplates.projectLocationBucketPathTemplate.match(projectLocationBucketName).location;
1944
+ }
1945
+ /**
1946
+ * Parse the bucket from ProjectLocationBucket resource.
1947
+ *
1948
+ * @param {string} projectLocationBucketName
1949
+ * A fully-qualified path representing project_location_bucket resource.
1950
+ * @returns {string} A string representing the bucket.
1951
+ */
1952
+ matchBucketFromProjectLocationBucketName(projectLocationBucketName) {
1953
+ return this.pathTemplates.projectLocationBucketPathTemplate.match(projectLocationBucketName).bucket;
1954
+ }
1955
+ /**
1956
+ * Return a fully-qualified projectLocationBucketLink resource name string.
1957
+ *
1958
+ * @param {string} project
1959
+ * @param {string} location
1960
+ * @param {string} bucket
1961
+ * @param {string} link
1962
+ * @returns {string} Resource name string.
1963
+ */
1964
+ projectLocationBucketLinkPath(project, location, bucket, link) {
1965
+ return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({
1966
+ project: project,
1967
+ location: location,
1968
+ bucket: bucket,
1969
+ link: link,
1970
+ });
1971
+ }
1972
+ /**
1973
+ * Parse the project from ProjectLocationBucketLink resource.
1974
+ *
1975
+ * @param {string} projectLocationBucketLinkName
1976
+ * A fully-qualified path representing project_location_bucket_link resource.
1977
+ * @returns {string} A string representing the project.
1978
+ */
1979
+ matchProjectFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
1980
+ return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).project;
1981
+ }
1982
+ /**
1983
+ * Parse the location from ProjectLocationBucketLink resource.
1984
+ *
1985
+ * @param {string} projectLocationBucketLinkName
1986
+ * A fully-qualified path representing project_location_bucket_link resource.
1987
+ * @returns {string} A string representing the location.
1988
+ */
1989
+ matchLocationFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
1990
+ return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).location;
1991
+ }
1992
+ /**
1993
+ * Parse the bucket from ProjectLocationBucketLink resource.
1994
+ *
1995
+ * @param {string} projectLocationBucketLinkName
1996
+ * A fully-qualified path representing project_location_bucket_link resource.
1997
+ * @returns {string} A string representing the bucket.
1998
+ */
1999
+ matchBucketFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
2000
+ return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).bucket;
2001
+ }
2002
+ /**
2003
+ * Parse the link from ProjectLocationBucketLink resource.
2004
+ *
2005
+ * @param {string} projectLocationBucketLinkName
2006
+ * A fully-qualified path representing project_location_bucket_link resource.
2007
+ * @returns {string} A string representing the link.
2008
+ */
2009
+ matchLinkFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
2010
+ return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).link;
2011
+ }
2012
+ /**
2013
+ * Return a fully-qualified projectLocationBucketView resource name string.
2014
+ *
2015
+ * @param {string} project
2016
+ * @param {string} location
2017
+ * @param {string} bucket
2018
+ * @param {string} view
2019
+ * @returns {string} Resource name string.
2020
+ */
2021
+ projectLocationBucketViewPath(project, location, bucket, view) {
2022
+ return this.pathTemplates.projectLocationBucketViewPathTemplate.render({
2023
+ project: project,
2024
+ location: location,
2025
+ bucket: bucket,
2026
+ view: view,
2027
+ });
2028
+ }
2029
+ /**
2030
+ * Parse the project from ProjectLocationBucketView resource.
2031
+ *
2032
+ * @param {string} projectLocationBucketViewName
2033
+ * A fully-qualified path representing project_location_bucket_view resource.
2034
+ * @returns {string} A string representing the project.
2035
+ */
2036
+ matchProjectFromProjectLocationBucketViewName(projectLocationBucketViewName) {
2037
+ return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).project;
2038
+ }
2039
+ /**
2040
+ * Parse the location from ProjectLocationBucketView resource.
2041
+ *
2042
+ * @param {string} projectLocationBucketViewName
2043
+ * A fully-qualified path representing project_location_bucket_view resource.
2044
+ * @returns {string} A string representing the location.
2045
+ */
2046
+ matchLocationFromProjectLocationBucketViewName(projectLocationBucketViewName) {
2047
+ return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).location;
2048
+ }
2049
+ /**
2050
+ * Parse the bucket from ProjectLocationBucketView resource.
2051
+ *
2052
+ * @param {string} projectLocationBucketViewName
2053
+ * A fully-qualified path representing project_location_bucket_view resource.
2054
+ * @returns {string} A string representing the bucket.
2055
+ */
2056
+ matchBucketFromProjectLocationBucketViewName(projectLocationBucketViewName) {
2057
+ return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).bucket;
2058
+ }
2059
+ /**
2060
+ * Parse the view from ProjectLocationBucketView resource.
2061
+ *
2062
+ * @param {string} projectLocationBucketViewName
2063
+ * A fully-qualified path representing project_location_bucket_view resource.
2064
+ * @returns {string} A string representing the view.
2065
+ */
2066
+ matchViewFromProjectLocationBucketViewName(projectLocationBucketViewName) {
2067
+ return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).view;
2068
+ }
2069
+ /**
2070
+ * Return a fully-qualified projectLog resource name string.
2071
+ *
2072
+ * @param {string} project
2073
+ * @param {string} log
2074
+ * @returns {string} Resource name string.
2075
+ */
2076
+ projectLogPath(project, log) {
2077
+ return this.pathTemplates.projectLogPathTemplate.render({
2078
+ project: project,
2079
+ log: log,
2080
+ });
2081
+ }
2082
+ /**
2083
+ * Parse the project from ProjectLog resource.
2084
+ *
2085
+ * @param {string} projectLogName
2086
+ * A fully-qualified path representing project_log resource.
2087
+ * @returns {string} A string representing the project.
2088
+ */
2089
+ matchProjectFromProjectLogName(projectLogName) {
2090
+ return this.pathTemplates.projectLogPathTemplate.match(projectLogName)
2091
+ .project;
2092
+ }
2093
+ /**
2094
+ * Parse the log from ProjectLog resource.
2095
+ *
2096
+ * @param {string} projectLogName
2097
+ * A fully-qualified path representing project_log resource.
2098
+ * @returns {string} A string representing the log.
2099
+ */
2100
+ matchLogFromProjectLogName(projectLogName) {
2101
+ return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log;
2102
+ }
2103
+ /**
2104
+ * Return a fully-qualified projectSettings resource name string.
2105
+ *
2106
+ * @param {string} project
2107
+ * @returns {string} Resource name string.
2108
+ */
2109
+ projectSettingsPath(project) {
2110
+ return this.pathTemplates.projectSettingsPathTemplate.render({
2111
+ project: project,
2112
+ });
2113
+ }
2114
+ /**
2115
+ * Parse the project from ProjectSettings resource.
2116
+ *
2117
+ * @param {string} projectSettingsName
2118
+ * A fully-qualified path representing project_settings resource.
2119
+ * @returns {string} A string representing the project.
2120
+ */
2121
+ matchProjectFromProjectSettingsName(projectSettingsName) {
2122
+ return this.pathTemplates.projectSettingsPathTemplate.match(projectSettingsName).project;
2123
+ }
2124
+ /**
2125
+ * Return a fully-qualified projectSink resource name string.
2126
+ *
2127
+ * @param {string} project
2128
+ * @param {string} sink
2129
+ * @returns {string} Resource name string.
2130
+ */
2131
+ projectSinkPath(project, sink) {
2132
+ return this.pathTemplates.projectSinkPathTemplate.render({
2133
+ project: project,
2134
+ sink: sink,
2135
+ });
2136
+ }
2137
+ /**
2138
+ * Parse the project from ProjectSink resource.
2139
+ *
2140
+ * @param {string} projectSinkName
2141
+ * A fully-qualified path representing project_sink resource.
2142
+ * @returns {string} A string representing the project.
2143
+ */
2144
+ matchProjectFromProjectSinkName(projectSinkName) {
2145
+ return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName)
2146
+ .project;
2147
+ }
2148
+ /**
2149
+ * Parse the sink from ProjectSink resource.
2150
+ *
2151
+ * @param {string} projectSinkName
2152
+ * A fully-qualified path representing project_sink resource.
2153
+ * @returns {string} A string representing the sink.
2154
+ */
2155
+ matchSinkFromProjectSinkName(projectSinkName) {
2156
+ return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName)
2157
+ .sink;
2158
+ }
2159
+ /**
2160
+ * Terminate the gRPC channel and close the client.
2161
+ *
2162
+ * The client will no longer be usable and all future behavior is undefined.
2163
+ * @returns {Promise} A promise that resolves when the client is closed.
2164
+ */
2165
+ close() {
2166
+ if (this.loggingServiceV2Stub && !this._terminated) {
2167
+ return this.loggingServiceV2Stub.then((stub) => {
2168
+ this._log.info('ending gRPC channel');
2169
+ this._terminated = true;
2170
+ stub.close();
2171
+ });
2172
+ }
2173
+ return Promise.resolve();
2174
+ }
2175
+ }
2176
+ exports.LoggingServiceV2Client = LoggingServiceV2Client;
2177
+ //# sourceMappingURL=logging_service_v2_client.js.map