@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.
- package/README.md +111 -0
- package/build/protos/google/logging/type/http_request.proto +95 -0
- package/build/protos/google/logging/type/log_severity.proto +71 -0
- package/build/protos/google/logging/v2/log_entry.proto +280 -0
- package/build/protos/google/logging/v2/logging.proto +483 -0
- package/build/protos/google/logging/v2/logging_config.proto +2317 -0
- package/build/protos/google/logging/v2/logging_metrics.proto +339 -0
- package/build/protos/protos.d.ts +19677 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +32 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v2/config_service_v2_client.d.ts +2879 -0
- package/build/src/v2/config_service_v2_client.js +3801 -0
- package/build/src/v2/config_service_v2_client.js.map +1 -0
- package/build/src/v2/config_service_v2_client_config.json +169 -0
- package/build/src/v2/config_service_v2_proto_list.json +8 -0
- package/build/src/v2/gapic_metadata.json +512 -0
- package/build/src/v2/index.d.ts +3 -0
- package/build/src/v2/index.js +27 -0
- package/build/src/v2/index.js.map +1 -0
- package/build/src/v2/logging_service_v2_client.d.ts +1617 -0
- package/build/src/v2/logging_service_v2_client.js +2177 -0
- package/build/src/v2/logging_service_v2_client.js.map +1 -0
- package/build/src/v2/logging_service_v2_client_config.json +61 -0
- package/build/src/v2/logging_service_v2_proto_list.json +8 -0
- package/build/src/v2/metrics_service_v2_client.d.ts +1249 -0
- package/build/src/v2/metrics_service_v2_client.js +1911 -0
- package/build/src/v2/metrics_service_v2_client.js.map +1 -0
- package/build/src/v2/metrics_service_v2_client_config.json +56 -0
- package/build/src/v2/metrics_service_v2_proto_list.json +8 -0
- package/package.json +67 -0
|
@@ -0,0 +1,3801 @@
|
|
|
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.ConfigServiceV2Client = 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/config_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("./config_service_v2_client_config.json");
|
|
29
|
+
const version = require('../../../package.json').version;
|
|
30
|
+
/**
|
|
31
|
+
* Service for configuring sinks used to route log entries.
|
|
32
|
+
* @class
|
|
33
|
+
* @memberof v2
|
|
34
|
+
*/
|
|
35
|
+
class ConfigServiceV2Client {
|
|
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
|
+
operationsClient;
|
|
57
|
+
configServiceV2Stub;
|
|
58
|
+
/**
|
|
59
|
+
* Construct an instance of ConfigServiceV2Client.
|
|
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 ConfigServiceV2Client({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
|
+
locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
|
|
187
|
+
logMetricPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/metrics/{metric}'),
|
|
188
|
+
organizationCmekSettingsPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/cmekSettings'),
|
|
189
|
+
organizationExclusionPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/exclusions/{exclusion}'),
|
|
190
|
+
organizationLocationBucketPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}'),
|
|
191
|
+
organizationLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}'),
|
|
192
|
+
organizationLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}'),
|
|
193
|
+
organizationLogPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/logs/{log}'),
|
|
194
|
+
organizationSettingsPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/settings'),
|
|
195
|
+
organizationSinkPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/sinks/{sink}'),
|
|
196
|
+
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
|
197
|
+
projectCmekSettingsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/cmekSettings'),
|
|
198
|
+
projectExclusionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/exclusions/{exclusion}'),
|
|
199
|
+
projectLocationBucketPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}'),
|
|
200
|
+
projectLocationBucketLinkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/links/{link}'),
|
|
201
|
+
projectLocationBucketViewPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/buckets/{bucket}/views/{view}'),
|
|
202
|
+
projectLogPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/logs/{log}'),
|
|
203
|
+
projectSettingsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/settings'),
|
|
204
|
+
projectSinkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/sinks/{sink}'),
|
|
205
|
+
};
|
|
206
|
+
// Some of the methods on this service return "paged" results,
|
|
207
|
+
// (e.g. 50 results at a time, with tokens to get subsequent
|
|
208
|
+
// pages). Denote the keys used for pagination and results.
|
|
209
|
+
this.descriptors.page = {
|
|
210
|
+
listBuckets: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'buckets'),
|
|
211
|
+
listViews: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'views'),
|
|
212
|
+
listSinks: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sinks'),
|
|
213
|
+
listLinks: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'links'),
|
|
214
|
+
listExclusions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'exclusions'),
|
|
215
|
+
};
|
|
216
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
|
217
|
+
// This API contains "long-running operations", which return a
|
|
218
|
+
// an Operation object that allows for tracking of the operation,
|
|
219
|
+
// rather than holding a request open.
|
|
220
|
+
const lroOptions = {
|
|
221
|
+
auth: this.auth,
|
|
222
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
|
223
|
+
};
|
|
224
|
+
if (opts.fallback) {
|
|
225
|
+
lroOptions.protoJson = protoFilesRoot;
|
|
226
|
+
lroOptions.httpRules = [
|
|
227
|
+
{
|
|
228
|
+
selector: 'google.longrunning.Operations.CancelOperation',
|
|
229
|
+
post: '/v2/{name=*/*/locations/*/operations/*}:cancel',
|
|
230
|
+
body: '*',
|
|
231
|
+
additional_bindings: [
|
|
232
|
+
{
|
|
233
|
+
post: '/v2/{name=projects/*/locations/*/operations/*}:cancel',
|
|
234
|
+
body: '*',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
post: '/v2/{name=organizations/*/locations/*/operations/*}:cancel',
|
|
238
|
+
body: '*',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
post: '/v2/{name=folders/*/locations/*/operations/*}:cancel',
|
|
242
|
+
body: '*',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
post: '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel',
|
|
246
|
+
body: '*',
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
selector: 'google.longrunning.Operations.GetOperation',
|
|
252
|
+
get: '/v2/{name=*/*/locations/*/operations/*}',
|
|
253
|
+
additional_bindings: [
|
|
254
|
+
{ get: '/v2/{name=projects/*/locations/*/operations/*}' },
|
|
255
|
+
{ get: '/v2/{name=organizations/*/locations/*/operations/*}' },
|
|
256
|
+
{ get: '/v2/{name=folders/*/locations/*/operations/*}' },
|
|
257
|
+
{ get: '/v2/{name=billingAccounts/*/locations/*/operations/*}' },
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
selector: 'google.longrunning.Operations.ListOperations',
|
|
262
|
+
get: '/v2/{name=*/*/locations/*}/operations',
|
|
263
|
+
additional_bindings: [
|
|
264
|
+
{ get: '/v2/{name=projects/*/locations/*}/operations' },
|
|
265
|
+
{ get: '/v2/{name=organizations/*/locations/*}/operations' },
|
|
266
|
+
{ get: '/v2/{name=folders/*/locations/*}/operations' },
|
|
267
|
+
{ get: '/v2/{name=billingAccounts/*/locations/*}/operations' },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
];
|
|
271
|
+
}
|
|
272
|
+
this.operationsClient = this._gaxModule
|
|
273
|
+
.lro(lroOptions)
|
|
274
|
+
.operationsClient(opts);
|
|
275
|
+
const createBucketAsyncResponse = protoFilesRoot.lookup('.google.logging.v2.LogBucket');
|
|
276
|
+
const createBucketAsyncMetadata = protoFilesRoot.lookup('.google.logging.v2.BucketMetadata');
|
|
277
|
+
const updateBucketAsyncResponse = protoFilesRoot.lookup('.google.logging.v2.LogBucket');
|
|
278
|
+
const updateBucketAsyncMetadata = protoFilesRoot.lookup('.google.logging.v2.BucketMetadata');
|
|
279
|
+
const createLinkResponse = protoFilesRoot.lookup('.google.logging.v2.Link');
|
|
280
|
+
const createLinkMetadata = protoFilesRoot.lookup('.google.logging.v2.LinkMetadata');
|
|
281
|
+
const deleteLinkResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
|
|
282
|
+
const deleteLinkMetadata = protoFilesRoot.lookup('.google.logging.v2.LinkMetadata');
|
|
283
|
+
const copyLogEntriesResponse = protoFilesRoot.lookup('.google.logging.v2.CopyLogEntriesResponse');
|
|
284
|
+
const copyLogEntriesMetadata = protoFilesRoot.lookup('.google.logging.v2.CopyLogEntriesMetadata');
|
|
285
|
+
this.descriptors.longrunning = {
|
|
286
|
+
createBucketAsync: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createBucketAsyncResponse.decode.bind(createBucketAsyncResponse), createBucketAsyncMetadata.decode.bind(createBucketAsyncMetadata)),
|
|
287
|
+
updateBucketAsync: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateBucketAsyncResponse.decode.bind(updateBucketAsyncResponse), updateBucketAsyncMetadata.decode.bind(updateBucketAsyncMetadata)),
|
|
288
|
+
createLink: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createLinkResponse.decode.bind(createLinkResponse), createLinkMetadata.decode.bind(createLinkMetadata)),
|
|
289
|
+
deleteLink: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteLinkResponse.decode.bind(deleteLinkResponse), deleteLinkMetadata.decode.bind(deleteLinkMetadata)),
|
|
290
|
+
copyLogEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, copyLogEntriesResponse.decode.bind(copyLogEntriesResponse), copyLogEntriesMetadata.decode.bind(copyLogEntriesMetadata)),
|
|
291
|
+
};
|
|
292
|
+
// Put together the default options sent with requests.
|
|
293
|
+
this._defaults = this._gaxGrpc.constructSettings('google.logging.v2.ConfigServiceV2', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
294
|
+
// Set up a dictionary of "inner API calls"; the core implementation
|
|
295
|
+
// of calling the API is handled in `google-gax`, with this code
|
|
296
|
+
// merely providing the destination and request information.
|
|
297
|
+
this.innerApiCalls = {};
|
|
298
|
+
// Add a warn function to the client constructor so it can be easily tested.
|
|
299
|
+
this.warn = this._gaxModule.warn;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Initialize the client.
|
|
303
|
+
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
304
|
+
* This function will be called automatically when any class method is called for the
|
|
305
|
+
* first time, but if you need to initialize it before calling an actual method,
|
|
306
|
+
* feel free to call initialize() directly.
|
|
307
|
+
*
|
|
308
|
+
* You can await on this method if you want to make sure the client is initialized.
|
|
309
|
+
*
|
|
310
|
+
* @returns {Promise} A promise that resolves to an authenticated service stub.
|
|
311
|
+
*/
|
|
312
|
+
initialize() {
|
|
313
|
+
// If the client stub promise is already initialized, return immediately.
|
|
314
|
+
if (this.configServiceV2Stub) {
|
|
315
|
+
return this.configServiceV2Stub;
|
|
316
|
+
}
|
|
317
|
+
// Put together the "service stub" for
|
|
318
|
+
// google.logging.v2.ConfigServiceV2.
|
|
319
|
+
this.configServiceV2Stub = this._gaxGrpc.createStub(this._opts.fallback
|
|
320
|
+
? this._protos.lookupService('google.logging.v2.ConfigServiceV2')
|
|
321
|
+
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
322
|
+
this._protos.google.logging.v2.ConfigServiceV2, this._opts, this._providedCustomServicePath);
|
|
323
|
+
// Iterate over each of the methods that the service provides
|
|
324
|
+
// and create an API call method for each.
|
|
325
|
+
const configServiceV2StubMethods = [
|
|
326
|
+
'listBuckets',
|
|
327
|
+
'getBucket',
|
|
328
|
+
'createBucketAsync',
|
|
329
|
+
'updateBucketAsync',
|
|
330
|
+
'createBucket',
|
|
331
|
+
'updateBucket',
|
|
332
|
+
'deleteBucket',
|
|
333
|
+
'undeleteBucket',
|
|
334
|
+
'listViews',
|
|
335
|
+
'getView',
|
|
336
|
+
'createView',
|
|
337
|
+
'updateView',
|
|
338
|
+
'deleteView',
|
|
339
|
+
'listSinks',
|
|
340
|
+
'getSink',
|
|
341
|
+
'createSink',
|
|
342
|
+
'updateSink',
|
|
343
|
+
'deleteSink',
|
|
344
|
+
'createLink',
|
|
345
|
+
'deleteLink',
|
|
346
|
+
'listLinks',
|
|
347
|
+
'getLink',
|
|
348
|
+
'listExclusions',
|
|
349
|
+
'getExclusion',
|
|
350
|
+
'createExclusion',
|
|
351
|
+
'updateExclusion',
|
|
352
|
+
'deleteExclusion',
|
|
353
|
+
'getCmekSettings',
|
|
354
|
+
'updateCmekSettings',
|
|
355
|
+
'getSettings',
|
|
356
|
+
'updateSettings',
|
|
357
|
+
'copyLogEntries',
|
|
358
|
+
];
|
|
359
|
+
for (const methodName of configServiceV2StubMethods) {
|
|
360
|
+
const callPromise = this.configServiceV2Stub.then((stub) => (...args) => {
|
|
361
|
+
if (this._terminated) {
|
|
362
|
+
return Promise.reject('The client has already been closed.');
|
|
363
|
+
}
|
|
364
|
+
const func = stub[methodName];
|
|
365
|
+
return func.apply(stub, args);
|
|
366
|
+
}, (err) => () => {
|
|
367
|
+
throw err;
|
|
368
|
+
});
|
|
369
|
+
const descriptor = this.descriptors.page[methodName] ||
|
|
370
|
+
this.descriptors.longrunning[methodName] ||
|
|
371
|
+
undefined;
|
|
372
|
+
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
|
373
|
+
this.innerApiCalls[methodName] = apiCall;
|
|
374
|
+
}
|
|
375
|
+
return this.configServiceV2Stub;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The DNS address for this API service.
|
|
379
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
380
|
+
* @returns {string} The DNS address for this service.
|
|
381
|
+
*/
|
|
382
|
+
static get servicePath() {
|
|
383
|
+
if (typeof process === 'object' &&
|
|
384
|
+
typeof process.emitWarning === 'function') {
|
|
385
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
386
|
+
}
|
|
387
|
+
return 'logging.googleapis.com';
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* The DNS address for this API service - same as servicePath.
|
|
391
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
392
|
+
* @returns {string} The DNS address for this service.
|
|
393
|
+
*/
|
|
394
|
+
static get apiEndpoint() {
|
|
395
|
+
if (typeof process === 'object' &&
|
|
396
|
+
typeof process.emitWarning === 'function') {
|
|
397
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
398
|
+
}
|
|
399
|
+
return 'logging.googleapis.com';
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* The DNS address for this API service.
|
|
403
|
+
* @returns {string} The DNS address for this service.
|
|
404
|
+
*/
|
|
405
|
+
get apiEndpoint() {
|
|
406
|
+
return this._servicePath;
|
|
407
|
+
}
|
|
408
|
+
get universeDomain() {
|
|
409
|
+
return this._universeDomain;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* The port for this API service.
|
|
413
|
+
* @returns {number} The default port for this service.
|
|
414
|
+
*/
|
|
415
|
+
static get port() {
|
|
416
|
+
return 443;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* The scopes needed to make gRPC calls for every method defined
|
|
420
|
+
* in this service.
|
|
421
|
+
* @returns {string[]} List of default scopes.
|
|
422
|
+
*/
|
|
423
|
+
static get scopes() {
|
|
424
|
+
return [
|
|
425
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
426
|
+
'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
427
|
+
'https://www.googleapis.com/auth/logging.admin',
|
|
428
|
+
'https://www.googleapis.com/auth/logging.read',
|
|
429
|
+
];
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Return the project ID used by this class.
|
|
433
|
+
* @returns {Promise} A promise that resolves to string containing the project ID.
|
|
434
|
+
*/
|
|
435
|
+
getProjectId(callback) {
|
|
436
|
+
if (callback) {
|
|
437
|
+
this.auth.getProjectId(callback);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
return this.auth.getProjectId();
|
|
441
|
+
}
|
|
442
|
+
getBucket(request, optionsOrCallback, callback) {
|
|
443
|
+
request = request || {};
|
|
444
|
+
let options;
|
|
445
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
446
|
+
callback = optionsOrCallback;
|
|
447
|
+
options = {};
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
options = optionsOrCallback;
|
|
451
|
+
}
|
|
452
|
+
options = options || {};
|
|
453
|
+
options.otherArgs = options.otherArgs || {};
|
|
454
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
455
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
456
|
+
this._gaxModule.routingHeader.fromParams({
|
|
457
|
+
name: request.name ?? '',
|
|
458
|
+
});
|
|
459
|
+
this.initialize().catch((err) => {
|
|
460
|
+
throw err;
|
|
461
|
+
});
|
|
462
|
+
this._log.info('getBucket request %j', request);
|
|
463
|
+
const wrappedCallback = callback
|
|
464
|
+
? (error, response, options, rawResponse) => {
|
|
465
|
+
this._log.info('getBucket response %j', response);
|
|
466
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
467
|
+
}
|
|
468
|
+
: undefined;
|
|
469
|
+
return this.innerApiCalls
|
|
470
|
+
.getBucket(request, options, wrappedCallback)
|
|
471
|
+
?.then(([response, options, rawResponse]) => {
|
|
472
|
+
this._log.info('getBucket response %j', response);
|
|
473
|
+
return [response, options, rawResponse];
|
|
474
|
+
})
|
|
475
|
+
.catch((error) => {
|
|
476
|
+
if (error &&
|
|
477
|
+
'statusDetails' in error &&
|
|
478
|
+
error.statusDetails instanceof Array) {
|
|
479
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
480
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
481
|
+
}
|
|
482
|
+
throw error;
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
createBucket(request, optionsOrCallback, callback) {
|
|
486
|
+
request = request || {};
|
|
487
|
+
let options;
|
|
488
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
489
|
+
callback = optionsOrCallback;
|
|
490
|
+
options = {};
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
options = optionsOrCallback;
|
|
494
|
+
}
|
|
495
|
+
options = options || {};
|
|
496
|
+
options.otherArgs = options.otherArgs || {};
|
|
497
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
498
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
499
|
+
this._gaxModule.routingHeader.fromParams({
|
|
500
|
+
parent: request.parent ?? '',
|
|
501
|
+
});
|
|
502
|
+
this.initialize().catch((err) => {
|
|
503
|
+
throw err;
|
|
504
|
+
});
|
|
505
|
+
this._log.info('createBucket request %j', request);
|
|
506
|
+
const wrappedCallback = callback
|
|
507
|
+
? (error, response, options, rawResponse) => {
|
|
508
|
+
this._log.info('createBucket response %j', response);
|
|
509
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
510
|
+
}
|
|
511
|
+
: undefined;
|
|
512
|
+
return this.innerApiCalls
|
|
513
|
+
.createBucket(request, options, wrappedCallback)
|
|
514
|
+
?.then(([response, options, rawResponse]) => {
|
|
515
|
+
this._log.info('createBucket response %j', response);
|
|
516
|
+
return [response, options, rawResponse];
|
|
517
|
+
})
|
|
518
|
+
.catch((error) => {
|
|
519
|
+
if (error &&
|
|
520
|
+
'statusDetails' in error &&
|
|
521
|
+
error.statusDetails instanceof Array) {
|
|
522
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
523
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
524
|
+
}
|
|
525
|
+
throw error;
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
updateBucket(request, optionsOrCallback, callback) {
|
|
529
|
+
request = request || {};
|
|
530
|
+
let options;
|
|
531
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
532
|
+
callback = optionsOrCallback;
|
|
533
|
+
options = {};
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
options = optionsOrCallback;
|
|
537
|
+
}
|
|
538
|
+
options = options || {};
|
|
539
|
+
options.otherArgs = options.otherArgs || {};
|
|
540
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
541
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
542
|
+
this._gaxModule.routingHeader.fromParams({
|
|
543
|
+
name: request.name ?? '',
|
|
544
|
+
});
|
|
545
|
+
this.initialize().catch((err) => {
|
|
546
|
+
throw err;
|
|
547
|
+
});
|
|
548
|
+
this._log.info('updateBucket request %j', request);
|
|
549
|
+
const wrappedCallback = callback
|
|
550
|
+
? (error, response, options, rawResponse) => {
|
|
551
|
+
this._log.info('updateBucket response %j', response);
|
|
552
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
553
|
+
}
|
|
554
|
+
: undefined;
|
|
555
|
+
return this.innerApiCalls
|
|
556
|
+
.updateBucket(request, options, wrappedCallback)
|
|
557
|
+
?.then(([response, options, rawResponse]) => {
|
|
558
|
+
this._log.info('updateBucket response %j', response);
|
|
559
|
+
return [response, options, rawResponse];
|
|
560
|
+
})
|
|
561
|
+
.catch((error) => {
|
|
562
|
+
if (error &&
|
|
563
|
+
'statusDetails' in error &&
|
|
564
|
+
error.statusDetails instanceof Array) {
|
|
565
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
566
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
567
|
+
}
|
|
568
|
+
throw error;
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
deleteBucket(request, optionsOrCallback, callback) {
|
|
572
|
+
request = request || {};
|
|
573
|
+
let options;
|
|
574
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
575
|
+
callback = optionsOrCallback;
|
|
576
|
+
options = {};
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
options = optionsOrCallback;
|
|
580
|
+
}
|
|
581
|
+
options = options || {};
|
|
582
|
+
options.otherArgs = options.otherArgs || {};
|
|
583
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
584
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
585
|
+
this._gaxModule.routingHeader.fromParams({
|
|
586
|
+
name: request.name ?? '',
|
|
587
|
+
});
|
|
588
|
+
this.initialize().catch((err) => {
|
|
589
|
+
throw err;
|
|
590
|
+
});
|
|
591
|
+
this._log.info('deleteBucket request %j', request);
|
|
592
|
+
const wrappedCallback = callback
|
|
593
|
+
? (error, response, options, rawResponse) => {
|
|
594
|
+
this._log.info('deleteBucket response %j', response);
|
|
595
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
596
|
+
}
|
|
597
|
+
: undefined;
|
|
598
|
+
return this.innerApiCalls
|
|
599
|
+
.deleteBucket(request, options, wrappedCallback)
|
|
600
|
+
?.then(([response, options, rawResponse]) => {
|
|
601
|
+
this._log.info('deleteBucket response %j', response);
|
|
602
|
+
return [response, options, rawResponse];
|
|
603
|
+
})
|
|
604
|
+
.catch((error) => {
|
|
605
|
+
if (error &&
|
|
606
|
+
'statusDetails' in error &&
|
|
607
|
+
error.statusDetails instanceof Array) {
|
|
608
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
609
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
610
|
+
}
|
|
611
|
+
throw error;
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
undeleteBucket(request, optionsOrCallback, callback) {
|
|
615
|
+
request = request || {};
|
|
616
|
+
let options;
|
|
617
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
618
|
+
callback = optionsOrCallback;
|
|
619
|
+
options = {};
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
options = optionsOrCallback;
|
|
623
|
+
}
|
|
624
|
+
options = options || {};
|
|
625
|
+
options.otherArgs = options.otherArgs || {};
|
|
626
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
627
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
628
|
+
this._gaxModule.routingHeader.fromParams({
|
|
629
|
+
name: request.name ?? '',
|
|
630
|
+
});
|
|
631
|
+
this.initialize().catch((err) => {
|
|
632
|
+
throw err;
|
|
633
|
+
});
|
|
634
|
+
this._log.info('undeleteBucket request %j', request);
|
|
635
|
+
const wrappedCallback = callback
|
|
636
|
+
? (error, response, options, rawResponse) => {
|
|
637
|
+
this._log.info('undeleteBucket response %j', response);
|
|
638
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
639
|
+
}
|
|
640
|
+
: undefined;
|
|
641
|
+
return this.innerApiCalls
|
|
642
|
+
.undeleteBucket(request, options, wrappedCallback)
|
|
643
|
+
?.then(([response, options, rawResponse]) => {
|
|
644
|
+
this._log.info('undeleteBucket response %j', response);
|
|
645
|
+
return [response, options, rawResponse];
|
|
646
|
+
})
|
|
647
|
+
.catch((error) => {
|
|
648
|
+
if (error &&
|
|
649
|
+
'statusDetails' in error &&
|
|
650
|
+
error.statusDetails instanceof Array) {
|
|
651
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
652
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
653
|
+
}
|
|
654
|
+
throw error;
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
getView(request, optionsOrCallback, callback) {
|
|
658
|
+
request = request || {};
|
|
659
|
+
let options;
|
|
660
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
661
|
+
callback = optionsOrCallback;
|
|
662
|
+
options = {};
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
options = optionsOrCallback;
|
|
666
|
+
}
|
|
667
|
+
options = options || {};
|
|
668
|
+
options.otherArgs = options.otherArgs || {};
|
|
669
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
670
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
671
|
+
this._gaxModule.routingHeader.fromParams({
|
|
672
|
+
name: request.name ?? '',
|
|
673
|
+
});
|
|
674
|
+
this.initialize().catch((err) => {
|
|
675
|
+
throw err;
|
|
676
|
+
});
|
|
677
|
+
this._log.info('getView request %j', request);
|
|
678
|
+
const wrappedCallback = callback
|
|
679
|
+
? (error, response, options, rawResponse) => {
|
|
680
|
+
this._log.info('getView response %j', response);
|
|
681
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
682
|
+
}
|
|
683
|
+
: undefined;
|
|
684
|
+
return this.innerApiCalls
|
|
685
|
+
.getView(request, options, wrappedCallback)
|
|
686
|
+
?.then(([response, options, rawResponse]) => {
|
|
687
|
+
this._log.info('getView response %j', response);
|
|
688
|
+
return [response, options, rawResponse];
|
|
689
|
+
})
|
|
690
|
+
.catch((error) => {
|
|
691
|
+
if (error &&
|
|
692
|
+
'statusDetails' in error &&
|
|
693
|
+
error.statusDetails instanceof Array) {
|
|
694
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
695
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
696
|
+
}
|
|
697
|
+
throw error;
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
createView(request, optionsOrCallback, callback) {
|
|
701
|
+
request = request || {};
|
|
702
|
+
let options;
|
|
703
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
704
|
+
callback = optionsOrCallback;
|
|
705
|
+
options = {};
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
options = optionsOrCallback;
|
|
709
|
+
}
|
|
710
|
+
options = options || {};
|
|
711
|
+
options.otherArgs = options.otherArgs || {};
|
|
712
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
713
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
714
|
+
this._gaxModule.routingHeader.fromParams({
|
|
715
|
+
parent: request.parent ?? '',
|
|
716
|
+
});
|
|
717
|
+
this.initialize().catch((err) => {
|
|
718
|
+
throw err;
|
|
719
|
+
});
|
|
720
|
+
this._log.info('createView request %j', request);
|
|
721
|
+
const wrappedCallback = callback
|
|
722
|
+
? (error, response, options, rawResponse) => {
|
|
723
|
+
this._log.info('createView response %j', response);
|
|
724
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
725
|
+
}
|
|
726
|
+
: undefined;
|
|
727
|
+
return this.innerApiCalls
|
|
728
|
+
.createView(request, options, wrappedCallback)
|
|
729
|
+
?.then(([response, options, rawResponse]) => {
|
|
730
|
+
this._log.info('createView response %j', response);
|
|
731
|
+
return [response, options, rawResponse];
|
|
732
|
+
})
|
|
733
|
+
.catch((error) => {
|
|
734
|
+
if (error &&
|
|
735
|
+
'statusDetails' in error &&
|
|
736
|
+
error.statusDetails instanceof Array) {
|
|
737
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
738
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
739
|
+
}
|
|
740
|
+
throw error;
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
updateView(request, optionsOrCallback, callback) {
|
|
744
|
+
request = request || {};
|
|
745
|
+
let options;
|
|
746
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
747
|
+
callback = optionsOrCallback;
|
|
748
|
+
options = {};
|
|
749
|
+
}
|
|
750
|
+
else {
|
|
751
|
+
options = optionsOrCallback;
|
|
752
|
+
}
|
|
753
|
+
options = options || {};
|
|
754
|
+
options.otherArgs = options.otherArgs || {};
|
|
755
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
756
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
757
|
+
this._gaxModule.routingHeader.fromParams({
|
|
758
|
+
name: request.name ?? '',
|
|
759
|
+
});
|
|
760
|
+
this.initialize().catch((err) => {
|
|
761
|
+
throw err;
|
|
762
|
+
});
|
|
763
|
+
this._log.info('updateView request %j', request);
|
|
764
|
+
const wrappedCallback = callback
|
|
765
|
+
? (error, response, options, rawResponse) => {
|
|
766
|
+
this._log.info('updateView response %j', response);
|
|
767
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
768
|
+
}
|
|
769
|
+
: undefined;
|
|
770
|
+
return this.innerApiCalls
|
|
771
|
+
.updateView(request, options, wrappedCallback)
|
|
772
|
+
?.then(([response, options, rawResponse]) => {
|
|
773
|
+
this._log.info('updateView response %j', response);
|
|
774
|
+
return [response, options, rawResponse];
|
|
775
|
+
})
|
|
776
|
+
.catch((error) => {
|
|
777
|
+
if (error &&
|
|
778
|
+
'statusDetails' in error &&
|
|
779
|
+
error.statusDetails instanceof Array) {
|
|
780
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
781
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
782
|
+
}
|
|
783
|
+
throw error;
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
deleteView(request, optionsOrCallback, callback) {
|
|
787
|
+
request = request || {};
|
|
788
|
+
let options;
|
|
789
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
790
|
+
callback = optionsOrCallback;
|
|
791
|
+
options = {};
|
|
792
|
+
}
|
|
793
|
+
else {
|
|
794
|
+
options = optionsOrCallback;
|
|
795
|
+
}
|
|
796
|
+
options = options || {};
|
|
797
|
+
options.otherArgs = options.otherArgs || {};
|
|
798
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
799
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
800
|
+
this._gaxModule.routingHeader.fromParams({
|
|
801
|
+
name: request.name ?? '',
|
|
802
|
+
});
|
|
803
|
+
this.initialize().catch((err) => {
|
|
804
|
+
throw err;
|
|
805
|
+
});
|
|
806
|
+
this._log.info('deleteView request %j', request);
|
|
807
|
+
const wrappedCallback = callback
|
|
808
|
+
? (error, response, options, rawResponse) => {
|
|
809
|
+
this._log.info('deleteView response %j', response);
|
|
810
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
811
|
+
}
|
|
812
|
+
: undefined;
|
|
813
|
+
return this.innerApiCalls
|
|
814
|
+
.deleteView(request, options, wrappedCallback)
|
|
815
|
+
?.then(([response, options, rawResponse]) => {
|
|
816
|
+
this._log.info('deleteView response %j', response);
|
|
817
|
+
return [response, options, rawResponse];
|
|
818
|
+
})
|
|
819
|
+
.catch((error) => {
|
|
820
|
+
if (error &&
|
|
821
|
+
'statusDetails' in error &&
|
|
822
|
+
error.statusDetails instanceof Array) {
|
|
823
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
824
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
825
|
+
}
|
|
826
|
+
throw error;
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
getSink(request, optionsOrCallback, callback) {
|
|
830
|
+
request = request || {};
|
|
831
|
+
let options;
|
|
832
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
833
|
+
callback = optionsOrCallback;
|
|
834
|
+
options = {};
|
|
835
|
+
}
|
|
836
|
+
else {
|
|
837
|
+
options = optionsOrCallback;
|
|
838
|
+
}
|
|
839
|
+
options = options || {};
|
|
840
|
+
options.otherArgs = options.otherArgs || {};
|
|
841
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
842
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
843
|
+
this._gaxModule.routingHeader.fromParams({
|
|
844
|
+
sink_name: request.sinkName ?? '',
|
|
845
|
+
});
|
|
846
|
+
this.initialize().catch((err) => {
|
|
847
|
+
throw err;
|
|
848
|
+
});
|
|
849
|
+
this._log.info('getSink request %j', request);
|
|
850
|
+
const wrappedCallback = callback
|
|
851
|
+
? (error, response, options, rawResponse) => {
|
|
852
|
+
this._log.info('getSink response %j', response);
|
|
853
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
854
|
+
}
|
|
855
|
+
: undefined;
|
|
856
|
+
return this.innerApiCalls
|
|
857
|
+
.getSink(request, options, wrappedCallback)
|
|
858
|
+
?.then(([response, options, rawResponse]) => {
|
|
859
|
+
this._log.info('getSink response %j', response);
|
|
860
|
+
return [response, options, rawResponse];
|
|
861
|
+
})
|
|
862
|
+
.catch((error) => {
|
|
863
|
+
if (error &&
|
|
864
|
+
'statusDetails' in error &&
|
|
865
|
+
error.statusDetails instanceof Array) {
|
|
866
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
867
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
868
|
+
}
|
|
869
|
+
throw error;
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
createSink(request, optionsOrCallback, callback) {
|
|
873
|
+
request = request || {};
|
|
874
|
+
let options;
|
|
875
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
876
|
+
callback = optionsOrCallback;
|
|
877
|
+
options = {};
|
|
878
|
+
}
|
|
879
|
+
else {
|
|
880
|
+
options = optionsOrCallback;
|
|
881
|
+
}
|
|
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
|
+
this.initialize().catch((err) => {
|
|
890
|
+
throw err;
|
|
891
|
+
});
|
|
892
|
+
this._log.info('createSink request %j', request);
|
|
893
|
+
const wrappedCallback = callback
|
|
894
|
+
? (error, response, options, rawResponse) => {
|
|
895
|
+
this._log.info('createSink response %j', response);
|
|
896
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
897
|
+
}
|
|
898
|
+
: undefined;
|
|
899
|
+
return this.innerApiCalls
|
|
900
|
+
.createSink(request, options, wrappedCallback)
|
|
901
|
+
?.then(([response, options, rawResponse]) => {
|
|
902
|
+
this._log.info('createSink response %j', response);
|
|
903
|
+
return [response, options, rawResponse];
|
|
904
|
+
})
|
|
905
|
+
.catch((error) => {
|
|
906
|
+
if (error &&
|
|
907
|
+
'statusDetails' in error &&
|
|
908
|
+
error.statusDetails instanceof Array) {
|
|
909
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
910
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
911
|
+
}
|
|
912
|
+
throw error;
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
updateSink(request, optionsOrCallback, callback) {
|
|
916
|
+
request = request || {};
|
|
917
|
+
let options;
|
|
918
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
919
|
+
callback = optionsOrCallback;
|
|
920
|
+
options = {};
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
options = optionsOrCallback;
|
|
924
|
+
}
|
|
925
|
+
options = options || {};
|
|
926
|
+
options.otherArgs = options.otherArgs || {};
|
|
927
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
928
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
929
|
+
this._gaxModule.routingHeader.fromParams({
|
|
930
|
+
sink_name: request.sinkName ?? '',
|
|
931
|
+
});
|
|
932
|
+
this.initialize().catch((err) => {
|
|
933
|
+
throw err;
|
|
934
|
+
});
|
|
935
|
+
this._log.info('updateSink request %j', request);
|
|
936
|
+
const wrappedCallback = callback
|
|
937
|
+
? (error, response, options, rawResponse) => {
|
|
938
|
+
this._log.info('updateSink response %j', response);
|
|
939
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
940
|
+
}
|
|
941
|
+
: undefined;
|
|
942
|
+
return this.innerApiCalls
|
|
943
|
+
.updateSink(request, options, wrappedCallback)
|
|
944
|
+
?.then(([response, options, rawResponse]) => {
|
|
945
|
+
this._log.info('updateSink response %j', response);
|
|
946
|
+
return [response, options, rawResponse];
|
|
947
|
+
})
|
|
948
|
+
.catch((error) => {
|
|
949
|
+
if (error &&
|
|
950
|
+
'statusDetails' in error &&
|
|
951
|
+
error.statusDetails instanceof Array) {
|
|
952
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
953
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
954
|
+
}
|
|
955
|
+
throw error;
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
deleteSink(request, optionsOrCallback, callback) {
|
|
959
|
+
request = request || {};
|
|
960
|
+
let options;
|
|
961
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
962
|
+
callback = optionsOrCallback;
|
|
963
|
+
options = {};
|
|
964
|
+
}
|
|
965
|
+
else {
|
|
966
|
+
options = optionsOrCallback;
|
|
967
|
+
}
|
|
968
|
+
options = options || {};
|
|
969
|
+
options.otherArgs = options.otherArgs || {};
|
|
970
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
971
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
972
|
+
this._gaxModule.routingHeader.fromParams({
|
|
973
|
+
sink_name: request.sinkName ?? '',
|
|
974
|
+
});
|
|
975
|
+
this.initialize().catch((err) => {
|
|
976
|
+
throw err;
|
|
977
|
+
});
|
|
978
|
+
this._log.info('deleteSink request %j', request);
|
|
979
|
+
const wrappedCallback = callback
|
|
980
|
+
? (error, response, options, rawResponse) => {
|
|
981
|
+
this._log.info('deleteSink response %j', response);
|
|
982
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
983
|
+
}
|
|
984
|
+
: undefined;
|
|
985
|
+
return this.innerApiCalls
|
|
986
|
+
.deleteSink(request, options, wrappedCallback)
|
|
987
|
+
?.then(([response, options, rawResponse]) => {
|
|
988
|
+
this._log.info('deleteSink response %j', response);
|
|
989
|
+
return [response, options, rawResponse];
|
|
990
|
+
})
|
|
991
|
+
.catch((error) => {
|
|
992
|
+
if (error &&
|
|
993
|
+
'statusDetails' in error &&
|
|
994
|
+
error.statusDetails instanceof Array) {
|
|
995
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
996
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
997
|
+
}
|
|
998
|
+
throw error;
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
getLink(request, optionsOrCallback, callback) {
|
|
1002
|
+
request = request || {};
|
|
1003
|
+
let options;
|
|
1004
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1005
|
+
callback = optionsOrCallback;
|
|
1006
|
+
options = {};
|
|
1007
|
+
}
|
|
1008
|
+
else {
|
|
1009
|
+
options = optionsOrCallback;
|
|
1010
|
+
}
|
|
1011
|
+
options = options || {};
|
|
1012
|
+
options.otherArgs = options.otherArgs || {};
|
|
1013
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1014
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1015
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1016
|
+
name: request.name ?? '',
|
|
1017
|
+
});
|
|
1018
|
+
this.initialize().catch((err) => {
|
|
1019
|
+
throw err;
|
|
1020
|
+
});
|
|
1021
|
+
this._log.info('getLink request %j', request);
|
|
1022
|
+
const wrappedCallback = callback
|
|
1023
|
+
? (error, response, options, rawResponse) => {
|
|
1024
|
+
this._log.info('getLink response %j', response);
|
|
1025
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1026
|
+
}
|
|
1027
|
+
: undefined;
|
|
1028
|
+
return this.innerApiCalls
|
|
1029
|
+
.getLink(request, options, wrappedCallback)
|
|
1030
|
+
?.then(([response, options, rawResponse]) => {
|
|
1031
|
+
this._log.info('getLink response %j', response);
|
|
1032
|
+
return [response, options, rawResponse];
|
|
1033
|
+
})
|
|
1034
|
+
.catch((error) => {
|
|
1035
|
+
if (error &&
|
|
1036
|
+
'statusDetails' in error &&
|
|
1037
|
+
error.statusDetails instanceof Array) {
|
|
1038
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1039
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1040
|
+
}
|
|
1041
|
+
throw error;
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
getExclusion(request, optionsOrCallback, callback) {
|
|
1045
|
+
request = request || {};
|
|
1046
|
+
let options;
|
|
1047
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1048
|
+
callback = optionsOrCallback;
|
|
1049
|
+
options = {};
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
options = optionsOrCallback;
|
|
1053
|
+
}
|
|
1054
|
+
options = options || {};
|
|
1055
|
+
options.otherArgs = options.otherArgs || {};
|
|
1056
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1057
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1058
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1059
|
+
name: request.name ?? '',
|
|
1060
|
+
});
|
|
1061
|
+
this.initialize().catch((err) => {
|
|
1062
|
+
throw err;
|
|
1063
|
+
});
|
|
1064
|
+
this._log.info('getExclusion request %j', request);
|
|
1065
|
+
const wrappedCallback = callback
|
|
1066
|
+
? (error, response, options, rawResponse) => {
|
|
1067
|
+
this._log.info('getExclusion response %j', response);
|
|
1068
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1069
|
+
}
|
|
1070
|
+
: undefined;
|
|
1071
|
+
return this.innerApiCalls
|
|
1072
|
+
.getExclusion(request, options, wrappedCallback)
|
|
1073
|
+
?.then(([response, options, rawResponse]) => {
|
|
1074
|
+
this._log.info('getExclusion response %j', response);
|
|
1075
|
+
return [response, options, rawResponse];
|
|
1076
|
+
})
|
|
1077
|
+
.catch((error) => {
|
|
1078
|
+
if (error &&
|
|
1079
|
+
'statusDetails' in error &&
|
|
1080
|
+
error.statusDetails instanceof Array) {
|
|
1081
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1082
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1083
|
+
}
|
|
1084
|
+
throw error;
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
createExclusion(request, optionsOrCallback, callback) {
|
|
1088
|
+
request = request || {};
|
|
1089
|
+
let options;
|
|
1090
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1091
|
+
callback = optionsOrCallback;
|
|
1092
|
+
options = {};
|
|
1093
|
+
}
|
|
1094
|
+
else {
|
|
1095
|
+
options = optionsOrCallback;
|
|
1096
|
+
}
|
|
1097
|
+
options = options || {};
|
|
1098
|
+
options.otherArgs = options.otherArgs || {};
|
|
1099
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1100
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1101
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1102
|
+
parent: request.parent ?? '',
|
|
1103
|
+
});
|
|
1104
|
+
this.initialize().catch((err) => {
|
|
1105
|
+
throw err;
|
|
1106
|
+
});
|
|
1107
|
+
this._log.info('createExclusion request %j', request);
|
|
1108
|
+
const wrappedCallback = callback
|
|
1109
|
+
? (error, response, options, rawResponse) => {
|
|
1110
|
+
this._log.info('createExclusion response %j', response);
|
|
1111
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1112
|
+
}
|
|
1113
|
+
: undefined;
|
|
1114
|
+
return this.innerApiCalls
|
|
1115
|
+
.createExclusion(request, options, wrappedCallback)
|
|
1116
|
+
?.then(([response, options, rawResponse]) => {
|
|
1117
|
+
this._log.info('createExclusion response %j', response);
|
|
1118
|
+
return [response, options, rawResponse];
|
|
1119
|
+
})
|
|
1120
|
+
.catch((error) => {
|
|
1121
|
+
if (error &&
|
|
1122
|
+
'statusDetails' in error &&
|
|
1123
|
+
error.statusDetails instanceof Array) {
|
|
1124
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1125
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1126
|
+
}
|
|
1127
|
+
throw error;
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
updateExclusion(request, optionsOrCallback, callback) {
|
|
1131
|
+
request = request || {};
|
|
1132
|
+
let options;
|
|
1133
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1134
|
+
callback = optionsOrCallback;
|
|
1135
|
+
options = {};
|
|
1136
|
+
}
|
|
1137
|
+
else {
|
|
1138
|
+
options = optionsOrCallback;
|
|
1139
|
+
}
|
|
1140
|
+
options = options || {};
|
|
1141
|
+
options.otherArgs = options.otherArgs || {};
|
|
1142
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1143
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1144
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1145
|
+
name: request.name ?? '',
|
|
1146
|
+
});
|
|
1147
|
+
this.initialize().catch((err) => {
|
|
1148
|
+
throw err;
|
|
1149
|
+
});
|
|
1150
|
+
this._log.info('updateExclusion request %j', request);
|
|
1151
|
+
const wrappedCallback = callback
|
|
1152
|
+
? (error, response, options, rawResponse) => {
|
|
1153
|
+
this._log.info('updateExclusion response %j', response);
|
|
1154
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1155
|
+
}
|
|
1156
|
+
: undefined;
|
|
1157
|
+
return this.innerApiCalls
|
|
1158
|
+
.updateExclusion(request, options, wrappedCallback)
|
|
1159
|
+
?.then(([response, options, rawResponse]) => {
|
|
1160
|
+
this._log.info('updateExclusion response %j', response);
|
|
1161
|
+
return [response, options, rawResponse];
|
|
1162
|
+
})
|
|
1163
|
+
.catch((error) => {
|
|
1164
|
+
if (error &&
|
|
1165
|
+
'statusDetails' in error &&
|
|
1166
|
+
error.statusDetails instanceof Array) {
|
|
1167
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1168
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1169
|
+
}
|
|
1170
|
+
throw error;
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
deleteExclusion(request, optionsOrCallback, callback) {
|
|
1174
|
+
request = request || {};
|
|
1175
|
+
let options;
|
|
1176
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1177
|
+
callback = optionsOrCallback;
|
|
1178
|
+
options = {};
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
options = optionsOrCallback;
|
|
1182
|
+
}
|
|
1183
|
+
options = options || {};
|
|
1184
|
+
options.otherArgs = options.otherArgs || {};
|
|
1185
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1186
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1187
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1188
|
+
name: request.name ?? '',
|
|
1189
|
+
});
|
|
1190
|
+
this.initialize().catch((err) => {
|
|
1191
|
+
throw err;
|
|
1192
|
+
});
|
|
1193
|
+
this._log.info('deleteExclusion request %j', request);
|
|
1194
|
+
const wrappedCallback = callback
|
|
1195
|
+
? (error, response, options, rawResponse) => {
|
|
1196
|
+
this._log.info('deleteExclusion response %j', response);
|
|
1197
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1198
|
+
}
|
|
1199
|
+
: undefined;
|
|
1200
|
+
return this.innerApiCalls
|
|
1201
|
+
.deleteExclusion(request, options, wrappedCallback)
|
|
1202
|
+
?.then(([response, options, rawResponse]) => {
|
|
1203
|
+
this._log.info('deleteExclusion response %j', response);
|
|
1204
|
+
return [response, options, rawResponse];
|
|
1205
|
+
})
|
|
1206
|
+
.catch((error) => {
|
|
1207
|
+
if (error &&
|
|
1208
|
+
'statusDetails' in error &&
|
|
1209
|
+
error.statusDetails instanceof Array) {
|
|
1210
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1211
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1212
|
+
}
|
|
1213
|
+
throw error;
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
getCmekSettings(request, optionsOrCallback, callback) {
|
|
1217
|
+
request = request || {};
|
|
1218
|
+
let options;
|
|
1219
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1220
|
+
callback = optionsOrCallback;
|
|
1221
|
+
options = {};
|
|
1222
|
+
}
|
|
1223
|
+
else {
|
|
1224
|
+
options = optionsOrCallback;
|
|
1225
|
+
}
|
|
1226
|
+
options = options || {};
|
|
1227
|
+
options.otherArgs = options.otherArgs || {};
|
|
1228
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1229
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1230
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1231
|
+
name: request.name ?? '',
|
|
1232
|
+
});
|
|
1233
|
+
this.initialize().catch((err) => {
|
|
1234
|
+
throw err;
|
|
1235
|
+
});
|
|
1236
|
+
this._log.info('getCmekSettings request %j', request);
|
|
1237
|
+
const wrappedCallback = callback
|
|
1238
|
+
? (error, response, options, rawResponse) => {
|
|
1239
|
+
this._log.info('getCmekSettings response %j', response);
|
|
1240
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1241
|
+
}
|
|
1242
|
+
: undefined;
|
|
1243
|
+
return this.innerApiCalls
|
|
1244
|
+
.getCmekSettings(request, options, wrappedCallback)
|
|
1245
|
+
?.then(([response, options, rawResponse]) => {
|
|
1246
|
+
this._log.info('getCmekSettings response %j', response);
|
|
1247
|
+
return [response, options, rawResponse];
|
|
1248
|
+
})
|
|
1249
|
+
.catch((error) => {
|
|
1250
|
+
if (error &&
|
|
1251
|
+
'statusDetails' in error &&
|
|
1252
|
+
error.statusDetails instanceof Array) {
|
|
1253
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1254
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1255
|
+
}
|
|
1256
|
+
throw error;
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
updateCmekSettings(request, optionsOrCallback, callback) {
|
|
1260
|
+
request = request || {};
|
|
1261
|
+
let options;
|
|
1262
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1263
|
+
callback = optionsOrCallback;
|
|
1264
|
+
options = {};
|
|
1265
|
+
}
|
|
1266
|
+
else {
|
|
1267
|
+
options = optionsOrCallback;
|
|
1268
|
+
}
|
|
1269
|
+
options = options || {};
|
|
1270
|
+
options.otherArgs = options.otherArgs || {};
|
|
1271
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1272
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1273
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1274
|
+
name: request.name ?? '',
|
|
1275
|
+
});
|
|
1276
|
+
this.initialize().catch((err) => {
|
|
1277
|
+
throw err;
|
|
1278
|
+
});
|
|
1279
|
+
this._log.info('updateCmekSettings request %j', request);
|
|
1280
|
+
const wrappedCallback = callback
|
|
1281
|
+
? (error, response, options, rawResponse) => {
|
|
1282
|
+
this._log.info('updateCmekSettings response %j', response);
|
|
1283
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1284
|
+
}
|
|
1285
|
+
: undefined;
|
|
1286
|
+
return this.innerApiCalls
|
|
1287
|
+
.updateCmekSettings(request, options, wrappedCallback)
|
|
1288
|
+
?.then(([response, options, rawResponse]) => {
|
|
1289
|
+
this._log.info('updateCmekSettings response %j', response);
|
|
1290
|
+
return [response, options, rawResponse];
|
|
1291
|
+
})
|
|
1292
|
+
.catch((error) => {
|
|
1293
|
+
if (error &&
|
|
1294
|
+
'statusDetails' in error &&
|
|
1295
|
+
error.statusDetails instanceof Array) {
|
|
1296
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1297
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1298
|
+
}
|
|
1299
|
+
throw error;
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
getSettings(request, optionsOrCallback, callback) {
|
|
1303
|
+
request = request || {};
|
|
1304
|
+
let options;
|
|
1305
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1306
|
+
callback = optionsOrCallback;
|
|
1307
|
+
options = {};
|
|
1308
|
+
}
|
|
1309
|
+
else {
|
|
1310
|
+
options = optionsOrCallback;
|
|
1311
|
+
}
|
|
1312
|
+
options = options || {};
|
|
1313
|
+
options.otherArgs = options.otherArgs || {};
|
|
1314
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1315
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1316
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1317
|
+
name: request.name ?? '',
|
|
1318
|
+
});
|
|
1319
|
+
this.initialize().catch((err) => {
|
|
1320
|
+
throw err;
|
|
1321
|
+
});
|
|
1322
|
+
this._log.info('getSettings request %j', request);
|
|
1323
|
+
const wrappedCallback = callback
|
|
1324
|
+
? (error, response, options, rawResponse) => {
|
|
1325
|
+
this._log.info('getSettings response %j', response);
|
|
1326
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1327
|
+
}
|
|
1328
|
+
: undefined;
|
|
1329
|
+
return this.innerApiCalls
|
|
1330
|
+
.getSettings(request, options, wrappedCallback)
|
|
1331
|
+
?.then(([response, options, rawResponse]) => {
|
|
1332
|
+
this._log.info('getSettings response %j', response);
|
|
1333
|
+
return [response, options, rawResponse];
|
|
1334
|
+
})
|
|
1335
|
+
.catch((error) => {
|
|
1336
|
+
if (error &&
|
|
1337
|
+
'statusDetails' in error &&
|
|
1338
|
+
error.statusDetails instanceof Array) {
|
|
1339
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1340
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1341
|
+
}
|
|
1342
|
+
throw error;
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
updateSettings(request, optionsOrCallback, callback) {
|
|
1346
|
+
request = request || {};
|
|
1347
|
+
let options;
|
|
1348
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1349
|
+
callback = optionsOrCallback;
|
|
1350
|
+
options = {};
|
|
1351
|
+
}
|
|
1352
|
+
else {
|
|
1353
|
+
options = optionsOrCallback;
|
|
1354
|
+
}
|
|
1355
|
+
options = options || {};
|
|
1356
|
+
options.otherArgs = options.otherArgs || {};
|
|
1357
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1358
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1359
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1360
|
+
name: request.name ?? '',
|
|
1361
|
+
});
|
|
1362
|
+
this.initialize().catch((err) => {
|
|
1363
|
+
throw err;
|
|
1364
|
+
});
|
|
1365
|
+
this._log.info('updateSettings request %j', request);
|
|
1366
|
+
const wrappedCallback = callback
|
|
1367
|
+
? (error, response, options, rawResponse) => {
|
|
1368
|
+
this._log.info('updateSettings response %j', response);
|
|
1369
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1370
|
+
}
|
|
1371
|
+
: undefined;
|
|
1372
|
+
return this.innerApiCalls
|
|
1373
|
+
.updateSettings(request, options, wrappedCallback)
|
|
1374
|
+
?.then(([response, options, rawResponse]) => {
|
|
1375
|
+
this._log.info('updateSettings response %j', response);
|
|
1376
|
+
return [response, options, rawResponse];
|
|
1377
|
+
})
|
|
1378
|
+
.catch((error) => {
|
|
1379
|
+
if (error &&
|
|
1380
|
+
'statusDetails' in error &&
|
|
1381
|
+
error.statusDetails instanceof Array) {
|
|
1382
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1383
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1384
|
+
}
|
|
1385
|
+
throw error;
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
createBucketAsync(request, optionsOrCallback, callback) {
|
|
1389
|
+
request = request || {};
|
|
1390
|
+
let options;
|
|
1391
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1392
|
+
callback = optionsOrCallback;
|
|
1393
|
+
options = {};
|
|
1394
|
+
}
|
|
1395
|
+
else {
|
|
1396
|
+
options = optionsOrCallback;
|
|
1397
|
+
}
|
|
1398
|
+
options = options || {};
|
|
1399
|
+
options.otherArgs = options.otherArgs || {};
|
|
1400
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1401
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1402
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1403
|
+
parent: request.parent ?? '',
|
|
1404
|
+
});
|
|
1405
|
+
this.initialize().catch((err) => {
|
|
1406
|
+
throw err;
|
|
1407
|
+
});
|
|
1408
|
+
const wrappedCallback = callback
|
|
1409
|
+
? (error, response, rawResponse, _) => {
|
|
1410
|
+
this._log.info('createBucketAsync response %j', rawResponse);
|
|
1411
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
1412
|
+
}
|
|
1413
|
+
: undefined;
|
|
1414
|
+
this._log.info('createBucketAsync request %j', request);
|
|
1415
|
+
return this.innerApiCalls
|
|
1416
|
+
.createBucketAsync(request, options, wrappedCallback)
|
|
1417
|
+
?.then(([response, rawResponse, _]) => {
|
|
1418
|
+
this._log.info('createBucketAsync response %j', rawResponse);
|
|
1419
|
+
return [response, rawResponse, _];
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Check the status of the long running operation returned by `createBucketAsync()`.
|
|
1424
|
+
* @param {String} name
|
|
1425
|
+
* The operation name that will be passed.
|
|
1426
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1427
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1428
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1429
|
+
* for more details and examples.
|
|
1430
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.create_bucket_async.js</caption>
|
|
1431
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_CreateBucketAsync_async
|
|
1432
|
+
*/
|
|
1433
|
+
async checkCreateBucketAsyncProgress(name) {
|
|
1434
|
+
this._log.info('createBucketAsync long-running');
|
|
1435
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
1436
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
1437
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createBucketAsync, this._gaxModule.createDefaultBackoffSettings());
|
|
1438
|
+
return decodeOperation;
|
|
1439
|
+
}
|
|
1440
|
+
updateBucketAsync(request, optionsOrCallback, callback) {
|
|
1441
|
+
request = request || {};
|
|
1442
|
+
let options;
|
|
1443
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1444
|
+
callback = optionsOrCallback;
|
|
1445
|
+
options = {};
|
|
1446
|
+
}
|
|
1447
|
+
else {
|
|
1448
|
+
options = optionsOrCallback;
|
|
1449
|
+
}
|
|
1450
|
+
options = options || {};
|
|
1451
|
+
options.otherArgs = options.otherArgs || {};
|
|
1452
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1453
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1454
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1455
|
+
name: request.name ?? '',
|
|
1456
|
+
});
|
|
1457
|
+
this.initialize().catch((err) => {
|
|
1458
|
+
throw err;
|
|
1459
|
+
});
|
|
1460
|
+
const wrappedCallback = callback
|
|
1461
|
+
? (error, response, rawResponse, _) => {
|
|
1462
|
+
this._log.info('updateBucketAsync response %j', rawResponse);
|
|
1463
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
1464
|
+
}
|
|
1465
|
+
: undefined;
|
|
1466
|
+
this._log.info('updateBucketAsync request %j', request);
|
|
1467
|
+
return this.innerApiCalls
|
|
1468
|
+
.updateBucketAsync(request, options, wrappedCallback)
|
|
1469
|
+
?.then(([response, rawResponse, _]) => {
|
|
1470
|
+
this._log.info('updateBucketAsync response %j', rawResponse);
|
|
1471
|
+
return [response, rawResponse, _];
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* Check the status of the long running operation returned by `updateBucketAsync()`.
|
|
1476
|
+
* @param {String} name
|
|
1477
|
+
* The operation name that will be passed.
|
|
1478
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1479
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1480
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1481
|
+
* for more details and examples.
|
|
1482
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.update_bucket_async.js</caption>
|
|
1483
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_async
|
|
1484
|
+
*/
|
|
1485
|
+
async checkUpdateBucketAsyncProgress(name) {
|
|
1486
|
+
this._log.info('updateBucketAsync long-running');
|
|
1487
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
1488
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
1489
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateBucketAsync, this._gaxModule.createDefaultBackoffSettings());
|
|
1490
|
+
return decodeOperation;
|
|
1491
|
+
}
|
|
1492
|
+
createLink(request, optionsOrCallback, callback) {
|
|
1493
|
+
request = request || {};
|
|
1494
|
+
let options;
|
|
1495
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1496
|
+
callback = optionsOrCallback;
|
|
1497
|
+
options = {};
|
|
1498
|
+
}
|
|
1499
|
+
else {
|
|
1500
|
+
options = optionsOrCallback;
|
|
1501
|
+
}
|
|
1502
|
+
options = options || {};
|
|
1503
|
+
options.otherArgs = options.otherArgs || {};
|
|
1504
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1505
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1506
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1507
|
+
parent: request.parent ?? '',
|
|
1508
|
+
});
|
|
1509
|
+
this.initialize().catch((err) => {
|
|
1510
|
+
throw err;
|
|
1511
|
+
});
|
|
1512
|
+
const wrappedCallback = callback
|
|
1513
|
+
? (error, response, rawResponse, _) => {
|
|
1514
|
+
this._log.info('createLink response %j', rawResponse);
|
|
1515
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
1516
|
+
}
|
|
1517
|
+
: undefined;
|
|
1518
|
+
this._log.info('createLink request %j', request);
|
|
1519
|
+
return this.innerApiCalls
|
|
1520
|
+
.createLink(request, options, wrappedCallback)
|
|
1521
|
+
?.then(([response, rawResponse, _]) => {
|
|
1522
|
+
this._log.info('createLink response %j', rawResponse);
|
|
1523
|
+
return [response, rawResponse, _];
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Check the status of the long running operation returned by `createLink()`.
|
|
1528
|
+
* @param {String} name
|
|
1529
|
+
* The operation name that will be passed.
|
|
1530
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1531
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1532
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1533
|
+
* for more details and examples.
|
|
1534
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.create_link.js</caption>
|
|
1535
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_CreateLink_async
|
|
1536
|
+
*/
|
|
1537
|
+
async checkCreateLinkProgress(name) {
|
|
1538
|
+
this._log.info('createLink long-running');
|
|
1539
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
1540
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
1541
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createLink, this._gaxModule.createDefaultBackoffSettings());
|
|
1542
|
+
return decodeOperation;
|
|
1543
|
+
}
|
|
1544
|
+
deleteLink(request, optionsOrCallback, callback) {
|
|
1545
|
+
request = request || {};
|
|
1546
|
+
let options;
|
|
1547
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1548
|
+
callback = optionsOrCallback;
|
|
1549
|
+
options = {};
|
|
1550
|
+
}
|
|
1551
|
+
else {
|
|
1552
|
+
options = optionsOrCallback;
|
|
1553
|
+
}
|
|
1554
|
+
options = options || {};
|
|
1555
|
+
options.otherArgs = options.otherArgs || {};
|
|
1556
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1557
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1558
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1559
|
+
name: request.name ?? '',
|
|
1560
|
+
});
|
|
1561
|
+
this.initialize().catch((err) => {
|
|
1562
|
+
throw err;
|
|
1563
|
+
});
|
|
1564
|
+
const wrappedCallback = callback
|
|
1565
|
+
? (error, response, rawResponse, _) => {
|
|
1566
|
+
this._log.info('deleteLink response %j', rawResponse);
|
|
1567
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
1568
|
+
}
|
|
1569
|
+
: undefined;
|
|
1570
|
+
this._log.info('deleteLink request %j', request);
|
|
1571
|
+
return this.innerApiCalls
|
|
1572
|
+
.deleteLink(request, options, wrappedCallback)
|
|
1573
|
+
?.then(([response, rawResponse, _]) => {
|
|
1574
|
+
this._log.info('deleteLink response %j', rawResponse);
|
|
1575
|
+
return [response, rawResponse, _];
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Check the status of the long running operation returned by `deleteLink()`.
|
|
1580
|
+
* @param {String} name
|
|
1581
|
+
* The operation name that will be passed.
|
|
1582
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1583
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1584
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1585
|
+
* for more details and examples.
|
|
1586
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.delete_link.js</caption>
|
|
1587
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_DeleteLink_async
|
|
1588
|
+
*/
|
|
1589
|
+
async checkDeleteLinkProgress(name) {
|
|
1590
|
+
this._log.info('deleteLink long-running');
|
|
1591
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
1592
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
1593
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteLink, this._gaxModule.createDefaultBackoffSettings());
|
|
1594
|
+
return decodeOperation;
|
|
1595
|
+
}
|
|
1596
|
+
copyLogEntries(request, optionsOrCallback, callback) {
|
|
1597
|
+
request = request || {};
|
|
1598
|
+
let options;
|
|
1599
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1600
|
+
callback = optionsOrCallback;
|
|
1601
|
+
options = {};
|
|
1602
|
+
}
|
|
1603
|
+
else {
|
|
1604
|
+
options = optionsOrCallback;
|
|
1605
|
+
}
|
|
1606
|
+
options = options || {};
|
|
1607
|
+
options.otherArgs = options.otherArgs || {};
|
|
1608
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1609
|
+
this.initialize().catch((err) => {
|
|
1610
|
+
throw err;
|
|
1611
|
+
});
|
|
1612
|
+
const wrappedCallback = callback
|
|
1613
|
+
? (error, response, rawResponse, _) => {
|
|
1614
|
+
this._log.info('copyLogEntries response %j', rawResponse);
|
|
1615
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
1616
|
+
}
|
|
1617
|
+
: undefined;
|
|
1618
|
+
this._log.info('copyLogEntries request %j', request);
|
|
1619
|
+
return this.innerApiCalls
|
|
1620
|
+
.copyLogEntries(request, options, wrappedCallback)
|
|
1621
|
+
?.then(([response, rawResponse, _]) => {
|
|
1622
|
+
this._log.info('copyLogEntries response %j', rawResponse);
|
|
1623
|
+
return [response, rawResponse, _];
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* Check the status of the long running operation returned by `copyLogEntries()`.
|
|
1628
|
+
* @param {String} name
|
|
1629
|
+
* The operation name that will be passed.
|
|
1630
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1631
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1632
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1633
|
+
* for more details and examples.
|
|
1634
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.copy_log_entries.js</caption>
|
|
1635
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_CopyLogEntries_async
|
|
1636
|
+
*/
|
|
1637
|
+
async checkCopyLogEntriesProgress(name) {
|
|
1638
|
+
this._log.info('copyLogEntries long-running');
|
|
1639
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
1640
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
1641
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.copyLogEntries, this._gaxModule.createDefaultBackoffSettings());
|
|
1642
|
+
return decodeOperation;
|
|
1643
|
+
}
|
|
1644
|
+
listBuckets(request, optionsOrCallback, callback) {
|
|
1645
|
+
request = request || {};
|
|
1646
|
+
let options;
|
|
1647
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1648
|
+
callback = optionsOrCallback;
|
|
1649
|
+
options = {};
|
|
1650
|
+
}
|
|
1651
|
+
else {
|
|
1652
|
+
options = optionsOrCallback;
|
|
1653
|
+
}
|
|
1654
|
+
options = options || {};
|
|
1655
|
+
options.otherArgs = options.otherArgs || {};
|
|
1656
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1657
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1658
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1659
|
+
parent: request.parent ?? '',
|
|
1660
|
+
});
|
|
1661
|
+
this.initialize().catch((err) => {
|
|
1662
|
+
throw err;
|
|
1663
|
+
});
|
|
1664
|
+
const wrappedCallback = callback
|
|
1665
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1666
|
+
this._log.info('listBuckets values %j', values);
|
|
1667
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1668
|
+
}
|
|
1669
|
+
: undefined;
|
|
1670
|
+
this._log.info('listBuckets request %j', request);
|
|
1671
|
+
return this.innerApiCalls
|
|
1672
|
+
.listBuckets(request, options, wrappedCallback)
|
|
1673
|
+
?.then(([response, input, output]) => {
|
|
1674
|
+
this._log.info('listBuckets values %j', response);
|
|
1675
|
+
return [response, input, output];
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* Equivalent to `listBuckets`, but returns a NodeJS Stream object.
|
|
1680
|
+
* @param {Object} request
|
|
1681
|
+
* The request object that will be sent.
|
|
1682
|
+
* @param {string} request.parent
|
|
1683
|
+
* Required. The parent resource whose buckets are to be listed:
|
|
1684
|
+
*
|
|
1685
|
+
* "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
|
|
1686
|
+
* "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
|
|
1687
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
|
|
1688
|
+
* "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
|
|
1689
|
+
*
|
|
1690
|
+
* Note: The locations portion of the resource must be specified, but
|
|
1691
|
+
* supplying the character `-` in place of [LOCATION_ID] will return all
|
|
1692
|
+
* buckets.
|
|
1693
|
+
* @param {string} [request.pageToken]
|
|
1694
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
1695
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
1696
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
1697
|
+
* parameters should be identical to those in the previous call.
|
|
1698
|
+
* @param {number} [request.pageSize]
|
|
1699
|
+
* Optional. The maximum number of results to return from this request.
|
|
1700
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
1701
|
+
* response indicates that more results might be available.
|
|
1702
|
+
* @param {object} [options]
|
|
1703
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1704
|
+
* @returns {Stream}
|
|
1705
|
+
* An object stream which emits an object representing {@link protos.google.logging.v2.LogBucket|LogBucket} on 'data' event.
|
|
1706
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1707
|
+
* times as needed. Note that it can affect your quota.
|
|
1708
|
+
* We recommend using `listBucketsAsync()`
|
|
1709
|
+
* method described below for async iteration which you can stop as needed.
|
|
1710
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1711
|
+
* for more details and examples.
|
|
1712
|
+
*/
|
|
1713
|
+
listBucketsStream(request, options) {
|
|
1714
|
+
request = request || {};
|
|
1715
|
+
options = options || {};
|
|
1716
|
+
options.otherArgs = options.otherArgs || {};
|
|
1717
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1718
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1719
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1720
|
+
parent: request.parent ?? '',
|
|
1721
|
+
});
|
|
1722
|
+
const defaultCallSettings = this._defaults['listBuckets'];
|
|
1723
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1724
|
+
this.initialize().catch((err) => {
|
|
1725
|
+
throw err;
|
|
1726
|
+
});
|
|
1727
|
+
this._log.info('listBuckets stream %j', request);
|
|
1728
|
+
return this.descriptors.page.listBuckets.createStream(this.innerApiCalls.listBuckets, request, callSettings);
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* Equivalent to `listBuckets`, but returns an iterable object.
|
|
1732
|
+
*
|
|
1733
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1734
|
+
* @param {Object} request
|
|
1735
|
+
* The request object that will be sent.
|
|
1736
|
+
* @param {string} request.parent
|
|
1737
|
+
* Required. The parent resource whose buckets are to be listed:
|
|
1738
|
+
*
|
|
1739
|
+
* "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
|
|
1740
|
+
* "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
|
|
1741
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
|
|
1742
|
+
* "folders/[FOLDER_ID]/locations/[LOCATION_ID]"
|
|
1743
|
+
*
|
|
1744
|
+
* Note: The locations portion of the resource must be specified, but
|
|
1745
|
+
* supplying the character `-` in place of [LOCATION_ID] will return all
|
|
1746
|
+
* buckets.
|
|
1747
|
+
* @param {string} [request.pageToken]
|
|
1748
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
1749
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
1750
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
1751
|
+
* parameters should be identical to those in the previous call.
|
|
1752
|
+
* @param {number} [request.pageSize]
|
|
1753
|
+
* Optional. The maximum number of results to return from this request.
|
|
1754
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
1755
|
+
* response indicates that more results might be available.
|
|
1756
|
+
* @param {object} [options]
|
|
1757
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1758
|
+
* @returns {Object}
|
|
1759
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1760
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1761
|
+
* {@link protos.google.logging.v2.LogBucket|LogBucket}. The API will be called under the hood as needed, once per the page,
|
|
1762
|
+
* so you can stop the iteration when you don't need more results.
|
|
1763
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1764
|
+
* for more details and examples.
|
|
1765
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.list_buckets.js</caption>
|
|
1766
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_ListBuckets_async
|
|
1767
|
+
*/
|
|
1768
|
+
listBucketsAsync(request, options) {
|
|
1769
|
+
request = request || {};
|
|
1770
|
+
options = options || {};
|
|
1771
|
+
options.otherArgs = options.otherArgs || {};
|
|
1772
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1773
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1774
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1775
|
+
parent: request.parent ?? '',
|
|
1776
|
+
});
|
|
1777
|
+
const defaultCallSettings = this._defaults['listBuckets'];
|
|
1778
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1779
|
+
this.initialize().catch((err) => {
|
|
1780
|
+
throw err;
|
|
1781
|
+
});
|
|
1782
|
+
this._log.info('listBuckets iterate %j', request);
|
|
1783
|
+
return this.descriptors.page.listBuckets.asyncIterate(this.innerApiCalls['listBuckets'], request, callSettings);
|
|
1784
|
+
}
|
|
1785
|
+
listViews(request, optionsOrCallback, callback) {
|
|
1786
|
+
request = request || {};
|
|
1787
|
+
let options;
|
|
1788
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1789
|
+
callback = optionsOrCallback;
|
|
1790
|
+
options = {};
|
|
1791
|
+
}
|
|
1792
|
+
else {
|
|
1793
|
+
options = optionsOrCallback;
|
|
1794
|
+
}
|
|
1795
|
+
options = options || {};
|
|
1796
|
+
options.otherArgs = options.otherArgs || {};
|
|
1797
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1798
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1799
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1800
|
+
parent: request.parent ?? '',
|
|
1801
|
+
});
|
|
1802
|
+
this.initialize().catch((err) => {
|
|
1803
|
+
throw err;
|
|
1804
|
+
});
|
|
1805
|
+
const wrappedCallback = callback
|
|
1806
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1807
|
+
this._log.info('listViews values %j', values);
|
|
1808
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1809
|
+
}
|
|
1810
|
+
: undefined;
|
|
1811
|
+
this._log.info('listViews request %j', request);
|
|
1812
|
+
return this.innerApiCalls
|
|
1813
|
+
.listViews(request, options, wrappedCallback)
|
|
1814
|
+
?.then(([response, input, output]) => {
|
|
1815
|
+
this._log.info('listViews values %j', response);
|
|
1816
|
+
return [response, input, output];
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* Equivalent to `listViews`, but returns a NodeJS Stream object.
|
|
1821
|
+
* @param {Object} request
|
|
1822
|
+
* The request object that will be sent.
|
|
1823
|
+
* @param {string} request.parent
|
|
1824
|
+
* Required. The bucket whose views are to be listed:
|
|
1825
|
+
*
|
|
1826
|
+
* "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
|
1827
|
+
* @param {string} [request.pageToken]
|
|
1828
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
1829
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
1830
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
1831
|
+
* parameters should be identical to those in the previous call.
|
|
1832
|
+
* @param {number} [request.pageSize]
|
|
1833
|
+
* Optional. The maximum number of results to return from this request.
|
|
1834
|
+
*
|
|
1835
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
1836
|
+
* response indicates that more results might be available.
|
|
1837
|
+
* @param {object} [options]
|
|
1838
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1839
|
+
* @returns {Stream}
|
|
1840
|
+
* An object stream which emits an object representing {@link protos.google.logging.v2.LogView|LogView} on 'data' event.
|
|
1841
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1842
|
+
* times as needed. Note that it can affect your quota.
|
|
1843
|
+
* We recommend using `listViewsAsync()`
|
|
1844
|
+
* method described below for async iteration which you can stop as needed.
|
|
1845
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1846
|
+
* for more details and examples.
|
|
1847
|
+
*/
|
|
1848
|
+
listViewsStream(request, options) {
|
|
1849
|
+
request = request || {};
|
|
1850
|
+
options = options || {};
|
|
1851
|
+
options.otherArgs = options.otherArgs || {};
|
|
1852
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1853
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1854
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1855
|
+
parent: request.parent ?? '',
|
|
1856
|
+
});
|
|
1857
|
+
const defaultCallSettings = this._defaults['listViews'];
|
|
1858
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1859
|
+
this.initialize().catch((err) => {
|
|
1860
|
+
throw err;
|
|
1861
|
+
});
|
|
1862
|
+
this._log.info('listViews stream %j', request);
|
|
1863
|
+
return this.descriptors.page.listViews.createStream(this.innerApiCalls.listViews, request, callSettings);
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* Equivalent to `listViews`, but returns an iterable object.
|
|
1867
|
+
*
|
|
1868
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1869
|
+
* @param {Object} request
|
|
1870
|
+
* The request object that will be sent.
|
|
1871
|
+
* @param {string} request.parent
|
|
1872
|
+
* Required. The bucket whose views are to be listed:
|
|
1873
|
+
*
|
|
1874
|
+
* "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
|
1875
|
+
* @param {string} [request.pageToken]
|
|
1876
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
1877
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
1878
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
1879
|
+
* parameters should be identical to those in the previous call.
|
|
1880
|
+
* @param {number} [request.pageSize]
|
|
1881
|
+
* Optional. The maximum number of results to return from this request.
|
|
1882
|
+
*
|
|
1883
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
1884
|
+
* response indicates that more results might be available.
|
|
1885
|
+
* @param {object} [options]
|
|
1886
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1887
|
+
* @returns {Object}
|
|
1888
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1889
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1890
|
+
* {@link protos.google.logging.v2.LogView|LogView}. The API will be called under the hood as needed, once per the page,
|
|
1891
|
+
* so you can stop the iteration when you don't need more results.
|
|
1892
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1893
|
+
* for more details and examples.
|
|
1894
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.list_views.js</caption>
|
|
1895
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_ListViews_async
|
|
1896
|
+
*/
|
|
1897
|
+
listViewsAsync(request, options) {
|
|
1898
|
+
request = request || {};
|
|
1899
|
+
options = options || {};
|
|
1900
|
+
options.otherArgs = options.otherArgs || {};
|
|
1901
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1902
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1903
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1904
|
+
parent: request.parent ?? '',
|
|
1905
|
+
});
|
|
1906
|
+
const defaultCallSettings = this._defaults['listViews'];
|
|
1907
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1908
|
+
this.initialize().catch((err) => {
|
|
1909
|
+
throw err;
|
|
1910
|
+
});
|
|
1911
|
+
this._log.info('listViews iterate %j', request);
|
|
1912
|
+
return this.descriptors.page.listViews.asyncIterate(this.innerApiCalls['listViews'], request, callSettings);
|
|
1913
|
+
}
|
|
1914
|
+
listSinks(request, optionsOrCallback, callback) {
|
|
1915
|
+
request = request || {};
|
|
1916
|
+
let options;
|
|
1917
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1918
|
+
callback = optionsOrCallback;
|
|
1919
|
+
options = {};
|
|
1920
|
+
}
|
|
1921
|
+
else {
|
|
1922
|
+
options = optionsOrCallback;
|
|
1923
|
+
}
|
|
1924
|
+
options = options || {};
|
|
1925
|
+
options.otherArgs = options.otherArgs || {};
|
|
1926
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1927
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1928
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1929
|
+
parent: request.parent ?? '',
|
|
1930
|
+
});
|
|
1931
|
+
this.initialize().catch((err) => {
|
|
1932
|
+
throw err;
|
|
1933
|
+
});
|
|
1934
|
+
const wrappedCallback = callback
|
|
1935
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1936
|
+
this._log.info('listSinks values %j', values);
|
|
1937
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1938
|
+
}
|
|
1939
|
+
: undefined;
|
|
1940
|
+
this._log.info('listSinks request %j', request);
|
|
1941
|
+
return this.innerApiCalls
|
|
1942
|
+
.listSinks(request, options, wrappedCallback)
|
|
1943
|
+
?.then(([response, input, output]) => {
|
|
1944
|
+
this._log.info('listSinks values %j', response);
|
|
1945
|
+
return [response, input, output];
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
* Equivalent to `listSinks`, but returns a NodeJS Stream object.
|
|
1950
|
+
* @param {Object} request
|
|
1951
|
+
* The request object that will be sent.
|
|
1952
|
+
* @param {string} request.parent
|
|
1953
|
+
* Required. The parent resource whose sinks are to be listed:
|
|
1954
|
+
*
|
|
1955
|
+
* "projects/[PROJECT_ID]"
|
|
1956
|
+
* "organizations/[ORGANIZATION_ID]"
|
|
1957
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]"
|
|
1958
|
+
* "folders/[FOLDER_ID]"
|
|
1959
|
+
* @param {string} [request.pageToken]
|
|
1960
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
1961
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
1962
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
1963
|
+
* parameters should be identical to those in the previous call.
|
|
1964
|
+
* @param {number} [request.pageSize]
|
|
1965
|
+
* Optional. The maximum number of results to return from this request.
|
|
1966
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
1967
|
+
* response indicates that more results might be available.
|
|
1968
|
+
* @param {object} [options]
|
|
1969
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1970
|
+
* @returns {Stream}
|
|
1971
|
+
* An object stream which emits an object representing {@link protos.google.logging.v2.LogSink|LogSink} on 'data' event.
|
|
1972
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1973
|
+
* times as needed. Note that it can affect your quota.
|
|
1974
|
+
* We recommend using `listSinksAsync()`
|
|
1975
|
+
* method described below for async iteration which you can stop as needed.
|
|
1976
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1977
|
+
* for more details and examples.
|
|
1978
|
+
*/
|
|
1979
|
+
listSinksStream(request, options) {
|
|
1980
|
+
request = request || {};
|
|
1981
|
+
options = options || {};
|
|
1982
|
+
options.otherArgs = options.otherArgs || {};
|
|
1983
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1984
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1985
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1986
|
+
parent: request.parent ?? '',
|
|
1987
|
+
});
|
|
1988
|
+
const defaultCallSettings = this._defaults['listSinks'];
|
|
1989
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1990
|
+
this.initialize().catch((err) => {
|
|
1991
|
+
throw err;
|
|
1992
|
+
});
|
|
1993
|
+
this._log.info('listSinks stream %j', request);
|
|
1994
|
+
return this.descriptors.page.listSinks.createStream(this.innerApiCalls.listSinks, request, callSettings);
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Equivalent to `listSinks`, but returns an iterable object.
|
|
1998
|
+
*
|
|
1999
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2000
|
+
* @param {Object} request
|
|
2001
|
+
* The request object that will be sent.
|
|
2002
|
+
* @param {string} request.parent
|
|
2003
|
+
* Required. The parent resource whose sinks are to be listed:
|
|
2004
|
+
*
|
|
2005
|
+
* "projects/[PROJECT_ID]"
|
|
2006
|
+
* "organizations/[ORGANIZATION_ID]"
|
|
2007
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]"
|
|
2008
|
+
* "folders/[FOLDER_ID]"
|
|
2009
|
+
* @param {string} [request.pageToken]
|
|
2010
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
2011
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
2012
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
2013
|
+
* parameters should be identical to those in the previous call.
|
|
2014
|
+
* @param {number} [request.pageSize]
|
|
2015
|
+
* Optional. The maximum number of results to return from this request.
|
|
2016
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
2017
|
+
* response indicates that more results might be available.
|
|
2018
|
+
* @param {object} [options]
|
|
2019
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2020
|
+
* @returns {Object}
|
|
2021
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2022
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2023
|
+
* {@link protos.google.logging.v2.LogSink|LogSink}. The API will be called under the hood as needed, once per the page,
|
|
2024
|
+
* so you can stop the iteration when you don't need more results.
|
|
2025
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2026
|
+
* for more details and examples.
|
|
2027
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.list_sinks.js</caption>
|
|
2028
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_ListSinks_async
|
|
2029
|
+
*/
|
|
2030
|
+
listSinksAsync(request, options) {
|
|
2031
|
+
request = request || {};
|
|
2032
|
+
options = options || {};
|
|
2033
|
+
options.otherArgs = options.otherArgs || {};
|
|
2034
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2035
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2036
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2037
|
+
parent: request.parent ?? '',
|
|
2038
|
+
});
|
|
2039
|
+
const defaultCallSettings = this._defaults['listSinks'];
|
|
2040
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2041
|
+
this.initialize().catch((err) => {
|
|
2042
|
+
throw err;
|
|
2043
|
+
});
|
|
2044
|
+
this._log.info('listSinks iterate %j', request);
|
|
2045
|
+
return this.descriptors.page.listSinks.asyncIterate(this.innerApiCalls['listSinks'], request, callSettings);
|
|
2046
|
+
}
|
|
2047
|
+
listLinks(request, optionsOrCallback, callback) {
|
|
2048
|
+
request = request || {};
|
|
2049
|
+
let options;
|
|
2050
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2051
|
+
callback = optionsOrCallback;
|
|
2052
|
+
options = {};
|
|
2053
|
+
}
|
|
2054
|
+
else {
|
|
2055
|
+
options = optionsOrCallback;
|
|
2056
|
+
}
|
|
2057
|
+
options = options || {};
|
|
2058
|
+
options.otherArgs = options.otherArgs || {};
|
|
2059
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2060
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2061
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2062
|
+
parent: request.parent ?? '',
|
|
2063
|
+
});
|
|
2064
|
+
this.initialize().catch((err) => {
|
|
2065
|
+
throw err;
|
|
2066
|
+
});
|
|
2067
|
+
const wrappedCallback = callback
|
|
2068
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
2069
|
+
this._log.info('listLinks values %j', values);
|
|
2070
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
2071
|
+
}
|
|
2072
|
+
: undefined;
|
|
2073
|
+
this._log.info('listLinks request %j', request);
|
|
2074
|
+
return this.innerApiCalls
|
|
2075
|
+
.listLinks(request, options, wrappedCallback)
|
|
2076
|
+
?.then(([response, input, output]) => {
|
|
2077
|
+
this._log.info('listLinks values %j', response);
|
|
2078
|
+
return [response, input, output];
|
|
2079
|
+
});
|
|
2080
|
+
}
|
|
2081
|
+
/**
|
|
2082
|
+
* Equivalent to `listLinks`, but returns a NodeJS Stream object.
|
|
2083
|
+
* @param {Object} request
|
|
2084
|
+
* The request object that will be sent.
|
|
2085
|
+
* @param {string} request.parent
|
|
2086
|
+
* Required. The parent resource whose links are to be listed:
|
|
2087
|
+
*
|
|
2088
|
+
* "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/"
|
|
2089
|
+
* "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/"
|
|
2090
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/"
|
|
2091
|
+
* "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/
|
|
2092
|
+
* @param {string} [request.pageToken]
|
|
2093
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
2094
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
2095
|
+
* `nextPageToken` from the previous response.
|
|
2096
|
+
* @param {number} [request.pageSize]
|
|
2097
|
+
* Optional. The maximum number of results to return from this request.
|
|
2098
|
+
* @param {object} [options]
|
|
2099
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2100
|
+
* @returns {Stream}
|
|
2101
|
+
* An object stream which emits an object representing {@link protos.google.logging.v2.Link|Link} on 'data' event.
|
|
2102
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2103
|
+
* times as needed. Note that it can affect your quota.
|
|
2104
|
+
* We recommend using `listLinksAsync()`
|
|
2105
|
+
* method described below for async iteration which you can stop as needed.
|
|
2106
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2107
|
+
* for more details and examples.
|
|
2108
|
+
*/
|
|
2109
|
+
listLinksStream(request, options) {
|
|
2110
|
+
request = request || {};
|
|
2111
|
+
options = options || {};
|
|
2112
|
+
options.otherArgs = options.otherArgs || {};
|
|
2113
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2114
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2115
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2116
|
+
parent: request.parent ?? '',
|
|
2117
|
+
});
|
|
2118
|
+
const defaultCallSettings = this._defaults['listLinks'];
|
|
2119
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2120
|
+
this.initialize().catch((err) => {
|
|
2121
|
+
throw err;
|
|
2122
|
+
});
|
|
2123
|
+
this._log.info('listLinks stream %j', request);
|
|
2124
|
+
return this.descriptors.page.listLinks.createStream(this.innerApiCalls.listLinks, request, callSettings);
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Equivalent to `listLinks`, but returns an iterable object.
|
|
2128
|
+
*
|
|
2129
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2130
|
+
* @param {Object} request
|
|
2131
|
+
* The request object that will be sent.
|
|
2132
|
+
* @param {string} request.parent
|
|
2133
|
+
* Required. The parent resource whose links are to be listed:
|
|
2134
|
+
*
|
|
2135
|
+
* "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/"
|
|
2136
|
+
* "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/"
|
|
2137
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/"
|
|
2138
|
+
* "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/
|
|
2139
|
+
* @param {string} [request.pageToken]
|
|
2140
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
2141
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
2142
|
+
* `nextPageToken` from the previous response.
|
|
2143
|
+
* @param {number} [request.pageSize]
|
|
2144
|
+
* Optional. The maximum number of results to return from this request.
|
|
2145
|
+
* @param {object} [options]
|
|
2146
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2147
|
+
* @returns {Object}
|
|
2148
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2149
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2150
|
+
* {@link protos.google.logging.v2.Link|Link}. The API will be called under the hood as needed, once per the page,
|
|
2151
|
+
* so you can stop the iteration when you don't need more results.
|
|
2152
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2153
|
+
* for more details and examples.
|
|
2154
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.list_links.js</caption>
|
|
2155
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_ListLinks_async
|
|
2156
|
+
*/
|
|
2157
|
+
listLinksAsync(request, options) {
|
|
2158
|
+
request = request || {};
|
|
2159
|
+
options = options || {};
|
|
2160
|
+
options.otherArgs = options.otherArgs || {};
|
|
2161
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2162
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2163
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2164
|
+
parent: request.parent ?? '',
|
|
2165
|
+
});
|
|
2166
|
+
const defaultCallSettings = this._defaults['listLinks'];
|
|
2167
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2168
|
+
this.initialize().catch((err) => {
|
|
2169
|
+
throw err;
|
|
2170
|
+
});
|
|
2171
|
+
this._log.info('listLinks iterate %j', request);
|
|
2172
|
+
return this.descriptors.page.listLinks.asyncIterate(this.innerApiCalls['listLinks'], request, callSettings);
|
|
2173
|
+
}
|
|
2174
|
+
listExclusions(request, optionsOrCallback, callback) {
|
|
2175
|
+
request = request || {};
|
|
2176
|
+
let options;
|
|
2177
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2178
|
+
callback = optionsOrCallback;
|
|
2179
|
+
options = {};
|
|
2180
|
+
}
|
|
2181
|
+
else {
|
|
2182
|
+
options = optionsOrCallback;
|
|
2183
|
+
}
|
|
2184
|
+
options = options || {};
|
|
2185
|
+
options.otherArgs = options.otherArgs || {};
|
|
2186
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2187
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2188
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2189
|
+
parent: request.parent ?? '',
|
|
2190
|
+
});
|
|
2191
|
+
this.initialize().catch((err) => {
|
|
2192
|
+
throw err;
|
|
2193
|
+
});
|
|
2194
|
+
const wrappedCallback = callback
|
|
2195
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
2196
|
+
this._log.info('listExclusions values %j', values);
|
|
2197
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
2198
|
+
}
|
|
2199
|
+
: undefined;
|
|
2200
|
+
this._log.info('listExclusions request %j', request);
|
|
2201
|
+
return this.innerApiCalls
|
|
2202
|
+
.listExclusions(request, options, wrappedCallback)
|
|
2203
|
+
?.then(([response, input, output]) => {
|
|
2204
|
+
this._log.info('listExclusions values %j', response);
|
|
2205
|
+
return [response, input, output];
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* Equivalent to `listExclusions`, but returns a NodeJS Stream object.
|
|
2210
|
+
* @param {Object} request
|
|
2211
|
+
* The request object that will be sent.
|
|
2212
|
+
* @param {string} request.parent
|
|
2213
|
+
* Required. The parent resource whose exclusions are to be listed.
|
|
2214
|
+
*
|
|
2215
|
+
* "projects/[PROJECT_ID]"
|
|
2216
|
+
* "organizations/[ORGANIZATION_ID]"
|
|
2217
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]"
|
|
2218
|
+
* "folders/[FOLDER_ID]"
|
|
2219
|
+
* @param {string} [request.pageToken]
|
|
2220
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
2221
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
2222
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
2223
|
+
* parameters should be identical to those in the previous call.
|
|
2224
|
+
* @param {number} [request.pageSize]
|
|
2225
|
+
* Optional. The maximum number of results to return from this request.
|
|
2226
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
2227
|
+
* response indicates that more results might be available.
|
|
2228
|
+
* @param {object} [options]
|
|
2229
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2230
|
+
* @returns {Stream}
|
|
2231
|
+
* An object stream which emits an object representing {@link protos.google.logging.v2.LogExclusion|LogExclusion} on 'data' event.
|
|
2232
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2233
|
+
* times as needed. Note that it can affect your quota.
|
|
2234
|
+
* We recommend using `listExclusionsAsync()`
|
|
2235
|
+
* method described below for async iteration which you can stop as needed.
|
|
2236
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2237
|
+
* for more details and examples.
|
|
2238
|
+
*/
|
|
2239
|
+
listExclusionsStream(request, options) {
|
|
2240
|
+
request = request || {};
|
|
2241
|
+
options = options || {};
|
|
2242
|
+
options.otherArgs = options.otherArgs || {};
|
|
2243
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2244
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2245
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2246
|
+
parent: request.parent ?? '',
|
|
2247
|
+
});
|
|
2248
|
+
const defaultCallSettings = this._defaults['listExclusions'];
|
|
2249
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2250
|
+
this.initialize().catch((err) => {
|
|
2251
|
+
throw err;
|
|
2252
|
+
});
|
|
2253
|
+
this._log.info('listExclusions stream %j', request);
|
|
2254
|
+
return this.descriptors.page.listExclusions.createStream(this.innerApiCalls.listExclusions, request, callSettings);
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Equivalent to `listExclusions`, but returns an iterable object.
|
|
2258
|
+
*
|
|
2259
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2260
|
+
* @param {Object} request
|
|
2261
|
+
* The request object that will be sent.
|
|
2262
|
+
* @param {string} request.parent
|
|
2263
|
+
* Required. The parent resource whose exclusions are to be listed.
|
|
2264
|
+
*
|
|
2265
|
+
* "projects/[PROJECT_ID]"
|
|
2266
|
+
* "organizations/[ORGANIZATION_ID]"
|
|
2267
|
+
* "billingAccounts/[BILLING_ACCOUNT_ID]"
|
|
2268
|
+
* "folders/[FOLDER_ID]"
|
|
2269
|
+
* @param {string} [request.pageToken]
|
|
2270
|
+
* Optional. If present, then retrieve the next batch of results from the
|
|
2271
|
+
* preceding call to this method. `pageToken` must be the value of
|
|
2272
|
+
* `nextPageToken` from the previous response. The values of other method
|
|
2273
|
+
* parameters should be identical to those in the previous call.
|
|
2274
|
+
* @param {number} [request.pageSize]
|
|
2275
|
+
* Optional. The maximum number of results to return from this request.
|
|
2276
|
+
* Non-positive values are ignored. The presence of `nextPageToken` in the
|
|
2277
|
+
* response indicates that more results might be available.
|
|
2278
|
+
* @param {object} [options]
|
|
2279
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2280
|
+
* @returns {Object}
|
|
2281
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2282
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2283
|
+
* {@link protos.google.logging.v2.LogExclusion|LogExclusion}. The API will be called under the hood as needed, once per the page,
|
|
2284
|
+
* so you can stop the iteration when you don't need more results.
|
|
2285
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2286
|
+
* for more details and examples.
|
|
2287
|
+
* @example <caption>include:samples/generated/v2/config_service_v2.list_exclusions.js</caption>
|
|
2288
|
+
* region_tag:logging_v2_generated_ConfigServiceV2_ListExclusions_async
|
|
2289
|
+
*/
|
|
2290
|
+
listExclusionsAsync(request, options) {
|
|
2291
|
+
request = request || {};
|
|
2292
|
+
options = options || {};
|
|
2293
|
+
options.otherArgs = options.otherArgs || {};
|
|
2294
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2295
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2296
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2297
|
+
parent: request.parent ?? '',
|
|
2298
|
+
});
|
|
2299
|
+
const defaultCallSettings = this._defaults['listExclusions'];
|
|
2300
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2301
|
+
this.initialize().catch((err) => {
|
|
2302
|
+
throw err;
|
|
2303
|
+
});
|
|
2304
|
+
this._log.info('listExclusions iterate %j', request);
|
|
2305
|
+
return this.descriptors.page.listExclusions.asyncIterate(this.innerApiCalls['listExclusions'], request, callSettings);
|
|
2306
|
+
}
|
|
2307
|
+
/**
|
|
2308
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
|
2309
|
+
* method to poll the operation result at intervals as recommended by the API
|
|
2310
|
+
* service.
|
|
2311
|
+
*
|
|
2312
|
+
* @param {Object} request - The request object that will be sent.
|
|
2313
|
+
* @param {string} request.name - The name of the operation resource.
|
|
2314
|
+
* @param {Object=} options
|
|
2315
|
+
* Optional parameters. You can override the default settings for this call,
|
|
2316
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
2317
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
2318
|
+
* for the details.
|
|
2319
|
+
* @param {function(?Error, ?Object)=} callback
|
|
2320
|
+
* The function which will be called with the result of the API call.
|
|
2321
|
+
*
|
|
2322
|
+
* The second parameter to the callback is an object representing
|
|
2323
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
2324
|
+
* @return {Promise} - The promise which resolves to an array.
|
|
2325
|
+
* The first element of the array is an object representing
|
|
2326
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
2327
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
2328
|
+
*
|
|
2329
|
+
* @example
|
|
2330
|
+
* ```
|
|
2331
|
+
* const client = longrunning.operationsClient();
|
|
2332
|
+
* const name = '';
|
|
2333
|
+
* const [response] = await client.getOperation({name});
|
|
2334
|
+
* // doThingsWith(response)
|
|
2335
|
+
* ```
|
|
2336
|
+
*/
|
|
2337
|
+
getOperation(request, optionsOrCallback, callback) {
|
|
2338
|
+
let options;
|
|
2339
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2340
|
+
callback = optionsOrCallback;
|
|
2341
|
+
options = {};
|
|
2342
|
+
}
|
|
2343
|
+
else {
|
|
2344
|
+
options = optionsOrCallback;
|
|
2345
|
+
}
|
|
2346
|
+
options = options || {};
|
|
2347
|
+
options.otherArgs = options.otherArgs || {};
|
|
2348
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2349
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2350
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2351
|
+
name: request.name ?? '',
|
|
2352
|
+
});
|
|
2353
|
+
return this.operationsClient.getOperation(request, options, callback);
|
|
2354
|
+
}
|
|
2355
|
+
/**
|
|
2356
|
+
* Lists operations that match the specified filter in the request. If the
|
|
2357
|
+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
|
|
2358
|
+
*
|
|
2359
|
+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
|
|
2360
|
+
*
|
|
2361
|
+
* @param {Object} request - The request object that will be sent.
|
|
2362
|
+
* @param {string} request.name - The name of the operation collection.
|
|
2363
|
+
* @param {string} request.filter - The standard list filter.
|
|
2364
|
+
* @param {number=} request.pageSize -
|
|
2365
|
+
* The maximum number of resources contained in the underlying API
|
|
2366
|
+
* response. If page streaming is performed per-resource, this
|
|
2367
|
+
* parameter does not affect the return value. If page streaming is
|
|
2368
|
+
* performed per-page, this determines the maximum number of
|
|
2369
|
+
* resources in a page.
|
|
2370
|
+
* @param {Object=} options
|
|
2371
|
+
* Optional parameters. You can override the default settings for this call,
|
|
2372
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
2373
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
2374
|
+
* details.
|
|
2375
|
+
* @returns {Object}
|
|
2376
|
+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
|
|
2377
|
+
*
|
|
2378
|
+
* @example
|
|
2379
|
+
* ```
|
|
2380
|
+
* const client = longrunning.operationsClient();
|
|
2381
|
+
* for await (const response of client.listOperationsAsync(request));
|
|
2382
|
+
* // doThingsWith(response)
|
|
2383
|
+
* ```
|
|
2384
|
+
*/
|
|
2385
|
+
listOperationsAsync(request, options) {
|
|
2386
|
+
options = options || {};
|
|
2387
|
+
options.otherArgs = options.otherArgs || {};
|
|
2388
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2389
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2390
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2391
|
+
name: request.name ?? '',
|
|
2392
|
+
});
|
|
2393
|
+
return this.operationsClient.listOperationsAsync(request, options);
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* Starts asynchronous cancellation on a long-running operation. The server
|
|
2397
|
+
* makes a best effort to cancel the operation, but success is not
|
|
2398
|
+
* guaranteed. If the server doesn't support this method, it returns
|
|
2399
|
+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
|
2400
|
+
* {@link Operations.GetOperation} or
|
|
2401
|
+
* other methods to check whether the cancellation succeeded or whether the
|
|
2402
|
+
* operation completed despite cancellation. On successful cancellation,
|
|
2403
|
+
* the operation is not deleted; instead, it becomes an operation with
|
|
2404
|
+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
|
|
2405
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
2406
|
+
*
|
|
2407
|
+
* @param {Object} request - The request object that will be sent.
|
|
2408
|
+
* @param {string} request.name - The name of the operation resource to be cancelled.
|
|
2409
|
+
* @param {Object=} options
|
|
2410
|
+
* Optional parameters. You can override the default settings for this call,
|
|
2411
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
2412
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
2413
|
+
* details.
|
|
2414
|
+
* @param {function(?Error)=} callback
|
|
2415
|
+
* The function which will be called with the result of the API call.
|
|
2416
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
2417
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
2418
|
+
* call.
|
|
2419
|
+
*
|
|
2420
|
+
* @example
|
|
2421
|
+
* ```
|
|
2422
|
+
* const client = longrunning.operationsClient();
|
|
2423
|
+
* await client.cancelOperation({name: ''});
|
|
2424
|
+
* ```
|
|
2425
|
+
*/
|
|
2426
|
+
cancelOperation(request, optionsOrCallback, callback) {
|
|
2427
|
+
let options;
|
|
2428
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2429
|
+
callback = optionsOrCallback;
|
|
2430
|
+
options = {};
|
|
2431
|
+
}
|
|
2432
|
+
else {
|
|
2433
|
+
options = optionsOrCallback;
|
|
2434
|
+
}
|
|
2435
|
+
options = options || {};
|
|
2436
|
+
options.otherArgs = options.otherArgs || {};
|
|
2437
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2438
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2439
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2440
|
+
name: request.name ?? '',
|
|
2441
|
+
});
|
|
2442
|
+
return this.operationsClient.cancelOperation(request, options, callback);
|
|
2443
|
+
}
|
|
2444
|
+
/**
|
|
2445
|
+
* Deletes a long-running operation. This method indicates that the client is
|
|
2446
|
+
* no longer interested in the operation result. It does not cancel the
|
|
2447
|
+
* operation. If the server doesn't support this method, it returns
|
|
2448
|
+
* `google.rpc.Code.UNIMPLEMENTED`.
|
|
2449
|
+
*
|
|
2450
|
+
* @param {Object} request - The request object that will be sent.
|
|
2451
|
+
* @param {string} request.name - The name of the operation resource to be deleted.
|
|
2452
|
+
* @param {Object=} options
|
|
2453
|
+
* Optional parameters. You can override the default settings for this call,
|
|
2454
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
2455
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
2456
|
+
* for the details.
|
|
2457
|
+
* @param {function(?Error)=} callback
|
|
2458
|
+
* The function which will be called with the result of the API call.
|
|
2459
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
2460
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
2461
|
+
* call.
|
|
2462
|
+
*
|
|
2463
|
+
* @example
|
|
2464
|
+
* ```
|
|
2465
|
+
* const client = longrunning.operationsClient();
|
|
2466
|
+
* await client.deleteOperation({name: ''});
|
|
2467
|
+
* ```
|
|
2468
|
+
*/
|
|
2469
|
+
deleteOperation(request, optionsOrCallback, callback) {
|
|
2470
|
+
let options;
|
|
2471
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2472
|
+
callback = optionsOrCallback;
|
|
2473
|
+
options = {};
|
|
2474
|
+
}
|
|
2475
|
+
else {
|
|
2476
|
+
options = optionsOrCallback;
|
|
2477
|
+
}
|
|
2478
|
+
options = options || {};
|
|
2479
|
+
options.otherArgs = options.otherArgs || {};
|
|
2480
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2481
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2482
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2483
|
+
name: request.name ?? '',
|
|
2484
|
+
});
|
|
2485
|
+
return this.operationsClient.deleteOperation(request, options, callback);
|
|
2486
|
+
}
|
|
2487
|
+
// --------------------
|
|
2488
|
+
// -- Path templates --
|
|
2489
|
+
// --------------------
|
|
2490
|
+
/**
|
|
2491
|
+
* Return a fully-qualified billingAccountCmekSettings resource name string.
|
|
2492
|
+
*
|
|
2493
|
+
* @param {string} billing_account
|
|
2494
|
+
* @returns {string} Resource name string.
|
|
2495
|
+
*/
|
|
2496
|
+
billingAccountCmekSettingsPath(billingAccount) {
|
|
2497
|
+
return this.pathTemplates.billingAccountCmekSettingsPathTemplate.render({
|
|
2498
|
+
billing_account: billingAccount,
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
/**
|
|
2502
|
+
* Parse the billing_account from BillingAccountCmekSettings resource.
|
|
2503
|
+
*
|
|
2504
|
+
* @param {string} billingAccountCmekSettingsName
|
|
2505
|
+
* A fully-qualified path representing billing_account_cmekSettings resource.
|
|
2506
|
+
* @returns {string} A string representing the billing_account.
|
|
2507
|
+
*/
|
|
2508
|
+
matchBillingAccountFromBillingAccountCmekSettingsName(billingAccountCmekSettingsName) {
|
|
2509
|
+
return this.pathTemplates.billingAccountCmekSettingsPathTemplate.match(billingAccountCmekSettingsName).billing_account;
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Return a fully-qualified billingAccountExclusion resource name string.
|
|
2513
|
+
*
|
|
2514
|
+
* @param {string} billing_account
|
|
2515
|
+
* @param {string} exclusion
|
|
2516
|
+
* @returns {string} Resource name string.
|
|
2517
|
+
*/
|
|
2518
|
+
billingAccountExclusionPath(billingAccount, exclusion) {
|
|
2519
|
+
return this.pathTemplates.billingAccountExclusionPathTemplate.render({
|
|
2520
|
+
billing_account: billingAccount,
|
|
2521
|
+
exclusion: exclusion,
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* Parse the billing_account from BillingAccountExclusion resource.
|
|
2526
|
+
*
|
|
2527
|
+
* @param {string} billingAccountExclusionName
|
|
2528
|
+
* A fully-qualified path representing billing_account_exclusion resource.
|
|
2529
|
+
* @returns {string} A string representing the billing_account.
|
|
2530
|
+
*/
|
|
2531
|
+
matchBillingAccountFromBillingAccountExclusionName(billingAccountExclusionName) {
|
|
2532
|
+
return this.pathTemplates.billingAccountExclusionPathTemplate.match(billingAccountExclusionName).billing_account;
|
|
2533
|
+
}
|
|
2534
|
+
/**
|
|
2535
|
+
* Parse the exclusion from BillingAccountExclusion resource.
|
|
2536
|
+
*
|
|
2537
|
+
* @param {string} billingAccountExclusionName
|
|
2538
|
+
* A fully-qualified path representing billing_account_exclusion resource.
|
|
2539
|
+
* @returns {string} A string representing the exclusion.
|
|
2540
|
+
*/
|
|
2541
|
+
matchExclusionFromBillingAccountExclusionName(billingAccountExclusionName) {
|
|
2542
|
+
return this.pathTemplates.billingAccountExclusionPathTemplate.match(billingAccountExclusionName).exclusion;
|
|
2543
|
+
}
|
|
2544
|
+
/**
|
|
2545
|
+
* Return a fully-qualified billingAccountLocationBucket resource name string.
|
|
2546
|
+
*
|
|
2547
|
+
* @param {string} billing_account
|
|
2548
|
+
* @param {string} location
|
|
2549
|
+
* @param {string} bucket
|
|
2550
|
+
* @returns {string} Resource name string.
|
|
2551
|
+
*/
|
|
2552
|
+
billingAccountLocationBucketPath(billingAccount, location, bucket) {
|
|
2553
|
+
return this.pathTemplates.billingAccountLocationBucketPathTemplate.render({
|
|
2554
|
+
billing_account: billingAccount,
|
|
2555
|
+
location: location,
|
|
2556
|
+
bucket: bucket,
|
|
2557
|
+
});
|
|
2558
|
+
}
|
|
2559
|
+
/**
|
|
2560
|
+
* Parse the billing_account from BillingAccountLocationBucket resource.
|
|
2561
|
+
*
|
|
2562
|
+
* @param {string} billingAccountLocationBucketName
|
|
2563
|
+
* A fully-qualified path representing billing_account_location_bucket resource.
|
|
2564
|
+
* @returns {string} A string representing the billing_account.
|
|
2565
|
+
*/
|
|
2566
|
+
matchBillingAccountFromBillingAccountLocationBucketName(billingAccountLocationBucketName) {
|
|
2567
|
+
return this.pathTemplates.billingAccountLocationBucketPathTemplate.match(billingAccountLocationBucketName).billing_account;
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* Parse the location from BillingAccountLocationBucket resource.
|
|
2571
|
+
*
|
|
2572
|
+
* @param {string} billingAccountLocationBucketName
|
|
2573
|
+
* A fully-qualified path representing billing_account_location_bucket resource.
|
|
2574
|
+
* @returns {string} A string representing the location.
|
|
2575
|
+
*/
|
|
2576
|
+
matchLocationFromBillingAccountLocationBucketName(billingAccountLocationBucketName) {
|
|
2577
|
+
return this.pathTemplates.billingAccountLocationBucketPathTemplate.match(billingAccountLocationBucketName).location;
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Parse the bucket from BillingAccountLocationBucket resource.
|
|
2581
|
+
*
|
|
2582
|
+
* @param {string} billingAccountLocationBucketName
|
|
2583
|
+
* A fully-qualified path representing billing_account_location_bucket resource.
|
|
2584
|
+
* @returns {string} A string representing the bucket.
|
|
2585
|
+
*/
|
|
2586
|
+
matchBucketFromBillingAccountLocationBucketName(billingAccountLocationBucketName) {
|
|
2587
|
+
return this.pathTemplates.billingAccountLocationBucketPathTemplate.match(billingAccountLocationBucketName).bucket;
|
|
2588
|
+
}
|
|
2589
|
+
/**
|
|
2590
|
+
* Return a fully-qualified billingAccountLocationBucketLink resource name string.
|
|
2591
|
+
*
|
|
2592
|
+
* @param {string} billing_account
|
|
2593
|
+
* @param {string} location
|
|
2594
|
+
* @param {string} bucket
|
|
2595
|
+
* @param {string} link
|
|
2596
|
+
* @returns {string} Resource name string.
|
|
2597
|
+
*/
|
|
2598
|
+
billingAccountLocationBucketLinkPath(billingAccount, location, bucket, link) {
|
|
2599
|
+
return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.render({
|
|
2600
|
+
billing_account: billingAccount,
|
|
2601
|
+
location: location,
|
|
2602
|
+
bucket: bucket,
|
|
2603
|
+
link: link,
|
|
2604
|
+
});
|
|
2605
|
+
}
|
|
2606
|
+
/**
|
|
2607
|
+
* Parse the billing_account from BillingAccountLocationBucketLink resource.
|
|
2608
|
+
*
|
|
2609
|
+
* @param {string} billingAccountLocationBucketLinkName
|
|
2610
|
+
* A fully-qualified path representing billing_account_location_bucket_link resource.
|
|
2611
|
+
* @returns {string} A string representing the billing_account.
|
|
2612
|
+
*/
|
|
2613
|
+
matchBillingAccountFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
|
|
2614
|
+
return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).billing_account;
|
|
2615
|
+
}
|
|
2616
|
+
/**
|
|
2617
|
+
* Parse the location from BillingAccountLocationBucketLink resource.
|
|
2618
|
+
*
|
|
2619
|
+
* @param {string} billingAccountLocationBucketLinkName
|
|
2620
|
+
* A fully-qualified path representing billing_account_location_bucket_link resource.
|
|
2621
|
+
* @returns {string} A string representing the location.
|
|
2622
|
+
*/
|
|
2623
|
+
matchLocationFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
|
|
2624
|
+
return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).location;
|
|
2625
|
+
}
|
|
2626
|
+
/**
|
|
2627
|
+
* Parse the bucket from BillingAccountLocationBucketLink resource.
|
|
2628
|
+
*
|
|
2629
|
+
* @param {string} billingAccountLocationBucketLinkName
|
|
2630
|
+
* A fully-qualified path representing billing_account_location_bucket_link resource.
|
|
2631
|
+
* @returns {string} A string representing the bucket.
|
|
2632
|
+
*/
|
|
2633
|
+
matchBucketFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
|
|
2634
|
+
return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).bucket;
|
|
2635
|
+
}
|
|
2636
|
+
/**
|
|
2637
|
+
* Parse the link from BillingAccountLocationBucketLink resource.
|
|
2638
|
+
*
|
|
2639
|
+
* @param {string} billingAccountLocationBucketLinkName
|
|
2640
|
+
* A fully-qualified path representing billing_account_location_bucket_link resource.
|
|
2641
|
+
* @returns {string} A string representing the link.
|
|
2642
|
+
*/
|
|
2643
|
+
matchLinkFromBillingAccountLocationBucketLinkName(billingAccountLocationBucketLinkName) {
|
|
2644
|
+
return this.pathTemplates.billingAccountLocationBucketLinkPathTemplate.match(billingAccountLocationBucketLinkName).link;
|
|
2645
|
+
}
|
|
2646
|
+
/**
|
|
2647
|
+
* Return a fully-qualified billingAccountLocationBucketView resource name string.
|
|
2648
|
+
*
|
|
2649
|
+
* @param {string} billing_account
|
|
2650
|
+
* @param {string} location
|
|
2651
|
+
* @param {string} bucket
|
|
2652
|
+
* @param {string} view
|
|
2653
|
+
* @returns {string} Resource name string.
|
|
2654
|
+
*/
|
|
2655
|
+
billingAccountLocationBucketViewPath(billingAccount, location, bucket, view) {
|
|
2656
|
+
return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.render({
|
|
2657
|
+
billing_account: billingAccount,
|
|
2658
|
+
location: location,
|
|
2659
|
+
bucket: bucket,
|
|
2660
|
+
view: view,
|
|
2661
|
+
});
|
|
2662
|
+
}
|
|
2663
|
+
/**
|
|
2664
|
+
* Parse the billing_account from BillingAccountLocationBucketView resource.
|
|
2665
|
+
*
|
|
2666
|
+
* @param {string} billingAccountLocationBucketViewName
|
|
2667
|
+
* A fully-qualified path representing billing_account_location_bucket_view resource.
|
|
2668
|
+
* @returns {string} A string representing the billing_account.
|
|
2669
|
+
*/
|
|
2670
|
+
matchBillingAccountFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
|
|
2671
|
+
return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).billing_account;
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* Parse the location from BillingAccountLocationBucketView resource.
|
|
2675
|
+
*
|
|
2676
|
+
* @param {string} billingAccountLocationBucketViewName
|
|
2677
|
+
* A fully-qualified path representing billing_account_location_bucket_view resource.
|
|
2678
|
+
* @returns {string} A string representing the location.
|
|
2679
|
+
*/
|
|
2680
|
+
matchLocationFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
|
|
2681
|
+
return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).location;
|
|
2682
|
+
}
|
|
2683
|
+
/**
|
|
2684
|
+
* Parse the bucket from BillingAccountLocationBucketView resource.
|
|
2685
|
+
*
|
|
2686
|
+
* @param {string} billingAccountLocationBucketViewName
|
|
2687
|
+
* A fully-qualified path representing billing_account_location_bucket_view resource.
|
|
2688
|
+
* @returns {string} A string representing the bucket.
|
|
2689
|
+
*/
|
|
2690
|
+
matchBucketFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
|
|
2691
|
+
return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).bucket;
|
|
2692
|
+
}
|
|
2693
|
+
/**
|
|
2694
|
+
* Parse the view from BillingAccountLocationBucketView resource.
|
|
2695
|
+
*
|
|
2696
|
+
* @param {string} billingAccountLocationBucketViewName
|
|
2697
|
+
* A fully-qualified path representing billing_account_location_bucket_view resource.
|
|
2698
|
+
* @returns {string} A string representing the view.
|
|
2699
|
+
*/
|
|
2700
|
+
matchViewFromBillingAccountLocationBucketViewName(billingAccountLocationBucketViewName) {
|
|
2701
|
+
return this.pathTemplates.billingAccountLocationBucketViewPathTemplate.match(billingAccountLocationBucketViewName).view;
|
|
2702
|
+
}
|
|
2703
|
+
/**
|
|
2704
|
+
* Return a fully-qualified billingAccountLog resource name string.
|
|
2705
|
+
*
|
|
2706
|
+
* @param {string} billing_account
|
|
2707
|
+
* @param {string} log
|
|
2708
|
+
* @returns {string} Resource name string.
|
|
2709
|
+
*/
|
|
2710
|
+
billingAccountLogPath(billingAccount, log) {
|
|
2711
|
+
return this.pathTemplates.billingAccountLogPathTemplate.render({
|
|
2712
|
+
billing_account: billingAccount,
|
|
2713
|
+
log: log,
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
/**
|
|
2717
|
+
* Parse the billing_account from BillingAccountLog resource.
|
|
2718
|
+
*
|
|
2719
|
+
* @param {string} billingAccountLogName
|
|
2720
|
+
* A fully-qualified path representing billing_account_log resource.
|
|
2721
|
+
* @returns {string} A string representing the billing_account.
|
|
2722
|
+
*/
|
|
2723
|
+
matchBillingAccountFromBillingAccountLogName(billingAccountLogName) {
|
|
2724
|
+
return this.pathTemplates.billingAccountLogPathTemplate.match(billingAccountLogName).billing_account;
|
|
2725
|
+
}
|
|
2726
|
+
/**
|
|
2727
|
+
* Parse the log from BillingAccountLog resource.
|
|
2728
|
+
*
|
|
2729
|
+
* @param {string} billingAccountLogName
|
|
2730
|
+
* A fully-qualified path representing billing_account_log resource.
|
|
2731
|
+
* @returns {string} A string representing the log.
|
|
2732
|
+
*/
|
|
2733
|
+
matchLogFromBillingAccountLogName(billingAccountLogName) {
|
|
2734
|
+
return this.pathTemplates.billingAccountLogPathTemplate.match(billingAccountLogName).log;
|
|
2735
|
+
}
|
|
2736
|
+
/**
|
|
2737
|
+
* Return a fully-qualified billingAccountSettings resource name string.
|
|
2738
|
+
*
|
|
2739
|
+
* @param {string} billing_account
|
|
2740
|
+
* @returns {string} Resource name string.
|
|
2741
|
+
*/
|
|
2742
|
+
billingAccountSettingsPath(billingAccount) {
|
|
2743
|
+
return this.pathTemplates.billingAccountSettingsPathTemplate.render({
|
|
2744
|
+
billing_account: billingAccount,
|
|
2745
|
+
});
|
|
2746
|
+
}
|
|
2747
|
+
/**
|
|
2748
|
+
* Parse the billing_account from BillingAccountSettings resource.
|
|
2749
|
+
*
|
|
2750
|
+
* @param {string} billingAccountSettingsName
|
|
2751
|
+
* A fully-qualified path representing billing_account_settings resource.
|
|
2752
|
+
* @returns {string} A string representing the billing_account.
|
|
2753
|
+
*/
|
|
2754
|
+
matchBillingAccountFromBillingAccountSettingsName(billingAccountSettingsName) {
|
|
2755
|
+
return this.pathTemplates.billingAccountSettingsPathTemplate.match(billingAccountSettingsName).billing_account;
|
|
2756
|
+
}
|
|
2757
|
+
/**
|
|
2758
|
+
* Return a fully-qualified billingAccountSink resource name string.
|
|
2759
|
+
*
|
|
2760
|
+
* @param {string} billing_account
|
|
2761
|
+
* @param {string} sink
|
|
2762
|
+
* @returns {string} Resource name string.
|
|
2763
|
+
*/
|
|
2764
|
+
billingAccountSinkPath(billingAccount, sink) {
|
|
2765
|
+
return this.pathTemplates.billingAccountSinkPathTemplate.render({
|
|
2766
|
+
billing_account: billingAccount,
|
|
2767
|
+
sink: sink,
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2770
|
+
/**
|
|
2771
|
+
* Parse the billing_account from BillingAccountSink resource.
|
|
2772
|
+
*
|
|
2773
|
+
* @param {string} billingAccountSinkName
|
|
2774
|
+
* A fully-qualified path representing billing_account_sink resource.
|
|
2775
|
+
* @returns {string} A string representing the billing_account.
|
|
2776
|
+
*/
|
|
2777
|
+
matchBillingAccountFromBillingAccountSinkName(billingAccountSinkName) {
|
|
2778
|
+
return this.pathTemplates.billingAccountSinkPathTemplate.match(billingAccountSinkName).billing_account;
|
|
2779
|
+
}
|
|
2780
|
+
/**
|
|
2781
|
+
* Parse the sink from BillingAccountSink resource.
|
|
2782
|
+
*
|
|
2783
|
+
* @param {string} billingAccountSinkName
|
|
2784
|
+
* A fully-qualified path representing billing_account_sink resource.
|
|
2785
|
+
* @returns {string} A string representing the sink.
|
|
2786
|
+
*/
|
|
2787
|
+
matchSinkFromBillingAccountSinkName(billingAccountSinkName) {
|
|
2788
|
+
return this.pathTemplates.billingAccountSinkPathTemplate.match(billingAccountSinkName).sink;
|
|
2789
|
+
}
|
|
2790
|
+
/**
|
|
2791
|
+
* Return a fully-qualified folderCmekSettings resource name string.
|
|
2792
|
+
*
|
|
2793
|
+
* @param {string} folder
|
|
2794
|
+
* @returns {string} Resource name string.
|
|
2795
|
+
*/
|
|
2796
|
+
folderCmekSettingsPath(folder) {
|
|
2797
|
+
return this.pathTemplates.folderCmekSettingsPathTemplate.render({
|
|
2798
|
+
folder: folder,
|
|
2799
|
+
});
|
|
2800
|
+
}
|
|
2801
|
+
/**
|
|
2802
|
+
* Parse the folder from FolderCmekSettings resource.
|
|
2803
|
+
*
|
|
2804
|
+
* @param {string} folderCmekSettingsName
|
|
2805
|
+
* A fully-qualified path representing folder_cmekSettings resource.
|
|
2806
|
+
* @returns {string} A string representing the folder.
|
|
2807
|
+
*/
|
|
2808
|
+
matchFolderFromFolderCmekSettingsName(folderCmekSettingsName) {
|
|
2809
|
+
return this.pathTemplates.folderCmekSettingsPathTemplate.match(folderCmekSettingsName).folder;
|
|
2810
|
+
}
|
|
2811
|
+
/**
|
|
2812
|
+
* Return a fully-qualified folderExclusion resource name string.
|
|
2813
|
+
*
|
|
2814
|
+
* @param {string} folder
|
|
2815
|
+
* @param {string} exclusion
|
|
2816
|
+
* @returns {string} Resource name string.
|
|
2817
|
+
*/
|
|
2818
|
+
folderExclusionPath(folder, exclusion) {
|
|
2819
|
+
return this.pathTemplates.folderExclusionPathTemplate.render({
|
|
2820
|
+
folder: folder,
|
|
2821
|
+
exclusion: exclusion,
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
/**
|
|
2825
|
+
* Parse the folder from FolderExclusion resource.
|
|
2826
|
+
*
|
|
2827
|
+
* @param {string} folderExclusionName
|
|
2828
|
+
* A fully-qualified path representing folder_exclusion resource.
|
|
2829
|
+
* @returns {string} A string representing the folder.
|
|
2830
|
+
*/
|
|
2831
|
+
matchFolderFromFolderExclusionName(folderExclusionName) {
|
|
2832
|
+
return this.pathTemplates.folderExclusionPathTemplate.match(folderExclusionName).folder;
|
|
2833
|
+
}
|
|
2834
|
+
/**
|
|
2835
|
+
* Parse the exclusion from FolderExclusion resource.
|
|
2836
|
+
*
|
|
2837
|
+
* @param {string} folderExclusionName
|
|
2838
|
+
* A fully-qualified path representing folder_exclusion resource.
|
|
2839
|
+
* @returns {string} A string representing the exclusion.
|
|
2840
|
+
*/
|
|
2841
|
+
matchExclusionFromFolderExclusionName(folderExclusionName) {
|
|
2842
|
+
return this.pathTemplates.folderExclusionPathTemplate.match(folderExclusionName).exclusion;
|
|
2843
|
+
}
|
|
2844
|
+
/**
|
|
2845
|
+
* Return a fully-qualified folderLocationBucket resource name string.
|
|
2846
|
+
*
|
|
2847
|
+
* @param {string} folder
|
|
2848
|
+
* @param {string} location
|
|
2849
|
+
* @param {string} bucket
|
|
2850
|
+
* @returns {string} Resource name string.
|
|
2851
|
+
*/
|
|
2852
|
+
folderLocationBucketPath(folder, location, bucket) {
|
|
2853
|
+
return this.pathTemplates.folderLocationBucketPathTemplate.render({
|
|
2854
|
+
folder: folder,
|
|
2855
|
+
location: location,
|
|
2856
|
+
bucket: bucket,
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2859
|
+
/**
|
|
2860
|
+
* Parse the folder from FolderLocationBucket resource.
|
|
2861
|
+
*
|
|
2862
|
+
* @param {string} folderLocationBucketName
|
|
2863
|
+
* A fully-qualified path representing folder_location_bucket resource.
|
|
2864
|
+
* @returns {string} A string representing the folder.
|
|
2865
|
+
*/
|
|
2866
|
+
matchFolderFromFolderLocationBucketName(folderLocationBucketName) {
|
|
2867
|
+
return this.pathTemplates.folderLocationBucketPathTemplate.match(folderLocationBucketName).folder;
|
|
2868
|
+
}
|
|
2869
|
+
/**
|
|
2870
|
+
* Parse the location from FolderLocationBucket resource.
|
|
2871
|
+
*
|
|
2872
|
+
* @param {string} folderLocationBucketName
|
|
2873
|
+
* A fully-qualified path representing folder_location_bucket resource.
|
|
2874
|
+
* @returns {string} A string representing the location.
|
|
2875
|
+
*/
|
|
2876
|
+
matchLocationFromFolderLocationBucketName(folderLocationBucketName) {
|
|
2877
|
+
return this.pathTemplates.folderLocationBucketPathTemplate.match(folderLocationBucketName).location;
|
|
2878
|
+
}
|
|
2879
|
+
/**
|
|
2880
|
+
* Parse the bucket from FolderLocationBucket resource.
|
|
2881
|
+
*
|
|
2882
|
+
* @param {string} folderLocationBucketName
|
|
2883
|
+
* A fully-qualified path representing folder_location_bucket resource.
|
|
2884
|
+
* @returns {string} A string representing the bucket.
|
|
2885
|
+
*/
|
|
2886
|
+
matchBucketFromFolderLocationBucketName(folderLocationBucketName) {
|
|
2887
|
+
return this.pathTemplates.folderLocationBucketPathTemplate.match(folderLocationBucketName).bucket;
|
|
2888
|
+
}
|
|
2889
|
+
/**
|
|
2890
|
+
* Return a fully-qualified folderLocationBucketLink resource name string.
|
|
2891
|
+
*
|
|
2892
|
+
* @param {string} folder
|
|
2893
|
+
* @param {string} location
|
|
2894
|
+
* @param {string} bucket
|
|
2895
|
+
* @param {string} link
|
|
2896
|
+
* @returns {string} Resource name string.
|
|
2897
|
+
*/
|
|
2898
|
+
folderLocationBucketLinkPath(folder, location, bucket, link) {
|
|
2899
|
+
return this.pathTemplates.folderLocationBucketLinkPathTemplate.render({
|
|
2900
|
+
folder: folder,
|
|
2901
|
+
location: location,
|
|
2902
|
+
bucket: bucket,
|
|
2903
|
+
link: link,
|
|
2904
|
+
});
|
|
2905
|
+
}
|
|
2906
|
+
/**
|
|
2907
|
+
* Parse the folder from FolderLocationBucketLink resource.
|
|
2908
|
+
*
|
|
2909
|
+
* @param {string} folderLocationBucketLinkName
|
|
2910
|
+
* A fully-qualified path representing folder_location_bucket_link resource.
|
|
2911
|
+
* @returns {string} A string representing the folder.
|
|
2912
|
+
*/
|
|
2913
|
+
matchFolderFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
|
|
2914
|
+
return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).folder;
|
|
2915
|
+
}
|
|
2916
|
+
/**
|
|
2917
|
+
* Parse the location from FolderLocationBucketLink resource.
|
|
2918
|
+
*
|
|
2919
|
+
* @param {string} folderLocationBucketLinkName
|
|
2920
|
+
* A fully-qualified path representing folder_location_bucket_link resource.
|
|
2921
|
+
* @returns {string} A string representing the location.
|
|
2922
|
+
*/
|
|
2923
|
+
matchLocationFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
|
|
2924
|
+
return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).location;
|
|
2925
|
+
}
|
|
2926
|
+
/**
|
|
2927
|
+
* Parse the bucket from FolderLocationBucketLink resource.
|
|
2928
|
+
*
|
|
2929
|
+
* @param {string} folderLocationBucketLinkName
|
|
2930
|
+
* A fully-qualified path representing folder_location_bucket_link resource.
|
|
2931
|
+
* @returns {string} A string representing the bucket.
|
|
2932
|
+
*/
|
|
2933
|
+
matchBucketFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
|
|
2934
|
+
return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).bucket;
|
|
2935
|
+
}
|
|
2936
|
+
/**
|
|
2937
|
+
* Parse the link from FolderLocationBucketLink resource.
|
|
2938
|
+
*
|
|
2939
|
+
* @param {string} folderLocationBucketLinkName
|
|
2940
|
+
* A fully-qualified path representing folder_location_bucket_link resource.
|
|
2941
|
+
* @returns {string} A string representing the link.
|
|
2942
|
+
*/
|
|
2943
|
+
matchLinkFromFolderLocationBucketLinkName(folderLocationBucketLinkName) {
|
|
2944
|
+
return this.pathTemplates.folderLocationBucketLinkPathTemplate.match(folderLocationBucketLinkName).link;
|
|
2945
|
+
}
|
|
2946
|
+
/**
|
|
2947
|
+
* Return a fully-qualified folderLocationBucketView resource name string.
|
|
2948
|
+
*
|
|
2949
|
+
* @param {string} folder
|
|
2950
|
+
* @param {string} location
|
|
2951
|
+
* @param {string} bucket
|
|
2952
|
+
* @param {string} view
|
|
2953
|
+
* @returns {string} Resource name string.
|
|
2954
|
+
*/
|
|
2955
|
+
folderLocationBucketViewPath(folder, location, bucket, view) {
|
|
2956
|
+
return this.pathTemplates.folderLocationBucketViewPathTemplate.render({
|
|
2957
|
+
folder: folder,
|
|
2958
|
+
location: location,
|
|
2959
|
+
bucket: bucket,
|
|
2960
|
+
view: view,
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* Parse the folder from FolderLocationBucketView resource.
|
|
2965
|
+
*
|
|
2966
|
+
* @param {string} folderLocationBucketViewName
|
|
2967
|
+
* A fully-qualified path representing folder_location_bucket_view resource.
|
|
2968
|
+
* @returns {string} A string representing the folder.
|
|
2969
|
+
*/
|
|
2970
|
+
matchFolderFromFolderLocationBucketViewName(folderLocationBucketViewName) {
|
|
2971
|
+
return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).folder;
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* Parse the location from FolderLocationBucketView resource.
|
|
2975
|
+
*
|
|
2976
|
+
* @param {string} folderLocationBucketViewName
|
|
2977
|
+
* A fully-qualified path representing folder_location_bucket_view resource.
|
|
2978
|
+
* @returns {string} A string representing the location.
|
|
2979
|
+
*/
|
|
2980
|
+
matchLocationFromFolderLocationBucketViewName(folderLocationBucketViewName) {
|
|
2981
|
+
return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).location;
|
|
2982
|
+
}
|
|
2983
|
+
/**
|
|
2984
|
+
* Parse the bucket from FolderLocationBucketView resource.
|
|
2985
|
+
*
|
|
2986
|
+
* @param {string} folderLocationBucketViewName
|
|
2987
|
+
* A fully-qualified path representing folder_location_bucket_view resource.
|
|
2988
|
+
* @returns {string} A string representing the bucket.
|
|
2989
|
+
*/
|
|
2990
|
+
matchBucketFromFolderLocationBucketViewName(folderLocationBucketViewName) {
|
|
2991
|
+
return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).bucket;
|
|
2992
|
+
}
|
|
2993
|
+
/**
|
|
2994
|
+
* Parse the view from FolderLocationBucketView resource.
|
|
2995
|
+
*
|
|
2996
|
+
* @param {string} folderLocationBucketViewName
|
|
2997
|
+
* A fully-qualified path representing folder_location_bucket_view resource.
|
|
2998
|
+
* @returns {string} A string representing the view.
|
|
2999
|
+
*/
|
|
3000
|
+
matchViewFromFolderLocationBucketViewName(folderLocationBucketViewName) {
|
|
3001
|
+
return this.pathTemplates.folderLocationBucketViewPathTemplate.match(folderLocationBucketViewName).view;
|
|
3002
|
+
}
|
|
3003
|
+
/**
|
|
3004
|
+
* Return a fully-qualified folderLog resource name string.
|
|
3005
|
+
*
|
|
3006
|
+
* @param {string} folder
|
|
3007
|
+
* @param {string} log
|
|
3008
|
+
* @returns {string} Resource name string.
|
|
3009
|
+
*/
|
|
3010
|
+
folderLogPath(folder, log) {
|
|
3011
|
+
return this.pathTemplates.folderLogPathTemplate.render({
|
|
3012
|
+
folder: folder,
|
|
3013
|
+
log: log,
|
|
3014
|
+
});
|
|
3015
|
+
}
|
|
3016
|
+
/**
|
|
3017
|
+
* Parse the folder from FolderLog resource.
|
|
3018
|
+
*
|
|
3019
|
+
* @param {string} folderLogName
|
|
3020
|
+
* A fully-qualified path representing folder_log resource.
|
|
3021
|
+
* @returns {string} A string representing the folder.
|
|
3022
|
+
*/
|
|
3023
|
+
matchFolderFromFolderLogName(folderLogName) {
|
|
3024
|
+
return this.pathTemplates.folderLogPathTemplate.match(folderLogName).folder;
|
|
3025
|
+
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Parse the log from FolderLog resource.
|
|
3028
|
+
*
|
|
3029
|
+
* @param {string} folderLogName
|
|
3030
|
+
* A fully-qualified path representing folder_log resource.
|
|
3031
|
+
* @returns {string} A string representing the log.
|
|
3032
|
+
*/
|
|
3033
|
+
matchLogFromFolderLogName(folderLogName) {
|
|
3034
|
+
return this.pathTemplates.folderLogPathTemplate.match(folderLogName).log;
|
|
3035
|
+
}
|
|
3036
|
+
/**
|
|
3037
|
+
* Return a fully-qualified folderSettings resource name string.
|
|
3038
|
+
*
|
|
3039
|
+
* @param {string} folder
|
|
3040
|
+
* @returns {string} Resource name string.
|
|
3041
|
+
*/
|
|
3042
|
+
folderSettingsPath(folder) {
|
|
3043
|
+
return this.pathTemplates.folderSettingsPathTemplate.render({
|
|
3044
|
+
folder: folder,
|
|
3045
|
+
});
|
|
3046
|
+
}
|
|
3047
|
+
/**
|
|
3048
|
+
* Parse the folder from FolderSettings resource.
|
|
3049
|
+
*
|
|
3050
|
+
* @param {string} folderSettingsName
|
|
3051
|
+
* A fully-qualified path representing folder_settings resource.
|
|
3052
|
+
* @returns {string} A string representing the folder.
|
|
3053
|
+
*/
|
|
3054
|
+
matchFolderFromFolderSettingsName(folderSettingsName) {
|
|
3055
|
+
return this.pathTemplates.folderSettingsPathTemplate.match(folderSettingsName).folder;
|
|
3056
|
+
}
|
|
3057
|
+
/**
|
|
3058
|
+
* Return a fully-qualified folderSink resource name string.
|
|
3059
|
+
*
|
|
3060
|
+
* @param {string} folder
|
|
3061
|
+
* @param {string} sink
|
|
3062
|
+
* @returns {string} Resource name string.
|
|
3063
|
+
*/
|
|
3064
|
+
folderSinkPath(folder, sink) {
|
|
3065
|
+
return this.pathTemplates.folderSinkPathTemplate.render({
|
|
3066
|
+
folder: folder,
|
|
3067
|
+
sink: sink,
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
/**
|
|
3071
|
+
* Parse the folder from FolderSink resource.
|
|
3072
|
+
*
|
|
3073
|
+
* @param {string} folderSinkName
|
|
3074
|
+
* A fully-qualified path representing folder_sink resource.
|
|
3075
|
+
* @returns {string} A string representing the folder.
|
|
3076
|
+
*/
|
|
3077
|
+
matchFolderFromFolderSinkName(folderSinkName) {
|
|
3078
|
+
return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName)
|
|
3079
|
+
.folder;
|
|
3080
|
+
}
|
|
3081
|
+
/**
|
|
3082
|
+
* Parse the sink from FolderSink resource.
|
|
3083
|
+
*
|
|
3084
|
+
* @param {string} folderSinkName
|
|
3085
|
+
* A fully-qualified path representing folder_sink resource.
|
|
3086
|
+
* @returns {string} A string representing the sink.
|
|
3087
|
+
*/
|
|
3088
|
+
matchSinkFromFolderSinkName(folderSinkName) {
|
|
3089
|
+
return this.pathTemplates.folderSinkPathTemplate.match(folderSinkName).sink;
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3092
|
+
* Return a fully-qualified location resource name string.
|
|
3093
|
+
*
|
|
3094
|
+
* @param {string} project
|
|
3095
|
+
* @param {string} location
|
|
3096
|
+
* @returns {string} Resource name string.
|
|
3097
|
+
*/
|
|
3098
|
+
locationPath(project, location) {
|
|
3099
|
+
return this.pathTemplates.locationPathTemplate.render({
|
|
3100
|
+
project: project,
|
|
3101
|
+
location: location,
|
|
3102
|
+
});
|
|
3103
|
+
}
|
|
3104
|
+
/**
|
|
3105
|
+
* Parse the project from Location resource.
|
|
3106
|
+
*
|
|
3107
|
+
* @param {string} locationName
|
|
3108
|
+
* A fully-qualified path representing Location resource.
|
|
3109
|
+
* @returns {string} A string representing the project.
|
|
3110
|
+
*/
|
|
3111
|
+
matchProjectFromLocationName(locationName) {
|
|
3112
|
+
return this.pathTemplates.locationPathTemplate.match(locationName).project;
|
|
3113
|
+
}
|
|
3114
|
+
/**
|
|
3115
|
+
* Parse the location from Location resource.
|
|
3116
|
+
*
|
|
3117
|
+
* @param {string} locationName
|
|
3118
|
+
* A fully-qualified path representing Location resource.
|
|
3119
|
+
* @returns {string} A string representing the location.
|
|
3120
|
+
*/
|
|
3121
|
+
matchLocationFromLocationName(locationName) {
|
|
3122
|
+
return this.pathTemplates.locationPathTemplate.match(locationName).location;
|
|
3123
|
+
}
|
|
3124
|
+
/**
|
|
3125
|
+
* Return a fully-qualified logMetric resource name string.
|
|
3126
|
+
*
|
|
3127
|
+
* @param {string} project
|
|
3128
|
+
* @param {string} metric
|
|
3129
|
+
* @returns {string} Resource name string.
|
|
3130
|
+
*/
|
|
3131
|
+
logMetricPath(project, metric) {
|
|
3132
|
+
return this.pathTemplates.logMetricPathTemplate.render({
|
|
3133
|
+
project: project,
|
|
3134
|
+
metric: metric,
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
/**
|
|
3138
|
+
* Parse the project from LogMetric resource.
|
|
3139
|
+
*
|
|
3140
|
+
* @param {string} logMetricName
|
|
3141
|
+
* A fully-qualified path representing LogMetric resource.
|
|
3142
|
+
* @returns {string} A string representing the project.
|
|
3143
|
+
*/
|
|
3144
|
+
matchProjectFromLogMetricName(logMetricName) {
|
|
3145
|
+
return this.pathTemplates.logMetricPathTemplate.match(logMetricName)
|
|
3146
|
+
.project;
|
|
3147
|
+
}
|
|
3148
|
+
/**
|
|
3149
|
+
* Parse the metric from LogMetric resource.
|
|
3150
|
+
*
|
|
3151
|
+
* @param {string} logMetricName
|
|
3152
|
+
* A fully-qualified path representing LogMetric resource.
|
|
3153
|
+
* @returns {string} A string representing the metric.
|
|
3154
|
+
*/
|
|
3155
|
+
matchMetricFromLogMetricName(logMetricName) {
|
|
3156
|
+
return this.pathTemplates.logMetricPathTemplate.match(logMetricName).metric;
|
|
3157
|
+
}
|
|
3158
|
+
/**
|
|
3159
|
+
* Return a fully-qualified organizationCmekSettings resource name string.
|
|
3160
|
+
*
|
|
3161
|
+
* @param {string} organization
|
|
3162
|
+
* @returns {string} Resource name string.
|
|
3163
|
+
*/
|
|
3164
|
+
organizationCmekSettingsPath(organization) {
|
|
3165
|
+
return this.pathTemplates.organizationCmekSettingsPathTemplate.render({
|
|
3166
|
+
organization: organization,
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
/**
|
|
3170
|
+
* Parse the organization from OrganizationCmekSettings resource.
|
|
3171
|
+
*
|
|
3172
|
+
* @param {string} organizationCmekSettingsName
|
|
3173
|
+
* A fully-qualified path representing organization_cmekSettings resource.
|
|
3174
|
+
* @returns {string} A string representing the organization.
|
|
3175
|
+
*/
|
|
3176
|
+
matchOrganizationFromOrganizationCmekSettingsName(organizationCmekSettingsName) {
|
|
3177
|
+
return this.pathTemplates.organizationCmekSettingsPathTemplate.match(organizationCmekSettingsName).organization;
|
|
3178
|
+
}
|
|
3179
|
+
/**
|
|
3180
|
+
* Return a fully-qualified organizationExclusion resource name string.
|
|
3181
|
+
*
|
|
3182
|
+
* @param {string} organization
|
|
3183
|
+
* @param {string} exclusion
|
|
3184
|
+
* @returns {string} Resource name string.
|
|
3185
|
+
*/
|
|
3186
|
+
organizationExclusionPath(organization, exclusion) {
|
|
3187
|
+
return this.pathTemplates.organizationExclusionPathTemplate.render({
|
|
3188
|
+
organization: organization,
|
|
3189
|
+
exclusion: exclusion,
|
|
3190
|
+
});
|
|
3191
|
+
}
|
|
3192
|
+
/**
|
|
3193
|
+
* Parse the organization from OrganizationExclusion resource.
|
|
3194
|
+
*
|
|
3195
|
+
* @param {string} organizationExclusionName
|
|
3196
|
+
* A fully-qualified path representing organization_exclusion resource.
|
|
3197
|
+
* @returns {string} A string representing the organization.
|
|
3198
|
+
*/
|
|
3199
|
+
matchOrganizationFromOrganizationExclusionName(organizationExclusionName) {
|
|
3200
|
+
return this.pathTemplates.organizationExclusionPathTemplate.match(organizationExclusionName).organization;
|
|
3201
|
+
}
|
|
3202
|
+
/**
|
|
3203
|
+
* Parse the exclusion from OrganizationExclusion resource.
|
|
3204
|
+
*
|
|
3205
|
+
* @param {string} organizationExclusionName
|
|
3206
|
+
* A fully-qualified path representing organization_exclusion resource.
|
|
3207
|
+
* @returns {string} A string representing the exclusion.
|
|
3208
|
+
*/
|
|
3209
|
+
matchExclusionFromOrganizationExclusionName(organizationExclusionName) {
|
|
3210
|
+
return this.pathTemplates.organizationExclusionPathTemplate.match(organizationExclusionName).exclusion;
|
|
3211
|
+
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Return a fully-qualified organizationLocationBucket resource name string.
|
|
3214
|
+
*
|
|
3215
|
+
* @param {string} organization
|
|
3216
|
+
* @param {string} location
|
|
3217
|
+
* @param {string} bucket
|
|
3218
|
+
* @returns {string} Resource name string.
|
|
3219
|
+
*/
|
|
3220
|
+
organizationLocationBucketPath(organization, location, bucket) {
|
|
3221
|
+
return this.pathTemplates.organizationLocationBucketPathTemplate.render({
|
|
3222
|
+
organization: organization,
|
|
3223
|
+
location: location,
|
|
3224
|
+
bucket: bucket,
|
|
3225
|
+
});
|
|
3226
|
+
}
|
|
3227
|
+
/**
|
|
3228
|
+
* Parse the organization from OrganizationLocationBucket resource.
|
|
3229
|
+
*
|
|
3230
|
+
* @param {string} organizationLocationBucketName
|
|
3231
|
+
* A fully-qualified path representing organization_location_bucket resource.
|
|
3232
|
+
* @returns {string} A string representing the organization.
|
|
3233
|
+
*/
|
|
3234
|
+
matchOrganizationFromOrganizationLocationBucketName(organizationLocationBucketName) {
|
|
3235
|
+
return this.pathTemplates.organizationLocationBucketPathTemplate.match(organizationLocationBucketName).organization;
|
|
3236
|
+
}
|
|
3237
|
+
/**
|
|
3238
|
+
* Parse the location from OrganizationLocationBucket resource.
|
|
3239
|
+
*
|
|
3240
|
+
* @param {string} organizationLocationBucketName
|
|
3241
|
+
* A fully-qualified path representing organization_location_bucket resource.
|
|
3242
|
+
* @returns {string} A string representing the location.
|
|
3243
|
+
*/
|
|
3244
|
+
matchLocationFromOrganizationLocationBucketName(organizationLocationBucketName) {
|
|
3245
|
+
return this.pathTemplates.organizationLocationBucketPathTemplate.match(organizationLocationBucketName).location;
|
|
3246
|
+
}
|
|
3247
|
+
/**
|
|
3248
|
+
* Parse the bucket from OrganizationLocationBucket resource.
|
|
3249
|
+
*
|
|
3250
|
+
* @param {string} organizationLocationBucketName
|
|
3251
|
+
* A fully-qualified path representing organization_location_bucket resource.
|
|
3252
|
+
* @returns {string} A string representing the bucket.
|
|
3253
|
+
*/
|
|
3254
|
+
matchBucketFromOrganizationLocationBucketName(organizationLocationBucketName) {
|
|
3255
|
+
return this.pathTemplates.organizationLocationBucketPathTemplate.match(organizationLocationBucketName).bucket;
|
|
3256
|
+
}
|
|
3257
|
+
/**
|
|
3258
|
+
* Return a fully-qualified organizationLocationBucketLink resource name string.
|
|
3259
|
+
*
|
|
3260
|
+
* @param {string} organization
|
|
3261
|
+
* @param {string} location
|
|
3262
|
+
* @param {string} bucket
|
|
3263
|
+
* @param {string} link
|
|
3264
|
+
* @returns {string} Resource name string.
|
|
3265
|
+
*/
|
|
3266
|
+
organizationLocationBucketLinkPath(organization, location, bucket, link) {
|
|
3267
|
+
return this.pathTemplates.organizationLocationBucketLinkPathTemplate.render({
|
|
3268
|
+
organization: organization,
|
|
3269
|
+
location: location,
|
|
3270
|
+
bucket: bucket,
|
|
3271
|
+
link: link,
|
|
3272
|
+
});
|
|
3273
|
+
}
|
|
3274
|
+
/**
|
|
3275
|
+
* Parse the organization from OrganizationLocationBucketLink resource.
|
|
3276
|
+
*
|
|
3277
|
+
* @param {string} organizationLocationBucketLinkName
|
|
3278
|
+
* A fully-qualified path representing organization_location_bucket_link resource.
|
|
3279
|
+
* @returns {string} A string representing the organization.
|
|
3280
|
+
*/
|
|
3281
|
+
matchOrganizationFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
|
|
3282
|
+
return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).organization;
|
|
3283
|
+
}
|
|
3284
|
+
/**
|
|
3285
|
+
* Parse the location from OrganizationLocationBucketLink resource.
|
|
3286
|
+
*
|
|
3287
|
+
* @param {string} organizationLocationBucketLinkName
|
|
3288
|
+
* A fully-qualified path representing organization_location_bucket_link resource.
|
|
3289
|
+
* @returns {string} A string representing the location.
|
|
3290
|
+
*/
|
|
3291
|
+
matchLocationFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
|
|
3292
|
+
return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).location;
|
|
3293
|
+
}
|
|
3294
|
+
/**
|
|
3295
|
+
* Parse the bucket from OrganizationLocationBucketLink resource.
|
|
3296
|
+
*
|
|
3297
|
+
* @param {string} organizationLocationBucketLinkName
|
|
3298
|
+
* A fully-qualified path representing organization_location_bucket_link resource.
|
|
3299
|
+
* @returns {string} A string representing the bucket.
|
|
3300
|
+
*/
|
|
3301
|
+
matchBucketFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
|
|
3302
|
+
return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).bucket;
|
|
3303
|
+
}
|
|
3304
|
+
/**
|
|
3305
|
+
* Parse the link from OrganizationLocationBucketLink resource.
|
|
3306
|
+
*
|
|
3307
|
+
* @param {string} organizationLocationBucketLinkName
|
|
3308
|
+
* A fully-qualified path representing organization_location_bucket_link resource.
|
|
3309
|
+
* @returns {string} A string representing the link.
|
|
3310
|
+
*/
|
|
3311
|
+
matchLinkFromOrganizationLocationBucketLinkName(organizationLocationBucketLinkName) {
|
|
3312
|
+
return this.pathTemplates.organizationLocationBucketLinkPathTemplate.match(organizationLocationBucketLinkName).link;
|
|
3313
|
+
}
|
|
3314
|
+
/**
|
|
3315
|
+
* Return a fully-qualified organizationLocationBucketView resource name string.
|
|
3316
|
+
*
|
|
3317
|
+
* @param {string} organization
|
|
3318
|
+
* @param {string} location
|
|
3319
|
+
* @param {string} bucket
|
|
3320
|
+
* @param {string} view
|
|
3321
|
+
* @returns {string} Resource name string.
|
|
3322
|
+
*/
|
|
3323
|
+
organizationLocationBucketViewPath(organization, location, bucket, view) {
|
|
3324
|
+
return this.pathTemplates.organizationLocationBucketViewPathTemplate.render({
|
|
3325
|
+
organization: organization,
|
|
3326
|
+
location: location,
|
|
3327
|
+
bucket: bucket,
|
|
3328
|
+
view: view,
|
|
3329
|
+
});
|
|
3330
|
+
}
|
|
3331
|
+
/**
|
|
3332
|
+
* Parse the organization from OrganizationLocationBucketView resource.
|
|
3333
|
+
*
|
|
3334
|
+
* @param {string} organizationLocationBucketViewName
|
|
3335
|
+
* A fully-qualified path representing organization_location_bucket_view resource.
|
|
3336
|
+
* @returns {string} A string representing the organization.
|
|
3337
|
+
*/
|
|
3338
|
+
matchOrganizationFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
|
|
3339
|
+
return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).organization;
|
|
3340
|
+
}
|
|
3341
|
+
/**
|
|
3342
|
+
* Parse the location from OrganizationLocationBucketView resource.
|
|
3343
|
+
*
|
|
3344
|
+
* @param {string} organizationLocationBucketViewName
|
|
3345
|
+
* A fully-qualified path representing organization_location_bucket_view resource.
|
|
3346
|
+
* @returns {string} A string representing the location.
|
|
3347
|
+
*/
|
|
3348
|
+
matchLocationFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
|
|
3349
|
+
return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).location;
|
|
3350
|
+
}
|
|
3351
|
+
/**
|
|
3352
|
+
* Parse the bucket from OrganizationLocationBucketView resource.
|
|
3353
|
+
*
|
|
3354
|
+
* @param {string} organizationLocationBucketViewName
|
|
3355
|
+
* A fully-qualified path representing organization_location_bucket_view resource.
|
|
3356
|
+
* @returns {string} A string representing the bucket.
|
|
3357
|
+
*/
|
|
3358
|
+
matchBucketFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
|
|
3359
|
+
return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).bucket;
|
|
3360
|
+
}
|
|
3361
|
+
/**
|
|
3362
|
+
* Parse the view from OrganizationLocationBucketView resource.
|
|
3363
|
+
*
|
|
3364
|
+
* @param {string} organizationLocationBucketViewName
|
|
3365
|
+
* A fully-qualified path representing organization_location_bucket_view resource.
|
|
3366
|
+
* @returns {string} A string representing the view.
|
|
3367
|
+
*/
|
|
3368
|
+
matchViewFromOrganizationLocationBucketViewName(organizationLocationBucketViewName) {
|
|
3369
|
+
return this.pathTemplates.organizationLocationBucketViewPathTemplate.match(organizationLocationBucketViewName).view;
|
|
3370
|
+
}
|
|
3371
|
+
/**
|
|
3372
|
+
* Return a fully-qualified organizationLog resource name string.
|
|
3373
|
+
*
|
|
3374
|
+
* @param {string} organization
|
|
3375
|
+
* @param {string} log
|
|
3376
|
+
* @returns {string} Resource name string.
|
|
3377
|
+
*/
|
|
3378
|
+
organizationLogPath(organization, log) {
|
|
3379
|
+
return this.pathTemplates.organizationLogPathTemplate.render({
|
|
3380
|
+
organization: organization,
|
|
3381
|
+
log: log,
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3384
|
+
/**
|
|
3385
|
+
* Parse the organization from OrganizationLog resource.
|
|
3386
|
+
*
|
|
3387
|
+
* @param {string} organizationLogName
|
|
3388
|
+
* A fully-qualified path representing organization_log resource.
|
|
3389
|
+
* @returns {string} A string representing the organization.
|
|
3390
|
+
*/
|
|
3391
|
+
matchOrganizationFromOrganizationLogName(organizationLogName) {
|
|
3392
|
+
return this.pathTemplates.organizationLogPathTemplate.match(organizationLogName).organization;
|
|
3393
|
+
}
|
|
3394
|
+
/**
|
|
3395
|
+
* Parse the log from OrganizationLog resource.
|
|
3396
|
+
*
|
|
3397
|
+
* @param {string} organizationLogName
|
|
3398
|
+
* A fully-qualified path representing organization_log resource.
|
|
3399
|
+
* @returns {string} A string representing the log.
|
|
3400
|
+
*/
|
|
3401
|
+
matchLogFromOrganizationLogName(organizationLogName) {
|
|
3402
|
+
return this.pathTemplates.organizationLogPathTemplate.match(organizationLogName).log;
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Return a fully-qualified organizationSettings resource name string.
|
|
3406
|
+
*
|
|
3407
|
+
* @param {string} organization
|
|
3408
|
+
* @returns {string} Resource name string.
|
|
3409
|
+
*/
|
|
3410
|
+
organizationSettingsPath(organization) {
|
|
3411
|
+
return this.pathTemplates.organizationSettingsPathTemplate.render({
|
|
3412
|
+
organization: organization,
|
|
3413
|
+
});
|
|
3414
|
+
}
|
|
3415
|
+
/**
|
|
3416
|
+
* Parse the organization from OrganizationSettings resource.
|
|
3417
|
+
*
|
|
3418
|
+
* @param {string} organizationSettingsName
|
|
3419
|
+
* A fully-qualified path representing organization_settings resource.
|
|
3420
|
+
* @returns {string} A string representing the organization.
|
|
3421
|
+
*/
|
|
3422
|
+
matchOrganizationFromOrganizationSettingsName(organizationSettingsName) {
|
|
3423
|
+
return this.pathTemplates.organizationSettingsPathTemplate.match(organizationSettingsName).organization;
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* Return a fully-qualified organizationSink resource name string.
|
|
3427
|
+
*
|
|
3428
|
+
* @param {string} organization
|
|
3429
|
+
* @param {string} sink
|
|
3430
|
+
* @returns {string} Resource name string.
|
|
3431
|
+
*/
|
|
3432
|
+
organizationSinkPath(organization, sink) {
|
|
3433
|
+
return this.pathTemplates.organizationSinkPathTemplate.render({
|
|
3434
|
+
organization: organization,
|
|
3435
|
+
sink: sink,
|
|
3436
|
+
});
|
|
3437
|
+
}
|
|
3438
|
+
/**
|
|
3439
|
+
* Parse the organization from OrganizationSink resource.
|
|
3440
|
+
*
|
|
3441
|
+
* @param {string} organizationSinkName
|
|
3442
|
+
* A fully-qualified path representing organization_sink resource.
|
|
3443
|
+
* @returns {string} A string representing the organization.
|
|
3444
|
+
*/
|
|
3445
|
+
matchOrganizationFromOrganizationSinkName(organizationSinkName) {
|
|
3446
|
+
return this.pathTemplates.organizationSinkPathTemplate.match(organizationSinkName).organization;
|
|
3447
|
+
}
|
|
3448
|
+
/**
|
|
3449
|
+
* Parse the sink from OrganizationSink resource.
|
|
3450
|
+
*
|
|
3451
|
+
* @param {string} organizationSinkName
|
|
3452
|
+
* A fully-qualified path representing organization_sink resource.
|
|
3453
|
+
* @returns {string} A string representing the sink.
|
|
3454
|
+
*/
|
|
3455
|
+
matchSinkFromOrganizationSinkName(organizationSinkName) {
|
|
3456
|
+
return this.pathTemplates.organizationSinkPathTemplate.match(organizationSinkName).sink;
|
|
3457
|
+
}
|
|
3458
|
+
/**
|
|
3459
|
+
* Return a fully-qualified project resource name string.
|
|
3460
|
+
*
|
|
3461
|
+
* @param {string} project
|
|
3462
|
+
* @returns {string} Resource name string.
|
|
3463
|
+
*/
|
|
3464
|
+
projectPath(project) {
|
|
3465
|
+
return this.pathTemplates.projectPathTemplate.render({
|
|
3466
|
+
project: project,
|
|
3467
|
+
});
|
|
3468
|
+
}
|
|
3469
|
+
/**
|
|
3470
|
+
* Parse the project from Project resource.
|
|
3471
|
+
*
|
|
3472
|
+
* @param {string} projectName
|
|
3473
|
+
* A fully-qualified path representing Project resource.
|
|
3474
|
+
* @returns {string} A string representing the project.
|
|
3475
|
+
*/
|
|
3476
|
+
matchProjectFromProjectName(projectName) {
|
|
3477
|
+
return this.pathTemplates.projectPathTemplate.match(projectName).project;
|
|
3478
|
+
}
|
|
3479
|
+
/**
|
|
3480
|
+
* Return a fully-qualified projectCmekSettings resource name string.
|
|
3481
|
+
*
|
|
3482
|
+
* @param {string} project
|
|
3483
|
+
* @returns {string} Resource name string.
|
|
3484
|
+
*/
|
|
3485
|
+
projectCmekSettingsPath(project) {
|
|
3486
|
+
return this.pathTemplates.projectCmekSettingsPathTemplate.render({
|
|
3487
|
+
project: project,
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
/**
|
|
3491
|
+
* Parse the project from ProjectCmekSettings resource.
|
|
3492
|
+
*
|
|
3493
|
+
* @param {string} projectCmekSettingsName
|
|
3494
|
+
* A fully-qualified path representing project_cmekSettings resource.
|
|
3495
|
+
* @returns {string} A string representing the project.
|
|
3496
|
+
*/
|
|
3497
|
+
matchProjectFromProjectCmekSettingsName(projectCmekSettingsName) {
|
|
3498
|
+
return this.pathTemplates.projectCmekSettingsPathTemplate.match(projectCmekSettingsName).project;
|
|
3499
|
+
}
|
|
3500
|
+
/**
|
|
3501
|
+
* Return a fully-qualified projectExclusion resource name string.
|
|
3502
|
+
*
|
|
3503
|
+
* @param {string} project
|
|
3504
|
+
* @param {string} exclusion
|
|
3505
|
+
* @returns {string} Resource name string.
|
|
3506
|
+
*/
|
|
3507
|
+
projectExclusionPath(project, exclusion) {
|
|
3508
|
+
return this.pathTemplates.projectExclusionPathTemplate.render({
|
|
3509
|
+
project: project,
|
|
3510
|
+
exclusion: exclusion,
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
/**
|
|
3514
|
+
* Parse the project from ProjectExclusion resource.
|
|
3515
|
+
*
|
|
3516
|
+
* @param {string} projectExclusionName
|
|
3517
|
+
* A fully-qualified path representing project_exclusion resource.
|
|
3518
|
+
* @returns {string} A string representing the project.
|
|
3519
|
+
*/
|
|
3520
|
+
matchProjectFromProjectExclusionName(projectExclusionName) {
|
|
3521
|
+
return this.pathTemplates.projectExclusionPathTemplate.match(projectExclusionName).project;
|
|
3522
|
+
}
|
|
3523
|
+
/**
|
|
3524
|
+
* Parse the exclusion from ProjectExclusion resource.
|
|
3525
|
+
*
|
|
3526
|
+
* @param {string} projectExclusionName
|
|
3527
|
+
* A fully-qualified path representing project_exclusion resource.
|
|
3528
|
+
* @returns {string} A string representing the exclusion.
|
|
3529
|
+
*/
|
|
3530
|
+
matchExclusionFromProjectExclusionName(projectExclusionName) {
|
|
3531
|
+
return this.pathTemplates.projectExclusionPathTemplate.match(projectExclusionName).exclusion;
|
|
3532
|
+
}
|
|
3533
|
+
/**
|
|
3534
|
+
* Return a fully-qualified projectLocationBucket resource name string.
|
|
3535
|
+
*
|
|
3536
|
+
* @param {string} project
|
|
3537
|
+
* @param {string} location
|
|
3538
|
+
* @param {string} bucket
|
|
3539
|
+
* @returns {string} Resource name string.
|
|
3540
|
+
*/
|
|
3541
|
+
projectLocationBucketPath(project, location, bucket) {
|
|
3542
|
+
return this.pathTemplates.projectLocationBucketPathTemplate.render({
|
|
3543
|
+
project: project,
|
|
3544
|
+
location: location,
|
|
3545
|
+
bucket: bucket,
|
|
3546
|
+
});
|
|
3547
|
+
}
|
|
3548
|
+
/**
|
|
3549
|
+
* Parse the project from ProjectLocationBucket resource.
|
|
3550
|
+
*
|
|
3551
|
+
* @param {string} projectLocationBucketName
|
|
3552
|
+
* A fully-qualified path representing project_location_bucket resource.
|
|
3553
|
+
* @returns {string} A string representing the project.
|
|
3554
|
+
*/
|
|
3555
|
+
matchProjectFromProjectLocationBucketName(projectLocationBucketName) {
|
|
3556
|
+
return this.pathTemplates.projectLocationBucketPathTemplate.match(projectLocationBucketName).project;
|
|
3557
|
+
}
|
|
3558
|
+
/**
|
|
3559
|
+
* Parse the location from ProjectLocationBucket resource.
|
|
3560
|
+
*
|
|
3561
|
+
* @param {string} projectLocationBucketName
|
|
3562
|
+
* A fully-qualified path representing project_location_bucket resource.
|
|
3563
|
+
* @returns {string} A string representing the location.
|
|
3564
|
+
*/
|
|
3565
|
+
matchLocationFromProjectLocationBucketName(projectLocationBucketName) {
|
|
3566
|
+
return this.pathTemplates.projectLocationBucketPathTemplate.match(projectLocationBucketName).location;
|
|
3567
|
+
}
|
|
3568
|
+
/**
|
|
3569
|
+
* Parse the bucket from ProjectLocationBucket resource.
|
|
3570
|
+
*
|
|
3571
|
+
* @param {string} projectLocationBucketName
|
|
3572
|
+
* A fully-qualified path representing project_location_bucket resource.
|
|
3573
|
+
* @returns {string} A string representing the bucket.
|
|
3574
|
+
*/
|
|
3575
|
+
matchBucketFromProjectLocationBucketName(projectLocationBucketName) {
|
|
3576
|
+
return this.pathTemplates.projectLocationBucketPathTemplate.match(projectLocationBucketName).bucket;
|
|
3577
|
+
}
|
|
3578
|
+
/**
|
|
3579
|
+
* Return a fully-qualified projectLocationBucketLink resource name string.
|
|
3580
|
+
*
|
|
3581
|
+
* @param {string} project
|
|
3582
|
+
* @param {string} location
|
|
3583
|
+
* @param {string} bucket
|
|
3584
|
+
* @param {string} link
|
|
3585
|
+
* @returns {string} Resource name string.
|
|
3586
|
+
*/
|
|
3587
|
+
projectLocationBucketLinkPath(project, location, bucket, link) {
|
|
3588
|
+
return this.pathTemplates.projectLocationBucketLinkPathTemplate.render({
|
|
3589
|
+
project: project,
|
|
3590
|
+
location: location,
|
|
3591
|
+
bucket: bucket,
|
|
3592
|
+
link: link,
|
|
3593
|
+
});
|
|
3594
|
+
}
|
|
3595
|
+
/**
|
|
3596
|
+
* Parse the project from ProjectLocationBucketLink resource.
|
|
3597
|
+
*
|
|
3598
|
+
* @param {string} projectLocationBucketLinkName
|
|
3599
|
+
* A fully-qualified path representing project_location_bucket_link resource.
|
|
3600
|
+
* @returns {string} A string representing the project.
|
|
3601
|
+
*/
|
|
3602
|
+
matchProjectFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
|
|
3603
|
+
return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).project;
|
|
3604
|
+
}
|
|
3605
|
+
/**
|
|
3606
|
+
* Parse the location from ProjectLocationBucketLink resource.
|
|
3607
|
+
*
|
|
3608
|
+
* @param {string} projectLocationBucketLinkName
|
|
3609
|
+
* A fully-qualified path representing project_location_bucket_link resource.
|
|
3610
|
+
* @returns {string} A string representing the location.
|
|
3611
|
+
*/
|
|
3612
|
+
matchLocationFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
|
|
3613
|
+
return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).location;
|
|
3614
|
+
}
|
|
3615
|
+
/**
|
|
3616
|
+
* Parse the bucket from ProjectLocationBucketLink resource.
|
|
3617
|
+
*
|
|
3618
|
+
* @param {string} projectLocationBucketLinkName
|
|
3619
|
+
* A fully-qualified path representing project_location_bucket_link resource.
|
|
3620
|
+
* @returns {string} A string representing the bucket.
|
|
3621
|
+
*/
|
|
3622
|
+
matchBucketFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
|
|
3623
|
+
return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).bucket;
|
|
3624
|
+
}
|
|
3625
|
+
/**
|
|
3626
|
+
* Parse the link from ProjectLocationBucketLink resource.
|
|
3627
|
+
*
|
|
3628
|
+
* @param {string} projectLocationBucketLinkName
|
|
3629
|
+
* A fully-qualified path representing project_location_bucket_link resource.
|
|
3630
|
+
* @returns {string} A string representing the link.
|
|
3631
|
+
*/
|
|
3632
|
+
matchLinkFromProjectLocationBucketLinkName(projectLocationBucketLinkName) {
|
|
3633
|
+
return this.pathTemplates.projectLocationBucketLinkPathTemplate.match(projectLocationBucketLinkName).link;
|
|
3634
|
+
}
|
|
3635
|
+
/**
|
|
3636
|
+
* Return a fully-qualified projectLocationBucketView resource name string.
|
|
3637
|
+
*
|
|
3638
|
+
* @param {string} project
|
|
3639
|
+
* @param {string} location
|
|
3640
|
+
* @param {string} bucket
|
|
3641
|
+
* @param {string} view
|
|
3642
|
+
* @returns {string} Resource name string.
|
|
3643
|
+
*/
|
|
3644
|
+
projectLocationBucketViewPath(project, location, bucket, view) {
|
|
3645
|
+
return this.pathTemplates.projectLocationBucketViewPathTemplate.render({
|
|
3646
|
+
project: project,
|
|
3647
|
+
location: location,
|
|
3648
|
+
bucket: bucket,
|
|
3649
|
+
view: view,
|
|
3650
|
+
});
|
|
3651
|
+
}
|
|
3652
|
+
/**
|
|
3653
|
+
* Parse the project from ProjectLocationBucketView resource.
|
|
3654
|
+
*
|
|
3655
|
+
* @param {string} projectLocationBucketViewName
|
|
3656
|
+
* A fully-qualified path representing project_location_bucket_view resource.
|
|
3657
|
+
* @returns {string} A string representing the project.
|
|
3658
|
+
*/
|
|
3659
|
+
matchProjectFromProjectLocationBucketViewName(projectLocationBucketViewName) {
|
|
3660
|
+
return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).project;
|
|
3661
|
+
}
|
|
3662
|
+
/**
|
|
3663
|
+
* Parse the location from ProjectLocationBucketView resource.
|
|
3664
|
+
*
|
|
3665
|
+
* @param {string} projectLocationBucketViewName
|
|
3666
|
+
* A fully-qualified path representing project_location_bucket_view resource.
|
|
3667
|
+
* @returns {string} A string representing the location.
|
|
3668
|
+
*/
|
|
3669
|
+
matchLocationFromProjectLocationBucketViewName(projectLocationBucketViewName) {
|
|
3670
|
+
return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).location;
|
|
3671
|
+
}
|
|
3672
|
+
/**
|
|
3673
|
+
* Parse the bucket from ProjectLocationBucketView resource.
|
|
3674
|
+
*
|
|
3675
|
+
* @param {string} projectLocationBucketViewName
|
|
3676
|
+
* A fully-qualified path representing project_location_bucket_view resource.
|
|
3677
|
+
* @returns {string} A string representing the bucket.
|
|
3678
|
+
*/
|
|
3679
|
+
matchBucketFromProjectLocationBucketViewName(projectLocationBucketViewName) {
|
|
3680
|
+
return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).bucket;
|
|
3681
|
+
}
|
|
3682
|
+
/**
|
|
3683
|
+
* Parse the view from ProjectLocationBucketView resource.
|
|
3684
|
+
*
|
|
3685
|
+
* @param {string} projectLocationBucketViewName
|
|
3686
|
+
* A fully-qualified path representing project_location_bucket_view resource.
|
|
3687
|
+
* @returns {string} A string representing the view.
|
|
3688
|
+
*/
|
|
3689
|
+
matchViewFromProjectLocationBucketViewName(projectLocationBucketViewName) {
|
|
3690
|
+
return this.pathTemplates.projectLocationBucketViewPathTemplate.match(projectLocationBucketViewName).view;
|
|
3691
|
+
}
|
|
3692
|
+
/**
|
|
3693
|
+
* Return a fully-qualified projectLog resource name string.
|
|
3694
|
+
*
|
|
3695
|
+
* @param {string} project
|
|
3696
|
+
* @param {string} log
|
|
3697
|
+
* @returns {string} Resource name string.
|
|
3698
|
+
*/
|
|
3699
|
+
projectLogPath(project, log) {
|
|
3700
|
+
return this.pathTemplates.projectLogPathTemplate.render({
|
|
3701
|
+
project: project,
|
|
3702
|
+
log: log,
|
|
3703
|
+
});
|
|
3704
|
+
}
|
|
3705
|
+
/**
|
|
3706
|
+
* Parse the project from ProjectLog resource.
|
|
3707
|
+
*
|
|
3708
|
+
* @param {string} projectLogName
|
|
3709
|
+
* A fully-qualified path representing project_log resource.
|
|
3710
|
+
* @returns {string} A string representing the project.
|
|
3711
|
+
*/
|
|
3712
|
+
matchProjectFromProjectLogName(projectLogName) {
|
|
3713
|
+
return this.pathTemplates.projectLogPathTemplate.match(projectLogName)
|
|
3714
|
+
.project;
|
|
3715
|
+
}
|
|
3716
|
+
/**
|
|
3717
|
+
* Parse the log from ProjectLog resource.
|
|
3718
|
+
*
|
|
3719
|
+
* @param {string} projectLogName
|
|
3720
|
+
* A fully-qualified path representing project_log resource.
|
|
3721
|
+
* @returns {string} A string representing the log.
|
|
3722
|
+
*/
|
|
3723
|
+
matchLogFromProjectLogName(projectLogName) {
|
|
3724
|
+
return this.pathTemplates.projectLogPathTemplate.match(projectLogName).log;
|
|
3725
|
+
}
|
|
3726
|
+
/**
|
|
3727
|
+
* Return a fully-qualified projectSettings resource name string.
|
|
3728
|
+
*
|
|
3729
|
+
* @param {string} project
|
|
3730
|
+
* @returns {string} Resource name string.
|
|
3731
|
+
*/
|
|
3732
|
+
projectSettingsPath(project) {
|
|
3733
|
+
return this.pathTemplates.projectSettingsPathTemplate.render({
|
|
3734
|
+
project: project,
|
|
3735
|
+
});
|
|
3736
|
+
}
|
|
3737
|
+
/**
|
|
3738
|
+
* Parse the project from ProjectSettings resource.
|
|
3739
|
+
*
|
|
3740
|
+
* @param {string} projectSettingsName
|
|
3741
|
+
* A fully-qualified path representing project_settings resource.
|
|
3742
|
+
* @returns {string} A string representing the project.
|
|
3743
|
+
*/
|
|
3744
|
+
matchProjectFromProjectSettingsName(projectSettingsName) {
|
|
3745
|
+
return this.pathTemplates.projectSettingsPathTemplate.match(projectSettingsName).project;
|
|
3746
|
+
}
|
|
3747
|
+
/**
|
|
3748
|
+
* Return a fully-qualified projectSink resource name string.
|
|
3749
|
+
*
|
|
3750
|
+
* @param {string} project
|
|
3751
|
+
* @param {string} sink
|
|
3752
|
+
* @returns {string} Resource name string.
|
|
3753
|
+
*/
|
|
3754
|
+
projectSinkPath(project, sink) {
|
|
3755
|
+
return this.pathTemplates.projectSinkPathTemplate.render({
|
|
3756
|
+
project: project,
|
|
3757
|
+
sink: sink,
|
|
3758
|
+
});
|
|
3759
|
+
}
|
|
3760
|
+
/**
|
|
3761
|
+
* Parse the project from ProjectSink resource.
|
|
3762
|
+
*
|
|
3763
|
+
* @param {string} projectSinkName
|
|
3764
|
+
* A fully-qualified path representing project_sink resource.
|
|
3765
|
+
* @returns {string} A string representing the project.
|
|
3766
|
+
*/
|
|
3767
|
+
matchProjectFromProjectSinkName(projectSinkName) {
|
|
3768
|
+
return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName)
|
|
3769
|
+
.project;
|
|
3770
|
+
}
|
|
3771
|
+
/**
|
|
3772
|
+
* Parse the sink from ProjectSink resource.
|
|
3773
|
+
*
|
|
3774
|
+
* @param {string} projectSinkName
|
|
3775
|
+
* A fully-qualified path representing project_sink resource.
|
|
3776
|
+
* @returns {string} A string representing the sink.
|
|
3777
|
+
*/
|
|
3778
|
+
matchSinkFromProjectSinkName(projectSinkName) {
|
|
3779
|
+
return this.pathTemplates.projectSinkPathTemplate.match(projectSinkName)
|
|
3780
|
+
.sink;
|
|
3781
|
+
}
|
|
3782
|
+
/**
|
|
3783
|
+
* Terminate the gRPC channel and close the client.
|
|
3784
|
+
*
|
|
3785
|
+
* The client will no longer be usable and all future behavior is undefined.
|
|
3786
|
+
* @returns {Promise} A promise that resolves when the client is closed.
|
|
3787
|
+
*/
|
|
3788
|
+
close() {
|
|
3789
|
+
if (this.configServiceV2Stub && !this._terminated) {
|
|
3790
|
+
return this.configServiceV2Stub.then((stub) => {
|
|
3791
|
+
this._log.info('ending gRPC channel');
|
|
3792
|
+
this._terminated = true;
|
|
3793
|
+
stub.close();
|
|
3794
|
+
void this.operationsClient.close();
|
|
3795
|
+
});
|
|
3796
|
+
}
|
|
3797
|
+
return Promise.resolve();
|
|
3798
|
+
}
|
|
3799
|
+
}
|
|
3800
|
+
exports.ConfigServiceV2Client = ConfigServiceV2Client;
|
|
3801
|
+
//# sourceMappingURL=config_service_v2_client.js.map
|