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