Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: generated/googleapis/lib/logging/v2.dart

Issue 2571553005: Api-roll 43: 2016-12-13 (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/language/v1.dart ('k') | generated/googleapis/lib/monitoring/v3.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.logging.v2; 3 library googleapis.logging.v2;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 18 matching lines...) Expand all
29 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read" ; 29 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read" ;
30 30
31 /** Submit log data for your projects */ 31 /** Submit log data for your projects */
32 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ e"; 32 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ e";
33 33
34 34
35 final commons.ApiRequester _requester; 35 final commons.ApiRequester _requester;
36 36
37 BillingAccountsResourceApi get billingAccounts => new BillingAccountsResourceA pi(_requester); 37 BillingAccountsResourceApi get billingAccounts => new BillingAccountsResourceA pi(_requester);
38 EntriesResourceApi get entries => new EntriesResourceApi(_requester); 38 EntriesResourceApi get entries => new EntriesResourceApi(_requester);
39 FoldersResourceApi get folders => new FoldersResourceApi(_requester);
39 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => ne w MonitoredResourceDescriptorsResourceApi(_requester); 40 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => ne w MonitoredResourceDescriptorsResourceApi(_requester);
40 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re quester); 41 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re quester);
41 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 42 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
42 43
43 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap is.com/", core.String servicePath: ""}) : 44 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap is.com/", core.String servicePath: ""}) :
44 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 45 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
45 } 46 }
46 47
47 48
48 class BillingAccountsResourceApi { 49 class BillingAccountsResourceApi {
49 final commons.ApiRequester _requester; 50 final commons.ApiRequester _requester;
50 51
51 BillingAccountsLogsResourceApi get logs => new BillingAccountsLogsResourceApi( _requester); 52 BillingAccountsLogsResourceApi get logs => new BillingAccountsLogsResourceApi( _requester);
52 BillingAccountsSinksResourceApi get sinks => new BillingAccountsSinksResourceA pi(_requester); 53 BillingAccountsSinksResourceApi get sinks => new BillingAccountsSinksResourceA pi(_requester);
53 54
54 BillingAccountsResourceApi(commons.ApiRequester client) : 55 BillingAccountsResourceApi(commons.ApiRequester client) :
55 _requester = client; 56 _requester = client;
56 } 57 }
57 58
58 59
59 class BillingAccountsLogsResourceApi { 60 class BillingAccountsLogsResourceApi {
60 final commons.ApiRequester _requester; 61 final commons.ApiRequester _requester;
61 62
62 BillingAccountsLogsResourceApi(commons.ApiRequester client) : 63 BillingAccountsLogsResourceApi(commons.ApiRequester client) :
63 _requester = client; 64 _requester = client;
64 65
65 /** 66 /**
66 * Deletes a log and all its log entries. 67 * Deletes all the log entries in a log. The log reappears if it receives new
67 * The log will reappear if it receives new entries. 68 * entries.
68 * 69 *
69 * Request parameters: 70 * Request parameters:
70 * 71 *
71 * [logName] - Required. The resource name of the log to delete. Example: 72 * [logName] - Required. The resource name of the log to delete:
72 * `"projects/my-project/logs/syslog"`. 73 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
74 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
75 * [LOG_ID] must be URL-encoded. For example,
76 * "projects/my-project-id/logs/syslog",
77 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
78 * For more information about log names, see LogEntry.
73 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". 79 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$".
74 * 80 *
75 * Completes with a [Empty]. 81 * Completes with a [Empty].
76 * 82 *
77 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 83 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
78 * error. 84 * error.
79 * 85 *
80 * If the used [http.Client] completes with an error when making a REST call, 86 * If the used [http.Client] completes with an error when making a REST call,
81 * this method will complete with the same error. 87 * this method will complete with the same error.
82 */ 88 */
(...skipping 14 matching lines...) Expand all
97 var _response = _requester.request(_url, 103 var _response = _requester.request(_url,
98 "DELETE", 104 "DELETE",
99 body: _body, 105 body: _body,
100 queryParams: _queryParams, 106 queryParams: _queryParams,
101 uploadOptions: _uploadOptions, 107 uploadOptions: _uploadOptions,
102 uploadMedia: _uploadMedia, 108 uploadMedia: _uploadMedia,
103 downloadOptions: _downloadOptions); 109 downloadOptions: _downloadOptions);
104 return _response.then((data) => new Empty.fromJson(data)); 110 return _response.then((data) => new Empty.fromJson(data));
105 } 111 }
106 112
113 /**
114 * Lists the logs in projects or organizations. Only logs that have entries
115 * are listed.
116 *
117 * Request parameters:
118 *
119 * [parent] - Required. The resource name that owns the logs:
120 * "projects/[PROJECT_ID]"
121 * "organizations/[ORGANIZATION_ID]"
122 *
123 * Value must have pattern "^billingAccounts/[^/]+$".
124 *
125 * [pageSize] - Optional. The maximum number of results to return from this
126 * request. Non-positive values are ignored. The presence of nextPageToken in
127 * the response indicates that more results might be available.
128 *
129 * [pageToken] - Optional. If present, then retrieve the next batch of results
130 * from the preceding call to this method. pageToken must be the value of
131 * nextPageToken from the previous response. The values of other method
132 * parameters should be identical to those in the previous call.
133 *
134 * Completes with a [ListLogsResponse].
135 *
136 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
137 * error.
138 *
139 * If the used [http.Client] completes with an error when making a REST call,
140 * this method will complete with the same error.
141 */
142 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
143 var _url = null;
144 var _queryParams = new core.Map();
145 var _uploadMedia = null;
146 var _uploadOptions = null;
147 var _downloadOptions = commons.DownloadOptions.Metadata;
148 var _body = null;
149
150 if (parent == null) {
151 throw new core.ArgumentError("Parameter parent is required.");
152 }
153 if (pageSize != null) {
154 _queryParams["pageSize"] = ["${pageSize}"];
155 }
156 if (pageToken != null) {
157 _queryParams["pageToken"] = [pageToken];
158 }
159
160 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
161
162 var _response = _requester.request(_url,
163 "GET",
164 body: _body,
165 queryParams: _queryParams,
166 uploadOptions: _uploadOptions,
167 uploadMedia: _uploadMedia,
168 downloadOptions: _downloadOptions);
169 return _response.then((data) => new ListLogsResponse.fromJson(data));
170 }
171
107 } 172 }
108 173
109 174
110 class BillingAccountsSinksResourceApi { 175 class BillingAccountsSinksResourceApi {
111 final commons.ApiRequester _requester; 176 final commons.ApiRequester _requester;
112 177
113 BillingAccountsSinksResourceApi(commons.ApiRequester client) : 178 BillingAccountsSinksResourceApi(commons.ApiRequester client) :
114 _requester = client; 179 _requester = client;
115 180
116 /** 181 /**
117 * Creates a sink. 182 * Creates a sink that exports specified log entries to a destination. The
183 * export of newly-ingested log entries begins immediately, unless the current
184 * time is outside the sink's start and end times or the sink's
185 * writer_identity is not permitted to write to the destination. A sink can
186 * export log entries only from the resource owning the sink.
118 * 187 *
119 * [request] - The metadata request object. 188 * [request] - The metadata request object.
120 * 189 *
121 * Request parameters: 190 * Request parameters:
122 * 191 *
123 * [parent] - Required. The resource in which to create the sink. 192 * [parent] - Required. The resource in which to create the sink:
124 * Example: `"projects/my-project-id"`. 193 * "projects/[PROJECT_ID]"
125 * The new sink must be provided in the request. 194 * "organizations/[ORGANIZATION_ID]"
195 * Examples: "projects/my-logging-project", "organizations/123456789".
126 * Value must have pattern "^billingAccounts/[^/]+$". 196 * Value must have pattern "^billingAccounts/[^/]+$".
127 * 197 *
128 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 198 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity
129 * service account returned 199 * returned as writer_identity in the new sink. If this value is omitted or
130 * in the sink's writer_identity. Set this field to be true to export 200 * set to false, and if the sink's parent is a project, then the value
131 * logs from one project to a different project. This field is ignored for 201 * returned as writer_identity is cloud-logs@google.com, the same identity
132 * non-project sinks (e.g. organization sinks) because those sinks are 202 * used before the addition of writer identities to this API. The sink's
133 * required to have dedicated service accounts. 203 * destination must be in the same project as the sink itself.If this field is
204 * set to true, or if the sink is owned by a non-project resource such as an
205 * organization, then the value of writer_identity will be a unique service
206 * account used only for exports from the new sink. For more information, see
207 * writer_identity in LogSink.
134 * 208 *
135 * Completes with a [LogSink]. 209 * Completes with a [LogSink].
136 * 210 *
137 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 211 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
138 * error. 212 * error.
139 * 213 *
140 * If the used [http.Client] completes with an error when making a REST call, 214 * If the used [http.Client] completes with an error when making a REST call,
141 * this method will complete with the same error. 215 * this method will complete with the same error.
142 */ 216 */
143 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) { 217 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) {
(...skipping 20 matching lines...) Expand all
164 "POST", 238 "POST",
165 body: _body, 239 body: _body,
166 queryParams: _queryParams, 240 queryParams: _queryParams,
167 uploadOptions: _uploadOptions, 241 uploadOptions: _uploadOptions,
168 uploadMedia: _uploadMedia, 242 uploadMedia: _uploadMedia,
169 downloadOptions: _downloadOptions); 243 downloadOptions: _downloadOptions);
170 return _response.then((data) => new LogSink.fromJson(data)); 244 return _response.then((data) => new LogSink.fromJson(data));
171 } 245 }
172 246
173 /** 247 /**
174 * Deletes a sink. 248 * Deletes a sink. If the sink has a unique writer_identity, then that service
249 * account is also deleted.
175 * 250 *
176 * Request parameters: 251 * Request parameters:
177 * 252 *
178 * [sinkName] - Required. The resource name of the sink to delete, including 253 * [sinkName] - Required. The full resource name of the sink to delete,
179 * the parent 254 * including the parent resource and the sink identifier:
180 * resource and the sink identifier. Example: 255 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
181 * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink 256 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
182 * does not exist. 257 * It is an error if the sink does not exist. Example:
258 * "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does
259 * not exist.
183 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". 260 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$".
184 * 261 *
185 * Completes with a [Empty]. 262 * Completes with a [Empty].
186 * 263 *
187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 264 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
188 * error. 265 * error.
189 * 266 *
190 * If the used [http.Client] completes with an error when making a REST call, 267 * If the used [http.Client] completes with an error when making a REST call,
191 * this method will complete with the same error. 268 * this method will complete with the same error.
192 */ 269 */
(...skipping 19 matching lines...) Expand all
212 uploadMedia: _uploadMedia, 289 uploadMedia: _uploadMedia,
213 downloadOptions: _downloadOptions); 290 downloadOptions: _downloadOptions);
214 return _response.then((data) => new Empty.fromJson(data)); 291 return _response.then((data) => new Empty.fromJson(data));
215 } 292 }
216 293
217 /** 294 /**
218 * Gets a sink. 295 * Gets a sink.
219 * 296 *
220 * Request parameters: 297 * Request parameters:
221 * 298 *
222 * [sinkName] - Required. The resource name of the sink to return. 299 * [sinkName] - Required. The parent resource name of the sink:
223 * Example: `"projects/my-project-id/sinks/my-sink-id"`. 300 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
301 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
302 * Example: "projects/my-project-id/sinks/my-sink-id".
224 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". 303 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$".
225 * 304 *
226 * Completes with a [LogSink]. 305 * Completes with a [LogSink].
227 * 306 *
228 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 307 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
229 * error. 308 * error.
230 * 309 *
231 * If the used [http.Client] completes with an error when making a REST call, 310 * If the used [http.Client] completes with an error when making a REST call,
232 * this method will complete with the same error. 311 * this method will complete with the same error.
233 */ 312 */
(...skipping 19 matching lines...) Expand all
253 uploadMedia: _uploadMedia, 332 uploadMedia: _uploadMedia,
254 downloadOptions: _downloadOptions); 333 downloadOptions: _downloadOptions);
255 return _response.then((data) => new LogSink.fromJson(data)); 334 return _response.then((data) => new LogSink.fromJson(data));
256 } 335 }
257 336
258 /** 337 /**
259 * Lists sinks. 338 * Lists sinks.
260 * 339 *
261 * Request parameters: 340 * Request parameters:
262 * 341 *
263 * [parent] - Required. The resource name where this sink was created. 342 * [parent] - Required. The parent resource whose sinks are to be listed.
264 * Example: `"projects/my-logging-project"`. 343 * Examples: "projects/my-logging-project", "organizations/123456789".
265 * Value must have pattern "^billingAccounts/[^/]+$". 344 * Value must have pattern "^billingAccounts/[^/]+$".
266 * 345 *
267 * [pageSize] - Optional. The maximum number of results to return from this 346 * [pageSize] - Optional. The maximum number of results to return from this
268 * request. 347 * request. Non-positive values are ignored. The presence of nextPageToken in
269 * Non-positive values are ignored. The presence of `nextPageToken` in the 348 * the response indicates that more results might be available.
270 * response indicates that more results might be available.
271 * 349 *
272 * [pageToken] - Optional. If present, then retrieve the next batch of results 350 * [pageToken] - Optional. If present, then retrieve the next batch of results
273 * from the 351 * from the preceding call to this method. pageToken must be the value of
274 * preceding call to this method. `pageToken` must be the value of 352 * nextPageToken from the previous response. The values of other method
275 * `nextPageToken` from the previous response. The values of other method
276 * parameters should be identical to those in the previous call. 353 * parameters should be identical to those in the previous call.
277 * 354 *
278 * Completes with a [ListSinksResponse]. 355 * Completes with a [ListSinksResponse].
279 * 356 *
280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 357 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
281 * error. 358 * error.
282 * 359 *
283 * If the used [http.Client] completes with an error when making a REST call, 360 * If the used [http.Client] completes with an error when making a REST call,
284 * this method will complete with the same error. 361 * this method will complete with the same error.
285 */ 362 */
(...skipping 21 matching lines...) Expand all
307 "GET", 384 "GET",
308 body: _body, 385 body: _body,
309 queryParams: _queryParams, 386 queryParams: _queryParams,
310 uploadOptions: _uploadOptions, 387 uploadOptions: _uploadOptions,
311 uploadMedia: _uploadMedia, 388 uploadMedia: _uploadMedia,
312 downloadOptions: _downloadOptions); 389 downloadOptions: _downloadOptions);
313 return _response.then((data) => new ListSinksResponse.fromJson(data)); 390 return _response.then((data) => new ListSinksResponse.fromJson(data));
314 } 391 }
315 392
316 /** 393 /**
317 * Updates or creates a sink. 394 * Updates a sink. If the named sink doesn't exist, then this method is
395 * identical to sinks.create. If the named sink does exist, then this method
396 * replaces the following fields in the existing sink with values from the new
397 * sink: destination, filter, output_version_format, start_time, and end_time.
398 * The updated filter might also have a new writer_identity; see the
399 * unique_writer_identity field.
318 * 400 *
319 * [request] - The metadata request object. 401 * [request] - The metadata request object.
320 * 402 *
321 * Request parameters: 403 * Request parameters:
322 * 404 *
323 * [sinkName] - Required. The resource name of the sink to update, including 405 * [sinkName] - Required. The full resource name of the sink to update,
324 * the parent 406 * including the parent resource and the sink identifier:
325 * resource and the sink identifier. If the sink does not exist, this method 407 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
326 * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. 408 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
409 * Example: "projects/my-project-id/sinks/my-sink-id".
327 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$". 410 * Value must have pattern "^billingAccounts/[^/]+/sinks/[^/]+$".
328 * 411 *
329 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 412 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of
330 * service account returned 413 * this field. When updating a sink, the effect of this field on the value of
331 * in the sink's writer_identity. Set this field to be true to export 414 * writer_identity in the updated sink depends on both the old and new values
332 * logs from one project to a different project. This field is ignored for 415 * of this field:
333 * non-project sinks (e.g. organization sinks) because those sinks are 416 * If the old and new values of this field are both false or both true, then
334 * required to have dedicated service accounts. 417 * there is no change to the sink's writer_identity.
418 * If the old value was false and the new value is true, then writer_identity
419 * is changed to a unique service account.
420 * It is an error if the old value was true and the new value is false.
335 * 421 *
336 * Completes with a [LogSink]. 422 * Completes with a [LogSink].
337 * 423 *
424 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
425 * error.
426 *
427 * If the used [http.Client] completes with an error when making a REST call,
428 * this method will complete with the same error.
429 */
430 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) {
431 var _url = null;
432 var _queryParams = new core.Map();
433 var _uploadMedia = null;
434 var _uploadOptions = null;
435 var _downloadOptions = commons.DownloadOptions.Metadata;
436 var _body = null;
437
438 if (request != null) {
439 _body = convert.JSON.encode((request).toJson());
440 }
441 if (sinkName == null) {
442 throw new core.ArgumentError("Parameter sinkName is required.");
443 }
444 if (uniqueWriterIdentity != null) {
445 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"];
446 }
447
448 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName');
449
450 var _response = _requester.request(_url,
451 "PUT",
452 body: _body,
453 queryParams: _queryParams,
454 uploadOptions: _uploadOptions,
455 uploadMedia: _uploadMedia,
456 downloadOptions: _downloadOptions);
457 return _response.then((data) => new LogSink.fromJson(data));
458 }
459
460 }
461
462
463 class EntriesResourceApi {
464 final commons.ApiRequester _requester;
465
466 EntriesResourceApi(commons.ApiRequester client) :
467 _requester = client;
468
469 /**
470 * Lists log entries. Use this method to retrieve log entries from Stackdriver
471 * Logging. For ways to export log entries, see Exporting Logs.
472 *
473 * [request] - The metadata request object.
474 *
475 * Request parameters:
476 *
477 * Completes with a [ListLogEntriesResponse].
478 *
479 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
480 * error.
481 *
482 * If the used [http.Client] completes with an error when making a REST call,
483 * this method will complete with the same error.
484 */
485 async.Future<ListLogEntriesResponse> list(ListLogEntriesRequest request) {
486 var _url = null;
487 var _queryParams = new core.Map();
488 var _uploadMedia = null;
489 var _uploadOptions = null;
490 var _downloadOptions = commons.DownloadOptions.Metadata;
491 var _body = null;
492
493 if (request != null) {
494 _body = convert.JSON.encode((request).toJson());
495 }
496
497 _url = 'v2/entries:list';
498
499 var _response = _requester.request(_url,
500 "POST",
501 body: _body,
502 queryParams: _queryParams,
503 uploadOptions: _uploadOptions,
504 uploadMedia: _uploadMedia,
505 downloadOptions: _downloadOptions);
506 return _response.then((data) => new ListLogEntriesResponse.fromJson(data));
507 }
508
509 /**
510 * Writes log entries to Stackdriver Logging. All log entries are written by
511 * this method.
512 *
513 * [request] - The metadata request object.
514 *
515 * Request parameters:
516 *
517 * Completes with a [WriteLogEntriesResponse].
518 *
519 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
520 * error.
521 *
522 * If the used [http.Client] completes with an error when making a REST call,
523 * this method will complete with the same error.
524 */
525 async.Future<WriteLogEntriesResponse> write(WriteLogEntriesRequest request) {
526 var _url = null;
527 var _queryParams = new core.Map();
528 var _uploadMedia = null;
529 var _uploadOptions = null;
530 var _downloadOptions = commons.DownloadOptions.Metadata;
531 var _body = null;
532
533 if (request != null) {
534 _body = convert.JSON.encode((request).toJson());
535 }
536
537 _url = 'v2/entries:write';
538
539 var _response = _requester.request(_url,
540 "POST",
541 body: _body,
542 queryParams: _queryParams,
543 uploadOptions: _uploadOptions,
544 uploadMedia: _uploadMedia,
545 downloadOptions: _downloadOptions);
546 return _response.then((data) => new WriteLogEntriesResponse.fromJson(data));
547 }
548
549 }
550
551
552 class FoldersResourceApi {
553 final commons.ApiRequester _requester;
554
555 FoldersLogsResourceApi get logs => new FoldersLogsResourceApi(_requester);
556 FoldersSinksResourceApi get sinks => new FoldersSinksResourceApi(_requester);
557
558 FoldersResourceApi(commons.ApiRequester client) :
559 _requester = client;
560 }
561
562
563 class FoldersLogsResourceApi {
564 final commons.ApiRequester _requester;
565
566 FoldersLogsResourceApi(commons.ApiRequester client) :
567 _requester = client;
568
569 /**
570 * Deletes all the log entries in a log. The log reappears if it receives new
571 * entries.
572 *
573 * Request parameters:
574 *
575 * [logName] - Required. The resource name of the log to delete:
576 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
577 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
578 * [LOG_ID] must be URL-encoded. For example,
579 * "projects/my-project-id/logs/syslog",
580 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
581 * For more information about log names, see LogEntry.
582 * Value must have pattern "^folders/[^/]+/logs/[^/]+$".
583 *
584 * Completes with a [Empty].
585 *
586 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
587 * error.
588 *
589 * If the used [http.Client] completes with an error when making a REST call,
590 * this method will complete with the same error.
591 */
592 async.Future<Empty> delete(core.String logName) {
593 var _url = null;
594 var _queryParams = new core.Map();
595 var _uploadMedia = null;
596 var _uploadOptions = null;
597 var _downloadOptions = commons.DownloadOptions.Metadata;
598 var _body = null;
599
600 if (logName == null) {
601 throw new core.ArgumentError("Parameter logName is required.");
602 }
603
604 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$logName');
605
606 var _response = _requester.request(_url,
607 "DELETE",
608 body: _body,
609 queryParams: _queryParams,
610 uploadOptions: _uploadOptions,
611 uploadMedia: _uploadMedia,
612 downloadOptions: _downloadOptions);
613 return _response.then((data) => new Empty.fromJson(data));
614 }
615
616 /**
617 * Lists the logs in projects or organizations. Only logs that have entries
618 * are listed.
619 *
620 * Request parameters:
621 *
622 * [parent] - Required. The resource name that owns the logs:
623 * "projects/[PROJECT_ID]"
624 * "organizations/[ORGANIZATION_ID]"
625 *
626 * Value must have pattern "^folders/[^/]+$".
627 *
628 * [pageSize] - Optional. The maximum number of results to return from this
629 * request. Non-positive values are ignored. The presence of nextPageToken in
630 * the response indicates that more results might be available.
631 *
632 * [pageToken] - Optional. If present, then retrieve the next batch of results
633 * from the preceding call to this method. pageToken must be the value of
634 * nextPageToken from the previous response. The values of other method
635 * parameters should be identical to those in the previous call.
636 *
637 * Completes with a [ListLogsResponse].
638 *
639 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
640 * error.
641 *
642 * If the used [http.Client] completes with an error when making a REST call,
643 * this method will complete with the same error.
644 */
645 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
646 var _url = null;
647 var _queryParams = new core.Map();
648 var _uploadMedia = null;
649 var _uploadOptions = null;
650 var _downloadOptions = commons.DownloadOptions.Metadata;
651 var _body = null;
652
653 if (parent == null) {
654 throw new core.ArgumentError("Parameter parent is required.");
655 }
656 if (pageSize != null) {
657 _queryParams["pageSize"] = ["${pageSize}"];
658 }
659 if (pageToken != null) {
660 _queryParams["pageToken"] = [pageToken];
661 }
662
663 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
664
665 var _response = _requester.request(_url,
666 "GET",
667 body: _body,
668 queryParams: _queryParams,
669 uploadOptions: _uploadOptions,
670 uploadMedia: _uploadMedia,
671 downloadOptions: _downloadOptions);
672 return _response.then((data) => new ListLogsResponse.fromJson(data));
673 }
674
675 }
676
677
678 class FoldersSinksResourceApi {
679 final commons.ApiRequester _requester;
680
681 FoldersSinksResourceApi(commons.ApiRequester client) :
682 _requester = client;
683
684 /**
685 * Creates a sink that exports specified log entries to a destination. The
686 * export of newly-ingested log entries begins immediately, unless the current
687 * time is outside the sink's start and end times or the sink's
688 * writer_identity is not permitted to write to the destination. A sink can
689 * export log entries only from the resource owning the sink.
690 *
691 * [request] - The metadata request object.
692 *
693 * Request parameters:
694 *
695 * [parent] - Required. The resource in which to create the sink:
696 * "projects/[PROJECT_ID]"
697 * "organizations/[ORGANIZATION_ID]"
698 * Examples: "projects/my-logging-project", "organizations/123456789".
699 * Value must have pattern "^folders/[^/]+$".
700 *
701 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity
702 * returned as writer_identity in the new sink. If this value is omitted or
703 * set to false, and if the sink's parent is a project, then the value
704 * returned as writer_identity is cloud-logs@google.com, the same identity
705 * used before the addition of writer identities to this API. The sink's
706 * destination must be in the same project as the sink itself.If this field is
707 * set to true, or if the sink is owned by a non-project resource such as an
708 * organization, then the value of writer_identity will be a unique service
709 * account used only for exports from the new sink. For more information, see
710 * writer_identity in LogSink.
711 *
712 * Completes with a [LogSink].
713 *
714 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
715 * error.
716 *
717 * If the used [http.Client] completes with an error when making a REST call,
718 * this method will complete with the same error.
719 */
720 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) {
721 var _url = null;
722 var _queryParams = new core.Map();
723 var _uploadMedia = null;
724 var _uploadOptions = null;
725 var _downloadOptions = commons.DownloadOptions.Metadata;
726 var _body = null;
727
728 if (request != null) {
729 _body = convert.JSON.encode((request).toJson());
730 }
731 if (parent == null) {
732 throw new core.ArgumentError("Parameter parent is required.");
733 }
734 if (uniqueWriterIdentity != null) {
735 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"];
736 }
737
738 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks';
739
740 var _response = _requester.request(_url,
741 "POST",
742 body: _body,
743 queryParams: _queryParams,
744 uploadOptions: _uploadOptions,
745 uploadMedia: _uploadMedia,
746 downloadOptions: _downloadOptions);
747 return _response.then((data) => new LogSink.fromJson(data));
748 }
749
750 /**
751 * Deletes a sink. If the sink has a unique writer_identity, then that service
752 * account is also deleted.
753 *
754 * Request parameters:
755 *
756 * [sinkName] - Required. The full resource name of the sink to delete,
757 * including the parent resource and the sink identifier:
758 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
759 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
760 * It is an error if the sink does not exist. Example:
761 * "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does
762 * not exist.
763 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$".
764 *
765 * Completes with a [Empty].
766 *
767 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
768 * error.
769 *
770 * If the used [http.Client] completes with an error when making a REST call,
771 * this method will complete with the same error.
772 */
773 async.Future<Empty> delete(core.String sinkName) {
774 var _url = null;
775 var _queryParams = new core.Map();
776 var _uploadMedia = null;
777 var _uploadOptions = null;
778 var _downloadOptions = commons.DownloadOptions.Metadata;
779 var _body = null;
780
781 if (sinkName == null) {
782 throw new core.ArgumentError("Parameter sinkName is required.");
783 }
784
785 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName');
786
787 var _response = _requester.request(_url,
788 "DELETE",
789 body: _body,
790 queryParams: _queryParams,
791 uploadOptions: _uploadOptions,
792 uploadMedia: _uploadMedia,
793 downloadOptions: _downloadOptions);
794 return _response.then((data) => new Empty.fromJson(data));
795 }
796
797 /**
798 * Gets a sink.
799 *
800 * Request parameters:
801 *
802 * [sinkName] - Required. The parent resource name of the sink:
803 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
804 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
805 * Example: "projects/my-project-id/sinks/my-sink-id".
806 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$".
807 *
808 * Completes with a [LogSink].
809 *
338 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 810 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
339 * error. 811 * error.
340 * 812 *
341 * If the used [http.Client] completes with an error when making a REST call, 813 * If the used [http.Client] completes with an error when making a REST call,
342 * this method will complete with the same error. 814 * this method will complete with the same error.
343 */ 815 */
344 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) { 816 async.Future<LogSink> get(core.String sinkName) {
345 var _url = null; 817 var _url = null;
346 var _queryParams = new core.Map(); 818 var _queryParams = new core.Map();
347 var _uploadMedia = null; 819 var _uploadMedia = null;
348 var _uploadOptions = null; 820 var _uploadOptions = null;
349 var _downloadOptions = commons.DownloadOptions.Metadata; 821 var _downloadOptions = commons.DownloadOptions.Metadata;
350 var _body = null; 822 var _body = null;
351 823
352 if (request != null) {
353 _body = convert.JSON.encode((request).toJson());
354 }
355 if (sinkName == null) { 824 if (sinkName == null) {
356 throw new core.ArgumentError("Parameter sinkName is required."); 825 throw new core.ArgumentError("Parameter sinkName is required.");
357 } 826 }
358 if (uniqueWriterIdentity != null) {
359 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"];
360 }
361 827
362 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName'); 828 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName');
363 829
364 var _response = _requester.request(_url, 830 var _response = _requester.request(_url,
365 "PUT", 831 "GET",
366 body: _body, 832 body: _body,
367 queryParams: _queryParams, 833 queryParams: _queryParams,
368 uploadOptions: _uploadOptions, 834 uploadOptions: _uploadOptions,
369 uploadMedia: _uploadMedia, 835 uploadMedia: _uploadMedia,
370 downloadOptions: _downloadOptions); 836 downloadOptions: _downloadOptions);
371 return _response.then((data) => new LogSink.fromJson(data)); 837 return _response.then((data) => new LogSink.fromJson(data));
372 } 838 }
373 839
374 }
375
376
377 class EntriesResourceApi {
378 final commons.ApiRequester _requester;
379
380 EntriesResourceApi(commons.ApiRequester client) :
381 _requester = client;
382
383 /** 840 /**
384 * Lists log entries. Use this method to retrieve log entries from Cloud 841 * Lists sinks.
385 * Logging. For ways to export log entries, see
386 * [Exporting Logs](/logging/docs/export).
387 *
388 * [request] - The metadata request object.
389 * 842 *
390 * Request parameters: 843 * Request parameters:
391 * 844 *
392 * Completes with a [ListLogEntriesResponse]. 845 * [parent] - Required. The parent resource whose sinks are to be listed.
846 * Examples: "projects/my-logging-project", "organizations/123456789".
847 * Value must have pattern "^folders/[^/]+$".
848 *
849 * [pageSize] - Optional. The maximum number of results to return from this
850 * request. Non-positive values are ignored. The presence of nextPageToken in
851 * the response indicates that more results might be available.
852 *
853 * [pageToken] - Optional. If present, then retrieve the next batch of results
854 * from the preceding call to this method. pageToken must be the value of
855 * nextPageToken from the previous response. The values of other method
856 * parameters should be identical to those in the previous call.
857 *
858 * Completes with a [ListSinksResponse].
393 * 859 *
394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 860 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
395 * error. 861 * error.
396 * 862 *
397 * If the used [http.Client] completes with an error when making a REST call, 863 * If the used [http.Client] completes with an error when making a REST call,
398 * this method will complete with the same error. 864 * this method will complete with the same error.
399 */ 865 */
400 async.Future<ListLogEntriesResponse> list(ListLogEntriesRequest request) { 866 async.Future<ListSinksResponse> list(core.String parent, {core.int pageSize, c ore.String pageToken}) {
401 var _url = null; 867 var _url = null;
402 var _queryParams = new core.Map(); 868 var _queryParams = new core.Map();
403 var _uploadMedia = null; 869 var _uploadMedia = null;
404 var _uploadOptions = null; 870 var _uploadOptions = null;
405 var _downloadOptions = commons.DownloadOptions.Metadata; 871 var _downloadOptions = commons.DownloadOptions.Metadata;
406 var _body = null; 872 var _body = null;
407 873
408 if (request != null) { 874 if (parent == null) {
409 _body = convert.JSON.encode((request).toJson()); 875 throw new core.ArgumentError("Parameter parent is required.");
876 }
877 if (pageSize != null) {
878 _queryParams["pageSize"] = ["${pageSize}"];
879 }
880 if (pageToken != null) {
881 _queryParams["pageToken"] = [pageToken];
410 } 882 }
411 883
412 _url = 'v2/entries:list'; 884 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sinks';
413 885
414 var _response = _requester.request(_url, 886 var _response = _requester.request(_url,
415 "POST", 887 "GET",
416 body: _body, 888 body: _body,
417 queryParams: _queryParams, 889 queryParams: _queryParams,
418 uploadOptions: _uploadOptions, 890 uploadOptions: _uploadOptions,
419 uploadMedia: _uploadMedia, 891 uploadMedia: _uploadMedia,
420 downloadOptions: _downloadOptions); 892 downloadOptions: _downloadOptions);
421 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); 893 return _response.then((data) => new ListSinksResponse.fromJson(data));
422 } 894 }
423 895
424 /** 896 /**
425 * Writes log entries to Stackdriver Logging. All log entries are 897 * Updates a sink. If the named sink doesn't exist, then this method is
426 * written by this method. 898 * identical to sinks.create. If the named sink does exist, then this method
899 * replaces the following fields in the existing sink with values from the new
900 * sink: destination, filter, output_version_format, start_time, and end_time.
901 * The updated filter might also have a new writer_identity; see the
902 * unique_writer_identity field.
427 * 903 *
428 * [request] - The metadata request object. 904 * [request] - The metadata request object.
429 * 905 *
430 * Request parameters: 906 * Request parameters:
431 * 907 *
432 * Completes with a [WriteLogEntriesResponse]. 908 * [sinkName] - Required. The full resource name of the sink to update,
909 * including the parent resource and the sink identifier:
910 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
911 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
912 * Example: "projects/my-project-id/sinks/my-sink-id".
913 * Value must have pattern "^folders/[^/]+/sinks/[^/]+$".
914 *
915 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of
916 * this field. When updating a sink, the effect of this field on the value of
917 * writer_identity in the updated sink depends on both the old and new values
918 * of this field:
919 * If the old and new values of this field are both false or both true, then
920 * there is no change to the sink's writer_identity.
921 * If the old value was false and the new value is true, then writer_identity
922 * is changed to a unique service account.
923 * It is an error if the old value was true and the new value is false.
924 *
925 * Completes with a [LogSink].
433 * 926 *
434 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 927 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
435 * error. 928 * error.
436 * 929 *
437 * If the used [http.Client] completes with an error when making a REST call, 930 * If the used [http.Client] completes with an error when making a REST call,
438 * this method will complete with the same error. 931 * this method will complete with the same error.
439 */ 932 */
440 async.Future<WriteLogEntriesResponse> write(WriteLogEntriesRequest request) { 933 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) {
441 var _url = null; 934 var _url = null;
442 var _queryParams = new core.Map(); 935 var _queryParams = new core.Map();
443 var _uploadMedia = null; 936 var _uploadMedia = null;
444 var _uploadOptions = null; 937 var _uploadOptions = null;
445 var _downloadOptions = commons.DownloadOptions.Metadata; 938 var _downloadOptions = commons.DownloadOptions.Metadata;
446 var _body = null; 939 var _body = null;
447 940
448 if (request != null) { 941 if (request != null) {
449 _body = convert.JSON.encode((request).toJson()); 942 _body = convert.JSON.encode((request).toJson());
450 } 943 }
944 if (sinkName == null) {
945 throw new core.ArgumentError("Parameter sinkName is required.");
946 }
947 if (uniqueWriterIdentity != null) {
948 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"];
949 }
451 950
452 _url = 'v2/entries:write'; 951 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$sinkName');
453 952
454 var _response = _requester.request(_url, 953 var _response = _requester.request(_url,
455 "POST", 954 "PUT",
456 body: _body, 955 body: _body,
457 queryParams: _queryParams, 956 queryParams: _queryParams,
458 uploadOptions: _uploadOptions, 957 uploadOptions: _uploadOptions,
459 uploadMedia: _uploadMedia, 958 uploadMedia: _uploadMedia,
460 downloadOptions: _downloadOptions); 959 downloadOptions: _downloadOptions);
461 return _response.then((data) => new WriteLogEntriesResponse.fromJson(data)); 960 return _response.then((data) => new LogSink.fromJson(data));
462 } 961 }
463 962
464 } 963 }
465 964
466 965
467 class MonitoredResourceDescriptorsResourceApi { 966 class MonitoredResourceDescriptorsResourceApi {
468 final commons.ApiRequester _requester; 967 final commons.ApiRequester _requester;
469 968
470 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) : 969 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) :
471 _requester = client; 970 _requester = client;
472 971
473 /** 972 /**
474 * Lists the monitored resource descriptors used by Stackdriver Logging. 973 * Lists the descriptors for monitored resource types used by Stackdriver
974 * Logging.
475 * 975 *
476 * Request parameters: 976 * Request parameters:
477 * 977 *
478 * [pageSize] - Optional. The maximum number of results to return from this 978 * [pageSize] - Optional. The maximum number of results to return from this
479 * request. 979 * request. Non-positive values are ignored. The presence of nextPageToken in
480 * Non-positive values are ignored. The presence of `nextPageToken` in the 980 * the response indicates that more results might be available.
481 * response indicates that more results might be available.
482 * 981 *
483 * [pageToken] - Optional. If present, then retrieve the next batch of results 982 * [pageToken] - Optional. If present, then retrieve the next batch of results
484 * from the 983 * from the preceding call to this method. pageToken must be the value of
485 * preceding call to this method. `pageToken` must be the value of 984 * nextPageToken from the previous response. The values of other method
486 * `nextPageToken` from the previous response. The values of other method
487 * parameters should be identical to those in the previous call. 985 * parameters should be identical to those in the previous call.
488 * 986 *
489 * Completes with a [ListMonitoredResourceDescriptorsResponse]. 987 * Completes with a [ListMonitoredResourceDescriptorsResponse].
490 * 988 *
491 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 989 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
492 * error. 990 * error.
493 * 991 *
494 * If the used [http.Client] completes with an error when making a REST call, 992 * If the used [http.Client] completes with an error when making a REST call,
495 * this method will complete with the same error. 993 * this method will complete with the same error.
496 */ 994 */
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 } 1033 }
536 1034
537 1035
538 class OrganizationsLogsResourceApi { 1036 class OrganizationsLogsResourceApi {
539 final commons.ApiRequester _requester; 1037 final commons.ApiRequester _requester;
540 1038
541 OrganizationsLogsResourceApi(commons.ApiRequester client) : 1039 OrganizationsLogsResourceApi(commons.ApiRequester client) :
542 _requester = client; 1040 _requester = client;
543 1041
544 /** 1042 /**
545 * Deletes a log and all its log entries. 1043 * Deletes all the log entries in a log. The log reappears if it receives new
546 * The log will reappear if it receives new entries. 1044 * entries.
547 * 1045 *
548 * Request parameters: 1046 * Request parameters:
549 * 1047 *
550 * [logName] - Required. The resource name of the log to delete. Example: 1048 * [logName] - Required. The resource name of the log to delete:
551 * `"projects/my-project/logs/syslog"`. 1049 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
1050 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1051 * [LOG_ID] must be URL-encoded. For example,
1052 * "projects/my-project-id/logs/syslog",
1053 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
1054 * For more information about log names, see LogEntry.
552 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$". 1055 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$".
553 * 1056 *
554 * Completes with a [Empty]. 1057 * Completes with a [Empty].
555 * 1058 *
556 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1059 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
557 * error. 1060 * error.
558 * 1061 *
559 * If the used [http.Client] completes with an error when making a REST call, 1062 * If the used [http.Client] completes with an error when making a REST call,
560 * this method will complete with the same error. 1063 * this method will complete with the same error.
561 */ 1064 */
(...skipping 14 matching lines...) Expand all
576 var _response = _requester.request(_url, 1079 var _response = _requester.request(_url,
577 "DELETE", 1080 "DELETE",
578 body: _body, 1081 body: _body,
579 queryParams: _queryParams, 1082 queryParams: _queryParams,
580 uploadOptions: _uploadOptions, 1083 uploadOptions: _uploadOptions,
581 uploadMedia: _uploadMedia, 1084 uploadMedia: _uploadMedia,
582 downloadOptions: _downloadOptions); 1085 downloadOptions: _downloadOptions);
583 return _response.then((data) => new Empty.fromJson(data)); 1086 return _response.then((data) => new Empty.fromJson(data));
584 } 1087 }
585 1088
1089 /**
1090 * Lists the logs in projects or organizations. Only logs that have entries
1091 * are listed.
1092 *
1093 * Request parameters:
1094 *
1095 * [parent] - Required. The resource name that owns the logs:
1096 * "projects/[PROJECT_ID]"
1097 * "organizations/[ORGANIZATION_ID]"
1098 *
1099 * Value must have pattern "^organizations/[^/]+$".
1100 *
1101 * [pageSize] - Optional. The maximum number of results to return from this
1102 * request. Non-positive values are ignored. The presence of nextPageToken in
1103 * the response indicates that more results might be available.
1104 *
1105 * [pageToken] - Optional. If present, then retrieve the next batch of results
1106 * from the preceding call to this method. pageToken must be the value of
1107 * nextPageToken from the previous response. The values of other method
1108 * parameters should be identical to those in the previous call.
1109 *
1110 * Completes with a [ListLogsResponse].
1111 *
1112 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1113 * error.
1114 *
1115 * If the used [http.Client] completes with an error when making a REST call,
1116 * this method will complete with the same error.
1117 */
1118 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
1119 var _url = null;
1120 var _queryParams = new core.Map();
1121 var _uploadMedia = null;
1122 var _uploadOptions = null;
1123 var _downloadOptions = commons.DownloadOptions.Metadata;
1124 var _body = null;
1125
1126 if (parent == null) {
1127 throw new core.ArgumentError("Parameter parent is required.");
1128 }
1129 if (pageSize != null) {
1130 _queryParams["pageSize"] = ["${pageSize}"];
1131 }
1132 if (pageToken != null) {
1133 _queryParams["pageToken"] = [pageToken];
1134 }
1135
1136 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
1137
1138 var _response = _requester.request(_url,
1139 "GET",
1140 body: _body,
1141 queryParams: _queryParams,
1142 uploadOptions: _uploadOptions,
1143 uploadMedia: _uploadMedia,
1144 downloadOptions: _downloadOptions);
1145 return _response.then((data) => new ListLogsResponse.fromJson(data));
1146 }
1147
586 } 1148 }
587 1149
588 1150
589 class OrganizationsSinksResourceApi { 1151 class OrganizationsSinksResourceApi {
590 final commons.ApiRequester _requester; 1152 final commons.ApiRequester _requester;
591 1153
592 OrganizationsSinksResourceApi(commons.ApiRequester client) : 1154 OrganizationsSinksResourceApi(commons.ApiRequester client) :
593 _requester = client; 1155 _requester = client;
594 1156
595 /** 1157 /**
596 * Creates a sink. 1158 * Creates a sink that exports specified log entries to a destination. The
1159 * export of newly-ingested log entries begins immediately, unless the current
1160 * time is outside the sink's start and end times or the sink's
1161 * writer_identity is not permitted to write to the destination. A sink can
1162 * export log entries only from the resource owning the sink.
597 * 1163 *
598 * [request] - The metadata request object. 1164 * [request] - The metadata request object.
599 * 1165 *
600 * Request parameters: 1166 * Request parameters:
601 * 1167 *
602 * [parent] - Required. The resource in which to create the sink. 1168 * [parent] - Required. The resource in which to create the sink:
603 * Example: `"projects/my-project-id"`. 1169 * "projects/[PROJECT_ID]"
604 * The new sink must be provided in the request. 1170 * "organizations/[ORGANIZATION_ID]"
1171 * Examples: "projects/my-logging-project", "organizations/123456789".
605 * Value must have pattern "^organizations/[^/]+$". 1172 * Value must have pattern "^organizations/[^/]+$".
606 * 1173 *
607 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 1174 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity
608 * service account returned 1175 * returned as writer_identity in the new sink. If this value is omitted or
609 * in the sink's writer_identity. Set this field to be true to export 1176 * set to false, and if the sink's parent is a project, then the value
610 * logs from one project to a different project. This field is ignored for 1177 * returned as writer_identity is cloud-logs@google.com, the same identity
611 * non-project sinks (e.g. organization sinks) because those sinks are 1178 * used before the addition of writer identities to this API. The sink's
612 * required to have dedicated service accounts. 1179 * destination must be in the same project as the sink itself.If this field is
1180 * set to true, or if the sink is owned by a non-project resource such as an
1181 * organization, then the value of writer_identity will be a unique service
1182 * account used only for exports from the new sink. For more information, see
1183 * writer_identity in LogSink.
613 * 1184 *
614 * Completes with a [LogSink]. 1185 * Completes with a [LogSink].
615 * 1186 *
616 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
617 * error. 1188 * error.
618 * 1189 *
619 * If the used [http.Client] completes with an error when making a REST call, 1190 * If the used [http.Client] completes with an error when making a REST call,
620 * this method will complete with the same error. 1191 * this method will complete with the same error.
621 */ 1192 */
622 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) { 1193 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) {
(...skipping 20 matching lines...) Expand all
643 "POST", 1214 "POST",
644 body: _body, 1215 body: _body,
645 queryParams: _queryParams, 1216 queryParams: _queryParams,
646 uploadOptions: _uploadOptions, 1217 uploadOptions: _uploadOptions,
647 uploadMedia: _uploadMedia, 1218 uploadMedia: _uploadMedia,
648 downloadOptions: _downloadOptions); 1219 downloadOptions: _downloadOptions);
649 return _response.then((data) => new LogSink.fromJson(data)); 1220 return _response.then((data) => new LogSink.fromJson(data));
650 } 1221 }
651 1222
652 /** 1223 /**
653 * Deletes a sink. 1224 * Deletes a sink. If the sink has a unique writer_identity, then that service
1225 * account is also deleted.
654 * 1226 *
655 * Request parameters: 1227 * Request parameters:
656 * 1228 *
657 * [sinkName] - Required. The resource name of the sink to delete, including 1229 * [sinkName] - Required. The full resource name of the sink to delete,
658 * the parent 1230 * including the parent resource and the sink identifier:
659 * resource and the sink identifier. Example: 1231 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
660 * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink 1232 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
661 * does not exist. 1233 * It is an error if the sink does not exist. Example:
1234 * "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does
1235 * not exist.
662 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". 1236 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$".
663 * 1237 *
664 * Completes with a [Empty]. 1238 * Completes with a [Empty].
665 * 1239 *
666 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1240 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
667 * error. 1241 * error.
668 * 1242 *
669 * If the used [http.Client] completes with an error when making a REST call, 1243 * If the used [http.Client] completes with an error when making a REST call,
670 * this method will complete with the same error. 1244 * this method will complete with the same error.
671 */ 1245 */
(...skipping 19 matching lines...) Expand all
691 uploadMedia: _uploadMedia, 1265 uploadMedia: _uploadMedia,
692 downloadOptions: _downloadOptions); 1266 downloadOptions: _downloadOptions);
693 return _response.then((data) => new Empty.fromJson(data)); 1267 return _response.then((data) => new Empty.fromJson(data));
694 } 1268 }
695 1269
696 /** 1270 /**
697 * Gets a sink. 1271 * Gets a sink.
698 * 1272 *
699 * Request parameters: 1273 * Request parameters:
700 * 1274 *
701 * [sinkName] - Required. The resource name of the sink to return. 1275 * [sinkName] - Required. The parent resource name of the sink:
702 * Example: `"projects/my-project-id/sinks/my-sink-id"`. 1276 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1277 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1278 * Example: "projects/my-project-id/sinks/my-sink-id".
703 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". 1279 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$".
704 * 1280 *
705 * Completes with a [LogSink]. 1281 * Completes with a [LogSink].
706 * 1282 *
707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1283 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
708 * error. 1284 * error.
709 * 1285 *
710 * If the used [http.Client] completes with an error when making a REST call, 1286 * If the used [http.Client] completes with an error when making a REST call,
711 * this method will complete with the same error. 1287 * this method will complete with the same error.
712 */ 1288 */
(...skipping 19 matching lines...) Expand all
732 uploadMedia: _uploadMedia, 1308 uploadMedia: _uploadMedia,
733 downloadOptions: _downloadOptions); 1309 downloadOptions: _downloadOptions);
734 return _response.then((data) => new LogSink.fromJson(data)); 1310 return _response.then((data) => new LogSink.fromJson(data));
735 } 1311 }
736 1312
737 /** 1313 /**
738 * Lists sinks. 1314 * Lists sinks.
739 * 1315 *
740 * Request parameters: 1316 * Request parameters:
741 * 1317 *
742 * [parent] - Required. The resource name where this sink was created. 1318 * [parent] - Required. The parent resource whose sinks are to be listed.
743 * Example: `"projects/my-logging-project"`. 1319 * Examples: "projects/my-logging-project", "organizations/123456789".
744 * Value must have pattern "^organizations/[^/]+$". 1320 * Value must have pattern "^organizations/[^/]+$".
745 * 1321 *
746 * [pageSize] - Optional. The maximum number of results to return from this 1322 * [pageSize] - Optional. The maximum number of results to return from this
747 * request. 1323 * request. Non-positive values are ignored. The presence of nextPageToken in
748 * Non-positive values are ignored. The presence of `nextPageToken` in the 1324 * the response indicates that more results might be available.
749 * response indicates that more results might be available.
750 * 1325 *
751 * [pageToken] - Optional. If present, then retrieve the next batch of results 1326 * [pageToken] - Optional. If present, then retrieve the next batch of results
752 * from the 1327 * from the preceding call to this method. pageToken must be the value of
753 * preceding call to this method. `pageToken` must be the value of 1328 * nextPageToken from the previous response. The values of other method
754 * `nextPageToken` from the previous response. The values of other method
755 * parameters should be identical to those in the previous call. 1329 * parameters should be identical to those in the previous call.
756 * 1330 *
757 * Completes with a [ListSinksResponse]. 1331 * Completes with a [ListSinksResponse].
758 * 1332 *
759 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1333 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
760 * error. 1334 * error.
761 * 1335 *
762 * If the used [http.Client] completes with an error when making a REST call, 1336 * If the used [http.Client] completes with an error when making a REST call,
763 * this method will complete with the same error. 1337 * this method will complete with the same error.
764 */ 1338 */
(...skipping 21 matching lines...) Expand all
786 "GET", 1360 "GET",
787 body: _body, 1361 body: _body,
788 queryParams: _queryParams, 1362 queryParams: _queryParams,
789 uploadOptions: _uploadOptions, 1363 uploadOptions: _uploadOptions,
790 uploadMedia: _uploadMedia, 1364 uploadMedia: _uploadMedia,
791 downloadOptions: _downloadOptions); 1365 downloadOptions: _downloadOptions);
792 return _response.then((data) => new ListSinksResponse.fromJson(data)); 1366 return _response.then((data) => new ListSinksResponse.fromJson(data));
793 } 1367 }
794 1368
795 /** 1369 /**
796 * Updates or creates a sink. 1370 * Updates a sink. If the named sink doesn't exist, then this method is
1371 * identical to sinks.create. If the named sink does exist, then this method
1372 * replaces the following fields in the existing sink with values from the new
1373 * sink: destination, filter, output_version_format, start_time, and end_time.
1374 * The updated filter might also have a new writer_identity; see the
1375 * unique_writer_identity field.
797 * 1376 *
798 * [request] - The metadata request object. 1377 * [request] - The metadata request object.
799 * 1378 *
800 * Request parameters: 1379 * Request parameters:
801 * 1380 *
802 * [sinkName] - Required. The resource name of the sink to update, including 1381 * [sinkName] - Required. The full resource name of the sink to update,
803 * the parent 1382 * including the parent resource and the sink identifier:
804 * resource and the sink identifier. If the sink does not exist, this method 1383 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
805 * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. 1384 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1385 * Example: "projects/my-project-id/sinks/my-sink-id".
806 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$". 1386 * Value must have pattern "^organizations/[^/]+/sinks/[^/]+$".
807 * 1387 *
808 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 1388 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of
809 * service account returned 1389 * this field. When updating a sink, the effect of this field on the value of
810 * in the sink's writer_identity. Set this field to be true to export 1390 * writer_identity in the updated sink depends on both the old and new values
811 * logs from one project to a different project. This field is ignored for 1391 * of this field:
812 * non-project sinks (e.g. organization sinks) because those sinks are 1392 * If the old and new values of this field are both false or both true, then
813 * required to have dedicated service accounts. 1393 * there is no change to the sink's writer_identity.
1394 * If the old value was false and the new value is true, then writer_identity
1395 * is changed to a unique service account.
1396 * It is an error if the old value was true and the new value is false.
814 * 1397 *
815 * Completes with a [LogSink]. 1398 * Completes with a [LogSink].
816 * 1399 *
817 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1400 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
818 * error. 1401 * error.
819 * 1402 *
820 * If the used [http.Client] completes with an error when making a REST call, 1403 * If the used [http.Client] completes with an error when making a REST call,
821 * this method will complete with the same error. 1404 * this method will complete with the same error.
822 */ 1405 */
823 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) { 1406 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 } 1448 }
866 1449
867 1450
868 class ProjectsLogsResourceApi { 1451 class ProjectsLogsResourceApi {
869 final commons.ApiRequester _requester; 1452 final commons.ApiRequester _requester;
870 1453
871 ProjectsLogsResourceApi(commons.ApiRequester client) : 1454 ProjectsLogsResourceApi(commons.ApiRequester client) :
872 _requester = client; 1455 _requester = client;
873 1456
874 /** 1457 /**
875 * Deletes a log and all its log entries. 1458 * Deletes all the log entries in a log. The log reappears if it receives new
876 * The log will reappear if it receives new entries. 1459 * entries.
877 * 1460 *
878 * Request parameters: 1461 * Request parameters:
879 * 1462 *
880 * [logName] - Required. The resource name of the log to delete. Example: 1463 * [logName] - Required. The resource name of the log to delete:
881 * `"projects/my-project/logs/syslog"`. 1464 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
1465 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1466 * [LOG_ID] must be URL-encoded. For example,
1467 * "projects/my-project-id/logs/syslog",
1468 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
1469 * For more information about log names, see LogEntry.
882 * Value must have pattern "^projects/[^/]+/logs/[^/]+$". 1470 * Value must have pattern "^projects/[^/]+/logs/[^/]+$".
883 * 1471 *
884 * Completes with a [Empty]. 1472 * Completes with a [Empty].
885 * 1473 *
886 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1474 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
887 * error. 1475 * error.
888 * 1476 *
889 * If the used [http.Client] completes with an error when making a REST call, 1477 * If the used [http.Client] completes with an error when making a REST call,
890 * this method will complete with the same error. 1478 * this method will complete with the same error.
891 */ 1479 */
(...skipping 14 matching lines...) Expand all
906 var _response = _requester.request(_url, 1494 var _response = _requester.request(_url,
907 "DELETE", 1495 "DELETE",
908 body: _body, 1496 body: _body,
909 queryParams: _queryParams, 1497 queryParams: _queryParams,
910 uploadOptions: _uploadOptions, 1498 uploadOptions: _uploadOptions,
911 uploadMedia: _uploadMedia, 1499 uploadMedia: _uploadMedia,
912 downloadOptions: _downloadOptions); 1500 downloadOptions: _downloadOptions);
913 return _response.then((data) => new Empty.fromJson(data)); 1501 return _response.then((data) => new Empty.fromJson(data));
914 } 1502 }
915 1503
1504 /**
1505 * Lists the logs in projects or organizations. Only logs that have entries
1506 * are listed.
1507 *
1508 * Request parameters:
1509 *
1510 * [parent] - Required. The resource name that owns the logs:
1511 * "projects/[PROJECT_ID]"
1512 * "organizations/[ORGANIZATION_ID]"
1513 *
1514 * Value must have pattern "^projects/[^/]+$".
1515 *
1516 * [pageSize] - Optional. The maximum number of results to return from this
1517 * request. Non-positive values are ignored. The presence of nextPageToken in
1518 * the response indicates that more results might be available.
1519 *
1520 * [pageToken] - Optional. If present, then retrieve the next batch of results
1521 * from the preceding call to this method. pageToken must be the value of
1522 * nextPageToken from the previous response. The values of other method
1523 * parameters should be identical to those in the previous call.
1524 *
1525 * Completes with a [ListLogsResponse].
1526 *
1527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1528 * error.
1529 *
1530 * If the used [http.Client] completes with an error when making a REST call,
1531 * this method will complete with the same error.
1532 */
1533 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
1534 var _url = null;
1535 var _queryParams = new core.Map();
1536 var _uploadMedia = null;
1537 var _uploadOptions = null;
1538 var _downloadOptions = commons.DownloadOptions.Metadata;
1539 var _body = null;
1540
1541 if (parent == null) {
1542 throw new core.ArgumentError("Parameter parent is required.");
1543 }
1544 if (pageSize != null) {
1545 _queryParams["pageSize"] = ["${pageSize}"];
1546 }
1547 if (pageToken != null) {
1548 _queryParams["pageToken"] = [pageToken];
1549 }
1550
1551 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/logs';
1552
1553 var _response = _requester.request(_url,
1554 "GET",
1555 body: _body,
1556 queryParams: _queryParams,
1557 uploadOptions: _uploadOptions,
1558 uploadMedia: _uploadMedia,
1559 downloadOptions: _downloadOptions);
1560 return _response.then((data) => new ListLogsResponse.fromJson(data));
1561 }
1562
916 } 1563 }
917 1564
918 1565
919 class ProjectsMetricsResourceApi { 1566 class ProjectsMetricsResourceApi {
920 final commons.ApiRequester _requester; 1567 final commons.ApiRequester _requester;
921 1568
922 ProjectsMetricsResourceApi(commons.ApiRequester client) : 1569 ProjectsMetricsResourceApi(commons.ApiRequester client) :
923 _requester = client; 1570 _requester = client;
924 1571
925 /** 1572 /**
926 * Creates a logs-based metric. 1573 * Creates a logs-based metric.
927 * 1574 *
928 * [request] - The metadata request object. 1575 * [request] - The metadata request object.
929 * 1576 *
930 * Request parameters: 1577 * Request parameters:
931 * 1578 *
932 * [parent] - The resource name of the project in which to create the metric. 1579 * [parent] - The resource name of the project in which to create the metric:
933 * Example: `"projects/my-project-id"`. 1580 * "projects/[PROJECT_ID]"
934 *
935 * The new metric must be provided in the request. 1581 * The new metric must be provided in the request.
936 * Value must have pattern "^projects/[^/]+$". 1582 * Value must have pattern "^projects/[^/]+$".
937 * 1583 *
938 * Completes with a [LogMetric]. 1584 * Completes with a [LogMetric].
939 * 1585 *
940 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1586 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
941 * error. 1587 * error.
942 * 1588 *
943 * If the used [http.Client] completes with an error when making a REST call, 1589 * If the used [http.Client] completes with an error when making a REST call,
944 * this method will complete with the same error. 1590 * this method will complete with the same error.
(...skipping 23 matching lines...) Expand all
968 uploadMedia: _uploadMedia, 1614 uploadMedia: _uploadMedia,
969 downloadOptions: _downloadOptions); 1615 downloadOptions: _downloadOptions);
970 return _response.then((data) => new LogMetric.fromJson(data)); 1616 return _response.then((data) => new LogMetric.fromJson(data));
971 } 1617 }
972 1618
973 /** 1619 /**
974 * Deletes a logs-based metric. 1620 * Deletes a logs-based metric.
975 * 1621 *
976 * Request parameters: 1622 * Request parameters:
977 * 1623 *
978 * [metricName] - The resource name of the metric to delete. 1624 * [metricName] - The resource name of the metric to delete:
979 * Example: `"projects/my-project-id/metrics/my-metric-id"`. 1625 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1626 *
980 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 1627 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
981 * 1628 *
982 * Completes with a [Empty]. 1629 * Completes with a [Empty].
983 * 1630 *
984 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1631 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
985 * error. 1632 * error.
986 * 1633 *
987 * If the used [http.Client] completes with an error when making a REST call, 1634 * If the used [http.Client] completes with an error when making a REST call,
988 * this method will complete with the same error. 1635 * this method will complete with the same error.
989 */ 1636 */
(...skipping 19 matching lines...) Expand all
1009 uploadMedia: _uploadMedia, 1656 uploadMedia: _uploadMedia,
1010 downloadOptions: _downloadOptions); 1657 downloadOptions: _downloadOptions);
1011 return _response.then((data) => new Empty.fromJson(data)); 1658 return _response.then((data) => new Empty.fromJson(data));
1012 } 1659 }
1013 1660
1014 /** 1661 /**
1015 * Gets a logs-based metric. 1662 * Gets a logs-based metric.
1016 * 1663 *
1017 * Request parameters: 1664 * Request parameters:
1018 * 1665 *
1019 * [metricName] - The resource name of the desired metric. 1666 * [metricName] - The resource name of the desired metric:
1020 * Example: `"projects/my-project-id/metrics/my-metric-id"`. 1667 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1668 *
1021 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 1669 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
1022 * 1670 *
1023 * Completes with a [LogMetric]. 1671 * Completes with a [LogMetric].
1024 * 1672 *
1025 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1673 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1026 * error. 1674 * error.
1027 * 1675 *
1028 * If the used [http.Client] completes with an error when making a REST call, 1676 * If the used [http.Client] completes with an error when making a REST call,
1029 * this method will complete with the same error. 1677 * this method will complete with the same error.
1030 */ 1678 */
(...skipping 19 matching lines...) Expand all
1050 uploadMedia: _uploadMedia, 1698 uploadMedia: _uploadMedia,
1051 downloadOptions: _downloadOptions); 1699 downloadOptions: _downloadOptions);
1052 return _response.then((data) => new LogMetric.fromJson(data)); 1700 return _response.then((data) => new LogMetric.fromJson(data));
1053 } 1701 }
1054 1702
1055 /** 1703 /**
1056 * Lists logs-based metrics. 1704 * Lists logs-based metrics.
1057 * 1705 *
1058 * Request parameters: 1706 * Request parameters:
1059 * 1707 *
1060 * [parent] - Required. The resource name containing the metrics. 1708 * [parent] - Required. The name of the project containing the metrics:
1061 * Example: `"projects/my-project-id"`. 1709 * "projects/[PROJECT_ID]"
1710 *
1062 * Value must have pattern "^projects/[^/]+$". 1711 * Value must have pattern "^projects/[^/]+$".
1063 * 1712 *
1064 * [pageSize] - Optional. The maximum number of results to return from this 1713 * [pageSize] - Optional. The maximum number of results to return from this
1065 * request. 1714 * request. Non-positive values are ignored. The presence of nextPageToken in
1066 * Non-positive values are ignored. The presence of `nextPageToken` in the 1715 * the response indicates that more results might be available.
1067 * response indicates that more results might be available.
1068 * 1716 *
1069 * [pageToken] - Optional. If present, then retrieve the next batch of results 1717 * [pageToken] - Optional. If present, then retrieve the next batch of results
1070 * from the 1718 * from the preceding call to this method. pageToken must be the value of
1071 * preceding call to this method. `pageToken` must be the value of 1719 * nextPageToken from the previous response. The values of other method
1072 * `nextPageToken` from the previous response. The values of other method
1073 * parameters should be identical to those in the previous call. 1720 * parameters should be identical to those in the previous call.
1074 * 1721 *
1075 * Completes with a [ListLogMetricsResponse]. 1722 * Completes with a [ListLogMetricsResponse].
1076 * 1723 *
1077 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1724 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1078 * error. 1725 * error.
1079 * 1726 *
1080 * If the used [http.Client] completes with an error when making a REST call, 1727 * If the used [http.Client] completes with an error when making a REST call,
1081 * this method will complete with the same error. 1728 * this method will complete with the same error.
1082 */ 1729 */
(...skipping 27 matching lines...) Expand all
1110 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); 1757 return _response.then((data) => new ListLogMetricsResponse.fromJson(data));
1111 } 1758 }
1112 1759
1113 /** 1760 /**
1114 * Creates or updates a logs-based metric. 1761 * Creates or updates a logs-based metric.
1115 * 1762 *
1116 * [request] - The metadata request object. 1763 * [request] - The metadata request object.
1117 * 1764 *
1118 * Request parameters: 1765 * Request parameters:
1119 * 1766 *
1120 * [metricName] - The resource name of the metric to update. 1767 * [metricName] - The resource name of the metric to update:
1121 * Example: `"projects/my-project-id/metrics/my-metric-id"`. 1768 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1122 * 1769 * The updated metric must be provided in the request and it's name field must
1123 * The updated metric must be provided in the request and have the 1770 * be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID],
1124 * same identifier that is specified in `metricName`. 1771 * then a new metric is created.
1125 * If the metric does not exist, it is created.
1126 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 1772 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
1127 * 1773 *
1128 * Completes with a [LogMetric]. 1774 * Completes with a [LogMetric].
1129 * 1775 *
1130 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1776 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1131 * error. 1777 * error.
1132 * 1778 *
1133 * If the used [http.Client] completes with an error when making a REST call, 1779 * If the used [http.Client] completes with an error when making a REST call,
1134 * this method will complete with the same error. 1780 * this method will complete with the same error.
1135 */ 1781 */
(...skipping 27 matching lines...) Expand all
1163 } 1809 }
1164 1810
1165 1811
1166 class ProjectsSinksResourceApi { 1812 class ProjectsSinksResourceApi {
1167 final commons.ApiRequester _requester; 1813 final commons.ApiRequester _requester;
1168 1814
1169 ProjectsSinksResourceApi(commons.ApiRequester client) : 1815 ProjectsSinksResourceApi(commons.ApiRequester client) :
1170 _requester = client; 1816 _requester = client;
1171 1817
1172 /** 1818 /**
1173 * Creates a sink. 1819 * Creates a sink that exports specified log entries to a destination. The
1820 * export of newly-ingested log entries begins immediately, unless the current
1821 * time is outside the sink's start and end times or the sink's
1822 * writer_identity is not permitted to write to the destination. A sink can
1823 * export log entries only from the resource owning the sink.
1174 * 1824 *
1175 * [request] - The metadata request object. 1825 * [request] - The metadata request object.
1176 * 1826 *
1177 * Request parameters: 1827 * Request parameters:
1178 * 1828 *
1179 * [parent] - Required. The resource in which to create the sink. 1829 * [parent] - Required. The resource in which to create the sink:
1180 * Example: `"projects/my-project-id"`. 1830 * "projects/[PROJECT_ID]"
1181 * The new sink must be provided in the request. 1831 * "organizations/[ORGANIZATION_ID]"
1832 * Examples: "projects/my-logging-project", "organizations/123456789".
1182 * Value must have pattern "^projects/[^/]+$". 1833 * Value must have pattern "^projects/[^/]+$".
1183 * 1834 *
1184 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 1835 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity
1185 * service account returned 1836 * returned as writer_identity in the new sink. If this value is omitted or
1186 * in the sink's writer_identity. Set this field to be true to export 1837 * set to false, and if the sink's parent is a project, then the value
1187 * logs from one project to a different project. This field is ignored for 1838 * returned as writer_identity is cloud-logs@google.com, the same identity
1188 * non-project sinks (e.g. organization sinks) because those sinks are 1839 * used before the addition of writer identities to this API. The sink's
1189 * required to have dedicated service accounts. 1840 * destination must be in the same project as the sink itself.If this field is
1841 * set to true, or if the sink is owned by a non-project resource such as an
1842 * organization, then the value of writer_identity will be a unique service
1843 * account used only for exports from the new sink. For more information, see
1844 * writer_identity in LogSink.
1190 * 1845 *
1191 * Completes with a [LogSink]. 1846 * Completes with a [LogSink].
1192 * 1847 *
1193 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1848 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1194 * error. 1849 * error.
1195 * 1850 *
1196 * If the used [http.Client] completes with an error when making a REST call, 1851 * If the used [http.Client] completes with an error when making a REST call,
1197 * this method will complete with the same error. 1852 * this method will complete with the same error.
1198 */ 1853 */
1199 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) { 1854 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) {
(...skipping 20 matching lines...) Expand all
1220 "POST", 1875 "POST",
1221 body: _body, 1876 body: _body,
1222 queryParams: _queryParams, 1877 queryParams: _queryParams,
1223 uploadOptions: _uploadOptions, 1878 uploadOptions: _uploadOptions,
1224 uploadMedia: _uploadMedia, 1879 uploadMedia: _uploadMedia,
1225 downloadOptions: _downloadOptions); 1880 downloadOptions: _downloadOptions);
1226 return _response.then((data) => new LogSink.fromJson(data)); 1881 return _response.then((data) => new LogSink.fromJson(data));
1227 } 1882 }
1228 1883
1229 /** 1884 /**
1230 * Deletes a sink. 1885 * Deletes a sink. If the sink has a unique writer_identity, then that service
1886 * account is also deleted.
1231 * 1887 *
1232 * Request parameters: 1888 * Request parameters:
1233 * 1889 *
1234 * [sinkName] - Required. The resource name of the sink to delete, including 1890 * [sinkName] - Required. The full resource name of the sink to delete,
1235 * the parent 1891 * including the parent resource and the sink identifier:
1236 * resource and the sink identifier. Example: 1892 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1237 * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink 1893 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1238 * does not exist. 1894 * It is an error if the sink does not exist. Example:
1895 * "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does
1896 * not exist.
1239 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 1897 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
1240 * 1898 *
1241 * Completes with a [Empty]. 1899 * Completes with a [Empty].
1242 * 1900 *
1243 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1901 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1244 * error. 1902 * error.
1245 * 1903 *
1246 * If the used [http.Client] completes with an error when making a REST call, 1904 * If the used [http.Client] completes with an error when making a REST call,
1247 * this method will complete with the same error. 1905 * this method will complete with the same error.
1248 */ 1906 */
(...skipping 19 matching lines...) Expand all
1268 uploadMedia: _uploadMedia, 1926 uploadMedia: _uploadMedia,
1269 downloadOptions: _downloadOptions); 1927 downloadOptions: _downloadOptions);
1270 return _response.then((data) => new Empty.fromJson(data)); 1928 return _response.then((data) => new Empty.fromJson(data));
1271 } 1929 }
1272 1930
1273 /** 1931 /**
1274 * Gets a sink. 1932 * Gets a sink.
1275 * 1933 *
1276 * Request parameters: 1934 * Request parameters:
1277 * 1935 *
1278 * [sinkName] - Required. The resource name of the sink to return. 1936 * [sinkName] - Required. The parent resource name of the sink:
1279 * Example: `"projects/my-project-id/sinks/my-sink-id"`. 1937 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1938 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1939 * Example: "projects/my-project-id/sinks/my-sink-id".
1280 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 1940 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
1281 * 1941 *
1282 * Completes with a [LogSink]. 1942 * Completes with a [LogSink].
1283 * 1943 *
1284 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1944 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1285 * error. 1945 * error.
1286 * 1946 *
1287 * If the used [http.Client] completes with an error when making a REST call, 1947 * If the used [http.Client] completes with an error when making a REST call,
1288 * this method will complete with the same error. 1948 * this method will complete with the same error.
1289 */ 1949 */
(...skipping 19 matching lines...) Expand all
1309 uploadMedia: _uploadMedia, 1969 uploadMedia: _uploadMedia,
1310 downloadOptions: _downloadOptions); 1970 downloadOptions: _downloadOptions);
1311 return _response.then((data) => new LogSink.fromJson(data)); 1971 return _response.then((data) => new LogSink.fromJson(data));
1312 } 1972 }
1313 1973
1314 /** 1974 /**
1315 * Lists sinks. 1975 * Lists sinks.
1316 * 1976 *
1317 * Request parameters: 1977 * Request parameters:
1318 * 1978 *
1319 * [parent] - Required. The resource name where this sink was created. 1979 * [parent] - Required. The parent resource whose sinks are to be listed.
1320 * Example: `"projects/my-logging-project"`. 1980 * Examples: "projects/my-logging-project", "organizations/123456789".
1321 * Value must have pattern "^projects/[^/]+$". 1981 * Value must have pattern "^projects/[^/]+$".
1322 * 1982 *
1323 * [pageSize] - Optional. The maximum number of results to return from this 1983 * [pageSize] - Optional. The maximum number of results to return from this
1324 * request. 1984 * request. Non-positive values are ignored. The presence of nextPageToken in
1325 * Non-positive values are ignored. The presence of `nextPageToken` in the 1985 * the response indicates that more results might be available.
1326 * response indicates that more results might be available.
1327 * 1986 *
1328 * [pageToken] - Optional. If present, then retrieve the next batch of results 1987 * [pageToken] - Optional. If present, then retrieve the next batch of results
1329 * from the 1988 * from the preceding call to this method. pageToken must be the value of
1330 * preceding call to this method. `pageToken` must be the value of 1989 * nextPageToken from the previous response. The values of other method
1331 * `nextPageToken` from the previous response. The values of other method
1332 * parameters should be identical to those in the previous call. 1990 * parameters should be identical to those in the previous call.
1333 * 1991 *
1334 * Completes with a [ListSinksResponse]. 1992 * Completes with a [ListSinksResponse].
1335 * 1993 *
1336 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1994 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1337 * error. 1995 * error.
1338 * 1996 *
1339 * If the used [http.Client] completes with an error when making a REST call, 1997 * If the used [http.Client] completes with an error when making a REST call,
1340 * this method will complete with the same error. 1998 * this method will complete with the same error.
1341 */ 1999 */
(...skipping 21 matching lines...) Expand all
1363 "GET", 2021 "GET",
1364 body: _body, 2022 body: _body,
1365 queryParams: _queryParams, 2023 queryParams: _queryParams,
1366 uploadOptions: _uploadOptions, 2024 uploadOptions: _uploadOptions,
1367 uploadMedia: _uploadMedia, 2025 uploadMedia: _uploadMedia,
1368 downloadOptions: _downloadOptions); 2026 downloadOptions: _downloadOptions);
1369 return _response.then((data) => new ListSinksResponse.fromJson(data)); 2027 return _response.then((data) => new ListSinksResponse.fromJson(data));
1370 } 2028 }
1371 2029
1372 /** 2030 /**
1373 * Updates or creates a sink. 2031 * Updates a sink. If the named sink doesn't exist, then this method is
2032 * identical to sinks.create. If the named sink does exist, then this method
2033 * replaces the following fields in the existing sink with values from the new
2034 * sink: destination, filter, output_version_format, start_time, and end_time.
2035 * The updated filter might also have a new writer_identity; see the
2036 * unique_writer_identity field.
1374 * 2037 *
1375 * [request] - The metadata request object. 2038 * [request] - The metadata request object.
1376 * 2039 *
1377 * Request parameters: 2040 * Request parameters:
1378 * 2041 *
1379 * [sinkName] - Required. The resource name of the sink to update, including 2042 * [sinkName] - Required. The full resource name of the sink to update,
1380 * the parent 2043 * including the parent resource and the sink identifier:
1381 * resource and the sink identifier. If the sink does not exist, this method 2044 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1382 * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. 2045 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
2046 * Example: "projects/my-project-id/sinks/my-sink-id".
1383 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 2047 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
1384 * 2048 *
1385 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 2049 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of
1386 * service account returned 2050 * this field. When updating a sink, the effect of this field on the value of
1387 * in the sink's writer_identity. Set this field to be true to export 2051 * writer_identity in the updated sink depends on both the old and new values
1388 * logs from one project to a different project. This field is ignored for 2052 * of this field:
1389 * non-project sinks (e.g. organization sinks) because those sinks are 2053 * If the old and new values of this field are both false or both true, then
1390 * required to have dedicated service accounts. 2054 * there is no change to the sink's writer_identity.
2055 * If the old value was false and the new value is true, then writer_identity
2056 * is changed to a unique service account.
2057 * It is an error if the old value was true and the new value is false.
1391 * 2058 *
1392 * Completes with a [LogSink]. 2059 * Completes with a [LogSink].
1393 * 2060 *
1394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2061 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1395 * error. 2062 * error.
1396 * 2063 *
1397 * If the used [http.Client] completes with an error when making a REST call, 2064 * If the used [http.Client] completes with an error when making a REST call,
1398 * this method will complete with the same error. 2065 * this method will complete with the same error.
1399 */ 2066 */
1400 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) { 2067 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) {
(...skipping 25 matching lines...) Expand all
1426 downloadOptions: _downloadOptions); 2093 downloadOptions: _downloadOptions);
1427 return _response.then((data) => new LogSink.fromJson(data)); 2094 return _response.then((data) => new LogSink.fromJson(data));
1428 } 2095 }
1429 2096
1430 } 2097 }
1431 2098
1432 2099
1433 2100
1434 /** 2101 /**
1435 * A generic empty message that you can re-use to avoid defining duplicated 2102 * A generic empty message that you can re-use to avoid defining duplicated
1436 * empty messages in your APIs. A typical example is to use it as the request 2103 * empty messages in your APIs. A typical example is to use it as the request or
1437 * or the response type of an API method. For instance: 2104 * the response type of an API method. For instance:
1438 * 2105 * service Foo {
1439 * service Foo { 2106 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1440 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 2107 * }
1441 * } 2108 * The JSON representation for Empty is empty JSON object {}.
1442 *
1443 * The JSON representation for `Empty` is empty JSON object `{}`.
1444 */ 2109 */
1445 class Empty { 2110 class Empty {
1446 2111
1447 Empty(); 2112 Empty();
1448 2113
1449 Empty.fromJson(core.Map _json) { 2114 Empty.fromJson(core.Map _json) {
1450 } 2115 }
1451 2116
1452 core.Map toJson() { 2117 core.Map toJson() {
1453 var _json = new core.Map(); 2118 var _json = new core.Map();
1454 return _json; 2119 return _json;
1455 } 2120 }
1456 } 2121 }
1457 2122
1458 /** 2123 /**
1459 * A common proto for logging HTTP requests. Only contains semantics 2124 * A common proto for logging HTTP requests. Only contains semantics defined by
1460 * defined by the HTTP specification. Product-specific logging 2125 * the HTTP specification. Product-specific logging information MUST be defined
1461 * information MUST be defined in a separate message. 2126 * in a separate message.
1462 */ 2127 */
1463 class HttpRequest { 2128 class HttpRequest {
1464 /** 2129 /**
1465 * The number of HTTP response bytes inserted into cache. Set only when a 2130 * The number of HTTP response bytes inserted into cache. Set only when a
1466 * cache fill was attempted. 2131 * cache fill was attempted.
1467 */ 2132 */
1468 core.String cacheFillBytes; 2133 core.String cacheFillBytes;
1469 /** 2134 /**
1470 * Whether or not an entity was served from cache 2135 * Whether or not an entity was served from cache (with or without
1471 * (with or without validation). 2136 * validation).
1472 */ 2137 */
1473 core.bool cacheHit; 2138 core.bool cacheHit;
1474 /** Whether or not a cache lookup was attempted. */ 2139 /** Whether or not a cache lookup was attempted. */
1475 core.bool cacheLookup; 2140 core.bool cacheLookup;
1476 /** 2141 /**
1477 * Whether or not the response was validated with the origin server before 2142 * Whether or not the response was validated with the origin server before
1478 * being served from cache. This field is only meaningful if `cache_hit` is 2143 * being served from cache. This field is only meaningful if cache_hit is
1479 * True. 2144 * True.
1480 */ 2145 */
1481 core.bool cacheValidatedWithOriginServer; 2146 core.bool cacheValidatedWithOriginServer;
1482 /** 2147 /**
1483 * The request processing latency on the server, from the time the request was 2148 * The request processing latency on the server, from the time the request was
1484 * received until the response was sent. 2149 * received until the response was sent.
1485 */ 2150 */
1486 core.String latency; 2151 core.String latency;
1487 /** 2152 /**
1488 * The referer URL of the request, as defined in 2153 * The referer URL of the request, as defined in HTTP/1.1 Header Field
1489 * [HTTP/1.1 Header Field 2154 * Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1490 * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1491 */ 2155 */
1492 core.String referer; 2156 core.String referer;
1493 /** 2157 /**
1494 * The IP address (IPv4 or IPv6) of the client that issued the HTTP 2158 * The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
1495 * request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. 2159 * Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
1496 */ 2160 */
1497 core.String remoteIp; 2161 core.String remoteIp;
1498 /** The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. */ 2162 /** The request method. Examples: "GET", "HEAD", "PUT", "POST". */
1499 core.String requestMethod; 2163 core.String requestMethod;
1500 /** 2164 /**
1501 * The size of the HTTP request message in bytes, including the request 2165 * The size of the HTTP request message in bytes, including the request
1502 * headers and the request body. 2166 * headers and the request body.
1503 */ 2167 */
1504 core.String requestSize; 2168 core.String requestSize;
1505 /** 2169 /**
1506 * The scheme (http, https), the host name, the path and the query 2170 * The scheme (http, https), the host name, the path and the query portion of
1507 * portion of the URL that was requested. 2171 * the URL that was requested. Example:
1508 * Example: `"http://example.com/some/info?color=red"`. 2172 * "http://example.com/some/info?color=red".
1509 */ 2173 */
1510 core.String requestUrl; 2174 core.String requestUrl;
1511 /** 2175 /**
1512 * The size of the HTTP response message sent back to the client, in bytes, 2176 * The size of the HTTP response message sent back to the client, in bytes,
1513 * including the response headers and the response body. 2177 * including the response headers and the response body.
1514 */ 2178 */
1515 core.String responseSize; 2179 core.String responseSize;
1516 /** 2180 /**
1517 * The IP address (IPv4 or IPv6) of the origin server that the request was 2181 * The IP address (IPv4 or IPv6) of the origin server that the request was
1518 * sent to. 2182 * sent to.
1519 */ 2183 */
1520 core.String serverIp; 2184 core.String serverIp;
1521 /** 2185 /**
1522 * The response code indicating the status of response. 2186 * The response code indicating the status of response. Examples: 200, 404.
1523 * Examples: 200, 404.
1524 */ 2187 */
1525 core.int status; 2188 core.int status;
1526 /** 2189 /**
1527 * The user agent sent by the client. Example: 2190 * The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE
1528 * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 2191 * 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
1529 * 1.0.3705)"`.
1530 */ 2192 */
1531 core.String userAgent; 2193 core.String userAgent;
1532 2194
1533 HttpRequest(); 2195 HttpRequest();
1534 2196
1535 HttpRequest.fromJson(core.Map _json) { 2197 HttpRequest.fromJson(core.Map _json) {
1536 if (_json.containsKey("cacheFillBytes")) { 2198 if (_json.containsKey("cacheFillBytes")) {
1537 cacheFillBytes = _json["cacheFillBytes"]; 2199 cacheFillBytes = _json["cacheFillBytes"];
1538 } 2200 }
1539 if (_json.containsKey("cacheHit")) { 2201 if (_json.containsKey("cacheHit")) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 if (key != null) { 2324 if (key != null) {
1663 _json["key"] = key; 2325 _json["key"] = key;
1664 } 2326 }
1665 if (valueType != null) { 2327 if (valueType != null) {
1666 _json["valueType"] = valueType; 2328 _json["valueType"] = valueType;
1667 } 2329 }
1668 return _json; 2330 return _json;
1669 } 2331 }
1670 } 2332 }
1671 2333
1672 /** The parameters to `ListLogEntries`. */ 2334 /** The parameters to ListLogEntries. */
1673 class ListLogEntriesRequest { 2335 class ListLogEntriesRequest {
1674 /** 2336 /**
1675 * Optional. A filter that chooses which log entries to return. See [Advanced 2337 * Optional. A filter that chooses which log entries to return. See Advanced
1676 * Logs Filters](/logging/docs/view/advanced_filters). Only log entries that 2338 * Logs Filters. Only log entries that match the filter are returned. An empty
1677 * match the filter are returned. An empty filter matches all log entries. 2339 * filter matches all log entries in the resources listed in resource_names.
2340 * Referencing a parent resource that is not listed in resource_names will
2341 * cause the filter to return no results. The maximum length of the filter is
2342 * 20000 characters.
1678 */ 2343 */
1679 core.String filter; 2344 core.String filter;
1680 /** 2345 /**
1681 * Optional. How the results should be sorted. Presently, the only permitted 2346 * Optional. How the results should be sorted. Presently, the only permitted
1682 * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first 2347 * values are "timestamp asc" (default) and "timestamp desc". The first option
1683 * option returns entries in order of increasing values of 2348 * returns entries in order of increasing values of LogEntry.timestamp (oldest
1684 * `LogEntry.timestamp` (oldest first), and the second option returns entries 2349 * first), and the second option returns entries in order of decreasing
1685 * in order of decreasing timestamps (newest first). Entries with equal 2350 * timestamps (newest first). Entries with equal timestamps are returned in
1686 * timestamps are returned in order of `LogEntry.insertId`. 2351 * order of LogEntry.insertId.
1687 */ 2352 */
1688 core.String orderBy; 2353 core.String orderBy;
1689 /** 2354 /**
1690 * Optional. The maximum number of results to return from this request. 2355 * Optional. The maximum number of results to return from this request.
1691 * Non-positive values are ignored. The presence of `nextPageToken` in the 2356 * Non-positive values are ignored. The presence of nextPageToken in the
1692 * response indicates that more results might be available. 2357 * response indicates that more results might be available.
1693 */ 2358 */
1694 core.int pageSize; 2359 core.int pageSize;
1695 /** 2360 /**
1696 * Optional. If present, then retrieve the next batch of results from the 2361 * Optional. If present, then retrieve the next batch of results from the
1697 * preceding call to this method. `pageToken` must be the value of 2362 * preceding call to this method. pageToken must be the value of nextPageToken
1698 * `nextPageToken` from the previous response. The values of other method 2363 * from the previous response. The values of other method parameters should be
1699 * parameters should be identical to those in the previous call. 2364 * identical to those in the previous call.
1700 */ 2365 */
1701 core.String pageToken; 2366 core.String pageToken;
1702 /** 2367 /**
1703 * Deprecated. One or more project identifiers or project numbers from which 2368 * Deprecated. Use resource_names instead. One or more project identifiers or
1704 * to retrieve log entries. Examples: `"my-project-1A"`, `"1234567890"`. If 2369 * project numbers from which to retrieve log entries. Example:
1705 * present, these project identifiers are converted to resource format and 2370 * "my-project-1A". If present, these project identifiers are converted to
1706 * added to the list of resources in `resourceNames`. Callers should use 2371 * resource name format and added to the list of resources in resource_names.
1707 * `resourceNames` rather than this parameter.
1708 */ 2372 */
1709 core.List<core.String> projectIds; 2373 core.List<core.String> projectIds;
1710 /** 2374 /**
1711 * Required. One or more cloud resources from which to retrieve log entries. 2375 * Required. Names of one or more resources from which to retrieve log
1712 * Example: `"projects/my-project-1A"`, `"projects/1234567890"`. Projects 2376 * entries:
1713 * listed in `projectIds` are added to this list. 2377 * "projects/[PROJECT_ID]"
2378 * "organizations/[ORGANIZATION_ID]"
2379 * Projects listed in the project_ids field are added to this list.
1714 */ 2380 */
1715 core.List<core.String> resourceNames; 2381 core.List<core.String> resourceNames;
1716 2382
1717 ListLogEntriesRequest(); 2383 ListLogEntriesRequest();
1718 2384
1719 ListLogEntriesRequest.fromJson(core.Map _json) { 2385 ListLogEntriesRequest.fromJson(core.Map _json) {
1720 if (_json.containsKey("filter")) { 2386 if (_json.containsKey("filter")) {
1721 filter = _json["filter"]; 2387 filter = _json["filter"];
1722 } 2388 }
1723 if (_json.containsKey("orderBy")) { 2389 if (_json.containsKey("orderBy")) {
(...skipping 30 matching lines...) Expand all
1754 if (projectIds != null) { 2420 if (projectIds != null) {
1755 _json["projectIds"] = projectIds; 2421 _json["projectIds"] = projectIds;
1756 } 2422 }
1757 if (resourceNames != null) { 2423 if (resourceNames != null) {
1758 _json["resourceNames"] = resourceNames; 2424 _json["resourceNames"] = resourceNames;
1759 } 2425 }
1760 return _json; 2426 return _json;
1761 } 2427 }
1762 } 2428 }
1763 2429
1764 /** Result returned from `ListLogEntries`. */ 2430 /** Result returned from ListLogEntries. */
1765 class ListLogEntriesResponse { 2431 class ListLogEntriesResponse {
1766 /** A list of log entries. */ 2432 /** A list of log entries. */
1767 core.List<LogEntry> entries; 2433 core.List<LogEntry> entries;
1768 /** 2434 /**
1769 * If there might be more results than appear in this response, then 2435 * If there might be more results than those appearing in this response, then
1770 * `nextPageToken` is included. To get the next set of results, call this 2436 * nextPageToken is included. To get the next set of results, call this method
1771 * method again using the value of `nextPageToken` as `pageToken`. 2437 * again using the value of nextPageToken as pageToken.If a value for
2438 * next_page_token appears and the entries field is empty, it means that the
2439 * search found no log entries so far but it did not have time to search all
2440 * the possible log entries. Retry the method with this value for page_token
2441 * to continue the search. Alternatively, consider speeding up the search by
2442 * changing your filter to specify a single log name or resource type, or to
2443 * narrow the time range of the search.
1772 */ 2444 */
1773 core.String nextPageToken; 2445 core.String nextPageToken;
1774 2446
1775 ListLogEntriesResponse(); 2447 ListLogEntriesResponse();
1776 2448
1777 ListLogEntriesResponse.fromJson(core.Map _json) { 2449 ListLogEntriesResponse.fromJson(core.Map _json) {
1778 if (_json.containsKey("entries")) { 2450 if (_json.containsKey("entries")) {
1779 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List(); 2451 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List();
1780 } 2452 }
1781 if (_json.containsKey("nextPageToken")) { 2453 if (_json.containsKey("nextPageToken")) {
(...skipping 12 matching lines...) Expand all
1794 return _json; 2466 return _json;
1795 } 2467 }
1796 } 2468 }
1797 2469
1798 /** Result returned from ListLogMetrics. */ 2470 /** Result returned from ListLogMetrics. */
1799 class ListLogMetricsResponse { 2471 class ListLogMetricsResponse {
1800 /** A list of logs-based metrics. */ 2472 /** A list of logs-based metrics. */
1801 core.List<LogMetric> metrics; 2473 core.List<LogMetric> metrics;
1802 /** 2474 /**
1803 * If there might be more results than appear in this response, then 2475 * If there might be more results than appear in this response, then
1804 * `nextPageToken` is included. To get the next set of results, call this 2476 * nextPageToken is included. To get the next set of results, call this method
1805 * method again using the value of `nextPageToken` as `pageToken`. 2477 * again using the value of nextPageToken as pageToken.
1806 */ 2478 */
1807 core.String nextPageToken; 2479 core.String nextPageToken;
1808 2480
1809 ListLogMetricsResponse(); 2481 ListLogMetricsResponse();
1810 2482
1811 ListLogMetricsResponse.fromJson(core.Map _json) { 2483 ListLogMetricsResponse.fromJson(core.Map _json) {
1812 if (_json.containsKey("metrics")) { 2484 if (_json.containsKey("metrics")) {
1813 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t oList(); 2485 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t oList();
1814 } 2486 }
1815 if (_json.containsKey("nextPageToken")) { 2487 if (_json.containsKey("nextPageToken")) {
1816 nextPageToken = _json["nextPageToken"]; 2488 nextPageToken = _json["nextPageToken"];
1817 } 2489 }
1818 } 2490 }
1819 2491
1820 core.Map toJson() { 2492 core.Map toJson() {
1821 var _json = new core.Map(); 2493 var _json = new core.Map();
1822 if (metrics != null) { 2494 if (metrics != null) {
1823 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); 2495 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
1824 } 2496 }
1825 if (nextPageToken != null) { 2497 if (nextPageToken != null) {
1826 _json["nextPageToken"] = nextPageToken; 2498 _json["nextPageToken"] = nextPageToken;
1827 } 2499 }
1828 return _json; 2500 return _json;
1829 } 2501 }
1830 } 2502 }
1831 2503
2504 /** Result returned from ListLogs. */
2505 class ListLogsResponse {
2506 /**
2507 * A list of log names. For example, "projects/my-project/syslog" or
2508 * "organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
2509 */
2510 core.List<core.String> logNames;
2511 /**
2512 * If there might be more results than those appearing in this response, then
2513 * nextPageToken is included. To get the next set of results, call this method
2514 * again using the value of nextPageToken as pageToken.
2515 */
2516 core.String nextPageToken;
2517
2518 ListLogsResponse();
2519
2520 ListLogsResponse.fromJson(core.Map _json) {
2521 if (_json.containsKey("logNames")) {
2522 logNames = _json["logNames"];
2523 }
2524 if (_json.containsKey("nextPageToken")) {
2525 nextPageToken = _json["nextPageToken"];
2526 }
2527 }
2528
2529 core.Map toJson() {
2530 var _json = new core.Map();
2531 if (logNames != null) {
2532 _json["logNames"] = logNames;
2533 }
2534 if (nextPageToken != null) {
2535 _json["nextPageToken"] = nextPageToken;
2536 }
2537 return _json;
2538 }
2539 }
2540
1832 /** Result returned from ListMonitoredResourceDescriptors. */ 2541 /** Result returned from ListMonitoredResourceDescriptors. */
1833 class ListMonitoredResourceDescriptorsResponse { 2542 class ListMonitoredResourceDescriptorsResponse {
1834 /** 2543 /**
1835 * If there might be more results than appear in this response, then 2544 * If there might be more results than those appearing in this response, then
1836 * `nextPageToken` is included. To get the next set of results, call this 2545 * nextPageToken is included. To get the next set of results, call this method
1837 * method again using the value of `nextPageToken` as `pageToken`. 2546 * again using the value of nextPageToken as pageToken.
1838 */ 2547 */
1839 core.String nextPageToken; 2548 core.String nextPageToken;
1840 /** A list of resource descriptors. */ 2549 /** A list of resource descriptors. */
1841 core.List<MonitoredResourceDescriptor> resourceDescriptors; 2550 core.List<MonitoredResourceDescriptor> resourceDescriptors;
1842 2551
1843 ListMonitoredResourceDescriptorsResponse(); 2552 ListMonitoredResourceDescriptorsResponse();
1844 2553
1845 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { 2554 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) {
1846 if (_json.containsKey("nextPageToken")) { 2555 if (_json.containsKey("nextPageToken")) {
1847 nextPageToken = _json["nextPageToken"]; 2556 nextPageToken = _json["nextPageToken"];
1848 } 2557 }
1849 if (_json.containsKey("resourceDescriptors")) { 2558 if (_json.containsKey("resourceDescriptors")) {
1850 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni toredResourceDescriptor.fromJson(value)).toList(); 2559 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni toredResourceDescriptor.fromJson(value)).toList();
1851 } 2560 }
1852 } 2561 }
1853 2562
1854 core.Map toJson() { 2563 core.Map toJson() {
1855 var _json = new core.Map(); 2564 var _json = new core.Map();
1856 if (nextPageToken != null) { 2565 if (nextPageToken != null) {
1857 _json["nextPageToken"] = nextPageToken; 2566 _json["nextPageToken"] = nextPageToken;
1858 } 2567 }
1859 if (resourceDescriptors != null) { 2568 if (resourceDescriptors != null) {
1860 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value). toJson()).toList(); 2569 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value). toJson()).toList();
1861 } 2570 }
1862 return _json; 2571 return _json;
1863 } 2572 }
1864 } 2573 }
1865 2574
1866 /** Result returned from `ListSinks`. */ 2575 /** Result returned from ListSinks. */
1867 class ListSinksResponse { 2576 class ListSinksResponse {
1868 /** 2577 /**
1869 * If there might be more results than appear in this response, then 2578 * If there might be more results than appear in this response, then
1870 * `nextPageToken` is included. To get the next set of results, call the same 2579 * nextPageToken is included. To get the next set of results, call the same
1871 * method again using the value of `nextPageToken` as `pageToken`. 2580 * method again using the value of nextPageToken as pageToken.
1872 */ 2581 */
1873 core.String nextPageToken; 2582 core.String nextPageToken;
1874 /** A list of sinks. */ 2583 /** A list of sinks. */
1875 core.List<LogSink> sinks; 2584 core.List<LogSink> sinks;
1876 2585
1877 ListSinksResponse(); 2586 ListSinksResponse();
1878 2587
1879 ListSinksResponse.fromJson(core.Map _json) { 2588 ListSinksResponse.fromJson(core.Map _json) {
1880 if (_json.containsKey("nextPageToken")) { 2589 if (_json.containsKey("nextPageToken")) {
1881 nextPageToken = _json["nextPageToken"]; 2590 nextPageToken = _json["nextPageToken"];
(...skipping 11 matching lines...) Expand all
1893 if (sinks != null) { 2602 if (sinks != null) {
1894 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); 2603 _json["sinks"] = sinks.map((value) => (value).toJson()).toList();
1895 } 2604 }
1896 return _json; 2605 return _json;
1897 } 2606 }
1898 } 2607 }
1899 2608
1900 /** An individual entry in a log. */ 2609 /** An individual entry in a log. */
1901 class LogEntry { 2610 class LogEntry {
1902 /** 2611 /**
1903 * Optional. Information about the HTTP request associated with this 2612 * Optional. Information about the HTTP request associated with this log
1904 * log entry, if applicable. 2613 * entry, if applicable.
1905 */ 2614 */
1906 HttpRequest httpRequest; 2615 HttpRequest httpRequest;
1907 /** 2616 /**
1908 * Optional. A unique ID for the log entry. If you provide this 2617 * Optional. A unique ID for the log entry. If you provide this field, the
1909 * field, the logging service considers other log entries in the 2618 * logging service considers other log entries in the same project with the
1910 * same project with the same ID as duplicates which can be removed. If 2619 * same ID as duplicates which can be removed. If omitted, Stackdriver Logging
1911 * omitted, Stackdriver Logging will generate a unique ID for this 2620 * will generate a unique ID for this log entry.
1912 * log entry.
1913 */ 2621 */
1914 core.String insertId; 2622 core.String insertId;
1915 /** 2623 /**
1916 * The log entry payload, represented as a structure that 2624 * The log entry payload, represented as a structure that is expressed as a
1917 * is expressed as a JSON object. 2625 * JSON object.
1918 * 2626 *
1919 * The values for Object must be JSON objects. It can consist of `num`, 2627 * The values for Object must be JSON objects. It can consist of `num`,
1920 * `String`, `bool` and `null` as well as `Map` and `List` values. 2628 * `String`, `bool` and `null` as well as `Map` and `List` values.
1921 */ 2629 */
1922 core.Map<core.String, core.Object> jsonPayload; 2630 core.Map<core.String, core.Object> jsonPayload;
1923 /** 2631 /**
1924 * Optional. A set of user-defined (key, value) data that provides additional 2632 * Optional. A set of user-defined (key, value) data that provides additional
1925 * information about the log entry. 2633 * information about the log entry.
1926 */ 2634 */
1927 core.Map<core.String, core.String> labels; 2635 core.Map<core.String, core.String> labels;
1928 /** 2636 /**
1929 * Required. The resource name of the log to which this log entry 2637 * Required. The resource name of the log to which this log entry belongs:
1930 * belongs. The format of the name is 2638 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
1931 * `"projects/<project-id>/logs/<log-id>"`. Examples: 2639 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1932 * `"projects/my-projectid/logs/syslog"`, 2640 * [LOG_ID] must be URL-encoded within log_name. Example:
1933 * `"projects/my-projectid/logs/library.googleapis.com%2Fbook_log"`. 2641 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
1934 * 2642 * [LOG_ID] must be less than 512 characters long and can only include the
1935 * The log ID part of resource name must be less than 512 characters 2643 * following characters: upper and lower case alphanumeric characters,
1936 * long and can only include the following characters: upper and 2644 * forward-slash, underscore, hyphen, and period.For backward compatibility,
1937 * lower case alphanumeric characters: [A-Za-z0-9]; and punctuation 2645 * if log_name begins with a forward-slash, such as /projects/..., then the
1938 * characters: forward-slash, underscore, hyphen, and period. 2646 * log entry is ingested as usual but the forward-slash is removed. Listing
1939 * Forward-slash (`/`) characters in the log ID must be URL-encoded. 2647 * the log entry will not show the leading slash and filtering for a log name
2648 * with a leading slash will never return any results.
1940 */ 2649 */
1941 core.String logName; 2650 core.String logName;
1942 /** 2651 /**
1943 * Optional. Information about an operation associated with the log entry, if 2652 * Optional. Information about an operation associated with the log entry, if
1944 * applicable. 2653 * applicable.
1945 */ 2654 */
1946 LogEntryOperation operation; 2655 LogEntryOperation operation;
1947 /** 2656 /**
1948 * The log entry payload, represented as a protocol buffer. Some 2657 * The log entry payload, represented as a protocol buffer. Some Google Cloud
1949 * Google Cloud Platform services use this field for their log 2658 * Platform services use this field for their log entry payloads.
1950 * entry payloads.
1951 * 2659 *
1952 * The values for Object must be JSON objects. It can consist of `num`, 2660 * The values for Object must be JSON objects. It can consist of `num`,
1953 * `String`, `bool` and `null` as well as `Map` and `List` values. 2661 * `String`, `bool` and `null` as well as `Map` and `List` values.
1954 */ 2662 */
1955 core.Map<core.String, core.Object> protoPayload; 2663 core.Map<core.String, core.Object> protoPayload;
1956 /** 2664 /**
1957 * Required. The monitored resource associated with this log entry. 2665 * Required. The monitored resource associated with this log entry. Example: a
1958 * Example: a log entry that reports a database error would be 2666 * log entry that reports a database error would be associated with the
1959 * associated with the monitored resource designating the particular 2667 * monitored resource designating the particular database that reported the
1960 * database that reported the error. 2668 * error.
1961 */ 2669 */
1962 MonitoredResource resource; 2670 MonitoredResource resource;
1963 /** 2671 /**
1964 * Optional. The severity of the log entry. The default value is 2672 * Optional. The severity of the log entry. The default value is
1965 * `LogSeverity.DEFAULT`. 2673 * LogSeverity.DEFAULT.
1966 * Possible string values are: 2674 * Possible string values are:
1967 * - "DEFAULT" : (0) The log entry has no assigned severity level. 2675 * - "DEFAULT" : (0) The log entry has no assigned severity level.
1968 * - "DEBUG" : (100) Debug or trace information. 2676 * - "DEBUG" : (100) Debug or trace information.
1969 * - "INFO" : (200) Routine information, such as ongoing status or 2677 * - "INFO" : (200) Routine information, such as ongoing status or
1970 * performance. 2678 * performance.
1971 * - "NOTICE" : (300) Normal but significant events, such as start up, shut 2679 * - "NOTICE" : (300) Normal but significant events, such as start up, shut
1972 * down, or 2680 * down, or a configuration change.
1973 * a configuration change.
1974 * - "WARNING" : (400) Warning events might cause problems. 2681 * - "WARNING" : (400) Warning events might cause problems.
1975 * - "ERROR" : (500) Error events are likely to cause problems. 2682 * - "ERROR" : (500) Error events are likely to cause problems.
1976 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. 2683 * - "CRITICAL" : (600) Critical events cause more severe problems or outages.
1977 * - "ALERT" : (700) A person must take an action immediately. 2684 * - "ALERT" : (700) A person must take an action immediately.
1978 * - "EMERGENCY" : (800) One or more systems are unusable. 2685 * - "EMERGENCY" : (800) One or more systems are unusable.
1979 */ 2686 */
1980 core.String severity; 2687 core.String severity;
2688 /**
2689 * Optional. Source code location information associated with the log entry,
2690 * if any.
2691 */
2692 LogEntrySourceLocation sourceLocation;
1981 /** The log entry payload, represented as a Unicode string (UTF-8). */ 2693 /** The log entry payload, represented as a Unicode string (UTF-8). */
1982 core.String textPayload; 2694 core.String textPayload;
1983 /** 2695 /**
1984 * Optional. The time the event described by the log entry occurred. If 2696 * Optional. The time the event described by the log entry occurred. If
1985 * omitted, Stackdriver Logging will use the time the log entry is received. 2697 * omitted, Stackdriver Logging will use the time the log entry is received.
1986 */ 2698 */
1987 core.String timestamp; 2699 core.String timestamp;
2700 /**
2701 * Optional. Resource name of the trace associated with the log entry, if any.
2702 * If it contains a relative resource name, the name is assumed to be relative
2703 * to //tracing.googleapis.com. Example:
2704 * projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
2705 */
2706 core.String trace;
1988 2707
1989 LogEntry(); 2708 LogEntry();
1990 2709
1991 LogEntry.fromJson(core.Map _json) { 2710 LogEntry.fromJson(core.Map _json) {
1992 if (_json.containsKey("httpRequest")) { 2711 if (_json.containsKey("httpRequest")) {
1993 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); 2712 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]);
1994 } 2713 }
1995 if (_json.containsKey("insertId")) { 2714 if (_json.containsKey("insertId")) {
1996 insertId = _json["insertId"]; 2715 insertId = _json["insertId"];
1997 } 2716 }
(...skipping 11 matching lines...) Expand all
2009 } 2728 }
2010 if (_json.containsKey("protoPayload")) { 2729 if (_json.containsKey("protoPayload")) {
2011 protoPayload = _json["protoPayload"]; 2730 protoPayload = _json["protoPayload"];
2012 } 2731 }
2013 if (_json.containsKey("resource")) { 2732 if (_json.containsKey("resource")) {
2014 resource = new MonitoredResource.fromJson(_json["resource"]); 2733 resource = new MonitoredResource.fromJson(_json["resource"]);
2015 } 2734 }
2016 if (_json.containsKey("severity")) { 2735 if (_json.containsKey("severity")) {
2017 severity = _json["severity"]; 2736 severity = _json["severity"];
2018 } 2737 }
2738 if (_json.containsKey("sourceLocation")) {
2739 sourceLocation = new LogEntrySourceLocation.fromJson(_json["sourceLocation "]);
2740 }
2019 if (_json.containsKey("textPayload")) { 2741 if (_json.containsKey("textPayload")) {
2020 textPayload = _json["textPayload"]; 2742 textPayload = _json["textPayload"];
2021 } 2743 }
2022 if (_json.containsKey("timestamp")) { 2744 if (_json.containsKey("timestamp")) {
2023 timestamp = _json["timestamp"]; 2745 timestamp = _json["timestamp"];
2024 } 2746 }
2747 if (_json.containsKey("trace")) {
2748 trace = _json["trace"];
2749 }
2025 } 2750 }
2026 2751
2027 core.Map toJson() { 2752 core.Map toJson() {
2028 var _json = new core.Map(); 2753 var _json = new core.Map();
2029 if (httpRequest != null) { 2754 if (httpRequest != null) {
2030 _json["httpRequest"] = (httpRequest).toJson(); 2755 _json["httpRequest"] = (httpRequest).toJson();
2031 } 2756 }
2032 if (insertId != null) { 2757 if (insertId != null) {
2033 _json["insertId"] = insertId; 2758 _json["insertId"] = insertId;
2034 } 2759 }
(...skipping 11 matching lines...) Expand all
2046 } 2771 }
2047 if (protoPayload != null) { 2772 if (protoPayload != null) {
2048 _json["protoPayload"] = protoPayload; 2773 _json["protoPayload"] = protoPayload;
2049 } 2774 }
2050 if (resource != null) { 2775 if (resource != null) {
2051 _json["resource"] = (resource).toJson(); 2776 _json["resource"] = (resource).toJson();
2052 } 2777 }
2053 if (severity != null) { 2778 if (severity != null) {
2054 _json["severity"] = severity; 2779 _json["severity"] = severity;
2055 } 2780 }
2781 if (sourceLocation != null) {
2782 _json["sourceLocation"] = (sourceLocation).toJson();
2783 }
2056 if (textPayload != null) { 2784 if (textPayload != null) {
2057 _json["textPayload"] = textPayload; 2785 _json["textPayload"] = textPayload;
2058 } 2786 }
2059 if (timestamp != null) { 2787 if (timestamp != null) {
2060 _json["timestamp"] = timestamp; 2788 _json["timestamp"] = timestamp;
2061 } 2789 }
2790 if (trace != null) {
2791 _json["trace"] = trace;
2792 }
2062 return _json; 2793 return _json;
2063 } 2794 }
2064 } 2795 }
2065 2796
2066 /** 2797 /**
2067 * Additional information about a potentially long-running operation with which 2798 * Additional information about a potentially long-running operation with which
2068 * a log entry is associated. 2799 * a log entry is associated.
2069 */ 2800 */
2070 class LogEntryOperation { 2801 class LogEntryOperation {
2071 /** 2802 /**
2072 * Optional. Set this to True if this is the first log entry in the operation. 2803 * Optional. Set this to True if this is the first log entry in the operation.
2073 */ 2804 */
2074 core.bool first; 2805 core.bool first;
2075 /** 2806 /**
2076 * Optional. An arbitrary operation identifier. Log entries with the 2807 * Optional. An arbitrary operation identifier. Log entries with the same
2077 * same identifier are assumed to be part of the same operation. 2808 * identifier are assumed to be part of the same operation.
2078 */ 2809 */
2079 core.String id; 2810 core.String id;
2080 /** 2811 /**
2081 * Optional. Set this to True if this is the last log entry in the operation. 2812 * Optional. Set this to True if this is the last log entry in the operation.
2082 */ 2813 */
2083 core.bool last; 2814 core.bool last;
2084 /** 2815 /**
2085 * Optional. An arbitrary producer identifier. The combination of 2816 * Optional. An arbitrary producer identifier. The combination of id and
2086 * `id` and `producer` must be globally unique. Examples for `producer`: 2817 * producer must be globally unique. Examples for producer:
2087 * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. 2818 * "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".
2088 */ 2819 */
2089 core.String producer; 2820 core.String producer;
2090 2821
2091 LogEntryOperation(); 2822 LogEntryOperation();
2092 2823
2093 LogEntryOperation.fromJson(core.Map _json) { 2824 LogEntryOperation.fromJson(core.Map _json) {
2094 if (_json.containsKey("first")) { 2825 if (_json.containsKey("first")) {
2095 first = _json["first"]; 2826 first = _json["first"];
2096 } 2827 }
2097 if (_json.containsKey("id")) { 2828 if (_json.containsKey("id")) {
(...skipping 18 matching lines...) Expand all
2116 if (last != null) { 2847 if (last != null) {
2117 _json["last"] = last; 2848 _json["last"] = last;
2118 } 2849 }
2119 if (producer != null) { 2850 if (producer != null) {
2120 _json["producer"] = producer; 2851 _json["producer"] = producer;
2121 } 2852 }
2122 return _json; 2853 return _json;
2123 } 2854 }
2124 } 2855 }
2125 2856
2857 /**
2858 * Additional information about the source code location that produced the log
2859 * entry.
2860 */
2861 class LogEntrySourceLocation {
2862 /**
2863 * Optional. Source file name. Depending on the runtime environment, this
2864 * might be a simple name or a fully-qualified name.
2865 */
2866 core.String file;
2867 /**
2868 * Optional. Human-readable name of the function or method being invoked, with
2869 * optional context such as the class or package name. This information may be
2870 * used in contexts such as the logs viewer, where a file and line number are
2871 * less meaningful. The format can vary by language. For example:
2872 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
2873 */
2874 core.String function;
2875 /**
2876 * Optional. Line within the source file. 1-based; 0 indicates no line number
2877 * available.
2878 */
2879 core.String line;
2880
2881 LogEntrySourceLocation();
2882
2883 LogEntrySourceLocation.fromJson(core.Map _json) {
2884 if (_json.containsKey("file")) {
2885 file = _json["file"];
2886 }
2887 if (_json.containsKey("function")) {
2888 function = _json["function"];
2889 }
2890 if (_json.containsKey("line")) {
2891 line = _json["line"];
2892 }
2893 }
2894
2895 core.Map toJson() {
2896 var _json = new core.Map();
2897 if (file != null) {
2898 _json["file"] = file;
2899 }
2900 if (function != null) {
2901 _json["function"] = function;
2902 }
2903 if (line != null) {
2904 _json["line"] = line;
2905 }
2906 return _json;
2907 }
2908 }
2909
2126 /** Application log line emitted while processing a request. */ 2910 /** Application log line emitted while processing a request. */
2127 class LogLine { 2911 class LogLine {
2128 /** App-provided log message. */ 2912 /** App-provided log message. */
2129 core.String logMessage; 2913 core.String logMessage;
2130 /** 2914 /**
2131 * Severity of this log entry. 2915 * Severity of this log entry.
2132 * Possible string values are: 2916 * Possible string values are:
2133 * - "DEFAULT" : (0) The log entry has no assigned severity level. 2917 * - "DEFAULT" : (0) The log entry has no assigned severity level.
2134 * - "DEBUG" : (100) Debug or trace information. 2918 * - "DEBUG" : (100) Debug or trace information.
2135 * - "INFO" : (200) Routine information, such as ongoing status or 2919 * - "INFO" : (200) Routine information, such as ongoing status or
2136 * performance. 2920 * performance.
2137 * - "NOTICE" : (300) Normal but significant events, such as start up, shut 2921 * - "NOTICE" : (300) Normal but significant events, such as start up, shut
2138 * down, or 2922 * down, or a configuration change.
2139 * a configuration change.
2140 * - "WARNING" : (400) Warning events might cause problems. 2923 * - "WARNING" : (400) Warning events might cause problems.
2141 * - "ERROR" : (500) Error events are likely to cause problems. 2924 * - "ERROR" : (500) Error events are likely to cause problems.
2142 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. 2925 * - "CRITICAL" : (600) Critical events cause more severe problems or outages.
2143 * - "ALERT" : (700) A person must take an action immediately. 2926 * - "ALERT" : (700) A person must take an action immediately.
2144 * - "EMERGENCY" : (800) One or more systems are unusable. 2927 * - "EMERGENCY" : (800) One or more systems are unusable.
2145 */ 2928 */
2146 core.String severity; 2929 core.String severity;
2147 /** Where in the source code this log message was written. */ 2930 /** Where in the source code this log message was written. */
2148 SourceLocation sourceLocation; 2931 SourceLocation sourceLocation;
2149 /** Approximate time when this log entry was made. */ 2932 /** Approximate time when this log entry was made. */
(...skipping 28 matching lines...) Expand all
2178 _json["sourceLocation"] = (sourceLocation).toJson(); 2961 _json["sourceLocation"] = (sourceLocation).toJson();
2179 } 2962 }
2180 if (time != null) { 2963 if (time != null) {
2181 _json["time"] = time; 2964 _json["time"] = time;
2182 } 2965 }
2183 return _json; 2966 return _json;
2184 } 2967 }
2185 } 2968 }
2186 2969
2187 /** 2970 /**
2188 * Describes a logs-based metric. The value of the metric is the 2971 * Describes a logs-based metric. The value of the metric is the number of log
2189 * number of log entries that match a logs filter. 2972 * entries that match a logs filter in a given time interval.
2190 */ 2973 */
2191 class LogMetric { 2974 class LogMetric {
2192 /** 2975 /**
2193 * Optional. A description of this metric, which is used in documentation. 2976 * Optional. A description of this metric, which is used in documentation.
2194 */ 2977 */
2195 core.String description; 2978 core.String description;
2196 /** 2979 /**
2197 * Required. An [advanced logs filter](/logging/docs/view/advanced_filters). 2980 * Required. An advanced logs filter which is used to match log entries.
2198 * Example: `"resource.type=gae_app AND severity>=ERROR"`. 2981 * Example:
2982 * "resource.type=gae_app AND severity>=ERROR"
2983 * The maximum length of the filter is 20000 characters.
2199 */ 2984 */
2200 core.String filter; 2985 core.String filter;
2201 /** 2986 /**
2202 * Required. The client-assigned metric identifier. Example: 2987 * Required. The client-assigned metric identifier. Examples: "error_count",
2203 * `"severe_errors"`. Metric identifiers are limited to 100 2988 * "nginx/requests".Metric identifiers are limited to 100 characters and can
2204 * characters and can include only the following characters: `A-Z`, 2989 * include only the following characters: A-Z, a-z, 0-9, and the special
2205 * `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The 2990 * characters _-.,+!*',()%/. The forward-slash character (/) denotes a
2206 * forward-slash character (`/`) denotes a hierarchy of name pieces, 2991 * hierarchy of name pieces, and it cannot be the first character of the
2207 * and it cannot be the first character of the name. The '%' character 2992 * name.The metric identifier in this field must not be URL-encoded
2208 * is used to URL encode unsafe and reserved characters and must be 2993 * (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric
2209 * followed by two hexadecimal digits according to RFC 1738. 2994 * identifier appears as the [METRIC_ID] part of a metric_name API parameter,
2995 * then the metric identifier must be URL-encoded. Example:
2996 * "projects/my-project/metrics/nginx%2Frequests".
2210 */ 2997 */
2211 core.String name; 2998 core.String name;
2212 /** 2999 /**
2213 * Output only. The API version that created or updated this metric. 3000 * Output only. The API version that created or updated this metric. The
2214 * The version also dictates the syntax of the filter expression. When a value 3001 * version also dictates the syntax of the filter expression. When a value for
2215 * for this field is missing, the default value of V2 should be assumed. 3002 * this field is missing, the default value of V2 should be assumed.
2216 * Possible string values are: 3003 * Possible string values are:
2217 * - "V2" : Stackdriver Logging API v2. 3004 * - "V2" : Stackdriver Logging API v2.
2218 * - "V1" : Stackdriver Logging API v1. 3005 * - "V1" : Stackdriver Logging API v1.
2219 */ 3006 */
2220 core.String version; 3007 core.String version;
2221 3008
2222 LogMetric(); 3009 LogMetric();
2223 3010
2224 LogMetric.fromJson(core.Map _json) { 3011 LogMetric.fromJson(core.Map _json) {
2225 if (_json.containsKey("description")) { 3012 if (_json.containsKey("description")) {
(...skipping 22 matching lines...) Expand all
2248 _json["name"] = name; 3035 _json["name"] = name;
2249 } 3036 }
2250 if (version != null) { 3037 if (version != null) {
2251 _json["version"] = version; 3038 _json["version"] = version;
2252 } 3039 }
2253 return _json; 3040 return _json;
2254 } 3041 }
2255 } 3042 }
2256 3043
2257 /** 3044 /**
2258 * Describes a sink used to export log entries outside of Stackdriver Logging. 3045 * Describes a sink used to export log entries to one of the following
2259 * A logs filter controls which log entries are exported. Sinks can have a 3046 * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
2260 * start time and an end time; these can be used to place log entries from an 3047 * Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
2261 * exact time range into a particular destination. If both `start_time` and 3048 * The sink must be created within a project or organization.
2262 * `end_time` are present, then `start_time` must be less than `end_time`.
2263 */ 3049 */
2264 class LogSink { 3050 class LogSink {
2265 /** 3051 /**
2266 * Required. The export destination. See 3052 * Required. The export destination:
2267 * [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). 3053 * "storage.googleapis.com/[GCS_BUCKET]"
2268 * Examples: 3054 * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
2269 * 3055 * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
2270 * "storage.googleapis.com/my-gcs-bucket" 3056 * The sink's writer_identity, set when the sink is created, must have
2271 * "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset" 3057 * permission to write to the destination or else the log entries are not
2272 * "pubsub.googleapis.com/projects/my-project/topics/my-topic" 3058 * exported. For more information, see Exporting Logs With Sinks.
2273 */ 3059 */
2274 core.String destination; 3060 core.String destination;
2275 /** 3061 /**
2276 * Optional. Time at which this sink will stop exporting log entries. If this 3062 * Optional. The time at which this sink will stop exporting log entries. Log
2277 * value is present, then log entries are exported only if `entry.timestamp` < 3063 * entries are exported only if their timestamp is earlier than the end time.
2278 * `end_time`. 3064 * If this field is not supplied, there is no end time. If both a start time
3065 * and an end time are provided, then the end time must be later than the
3066 * start time.
2279 */ 3067 */
2280 core.String endTime; 3068 core.String endTime;
2281 /** 3069 /**
2282 * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). 3070 * Optional. An advanced logs filter. The only exported log entries are those
2283 * Only log entries matching the filter are exported. The filter 3071 * that are in the resource owning the sink and that match the filter. The
2284 * must be consistent with the log entry format specified by the 3072 * filter must use the log entry format specified by the output_version_format
2285 * `outputVersionFormat` parameter, regardless of the format of the 3073 * parameter. For example, in the v2 format:
2286 * log entry that was originally written to Stackdriver Logging. 3074 * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
2287 * Example filter (V2 format):
2288 *
2289 * logName=projects/my-projectid/logs/syslog AND severity>=ERROR
2290 */ 3075 */
2291 core.String filter; 3076 core.String filter;
2292 /** 3077 /**
2293 * Required. The client-assigned sink identifier, unique within the 3078 * Required. The client-assigned sink identifier, unique within the project.
2294 * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are 3079 * Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
2295 * limited to 1000 characters and can include only the following characters: 3080 * characters and can include only the following characters: upper and
2296 * `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length 3081 * lower-case alphanumeric characters, underscores, hyphens, and periods.
2297 * of the name is 100 characters.
2298 */ 3082 */
2299 core.String name; 3083 core.String name;
2300 /** 3084 /**
2301 * Optional. The log entry version to use for this sink's exported log 3085 * Optional. The log entry format to use for this sink's exported log entries.
2302 * entries. This version does not have to correspond to the version of the 3086 * The v2 format is used by default. The v1 format is deprecated and should be
2303 * log entry that was written to Stackdriver Logging. If omitted, the 3087 * used only as part of a migration effort to v2. See Migration to the v2 API.
2304 * v2 format is used.
2305 * Possible string values are: 3088 * Possible string values are:
2306 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified version format will default 3089 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified format version that will
2307 * to V2. 3090 * default to V2.
2308 * - "V2" : `LogEntry` version 2 format. 3091 * - "V2" : LogEntry version 2 format.
2309 * - "V1" : `LogEntry` version 1 format. 3092 * - "V1" : LogEntry version 1 format.
2310 */ 3093 */
2311 core.String outputVersionFormat; 3094 core.String outputVersionFormat;
2312 /** 3095 /**
2313 * Optional. The time at which this sink will begin exporting log entries. If 3096 * Optional. The time at which this sink will begin exporting log entries. Log
2314 * this value is present, then log entries are exported only if `start_time` 3097 * entries are exported only if their timestamp is not earlier than the start
2315 * <=`entry.timestamp`. 3098 * time. The default value of this field is the time the sink is created or
3099 * updated.
2316 */ 3100 */
2317 core.String startTime; 3101 core.String startTime;
2318 /** 3102 /**
2319 * Output only. An IAM identity&mdash;a service account or group&mdash;that 3103 * Output only. An IAM identity&mdash;a service account or group&mdash;under
2320 * will write exported log entries to the destination on behalf of Stackdriver 3104 * which Stackdriver Logging writes the exported log entries to the sink's
2321 * Logging. You must grant this identity write-access to the destination. 3105 * destination. This field is set by sinks.create and sinks.update, based on
2322 * Consult the destination service's documentation to determine the exact role 3106 * the setting of unique_writer_identity in those methods.Until you grant this
2323 * that must be granted. 3107 * identity write-access to the destination, log entry exports from this sink
3108 * will fail. For more information, see Granting access for a resource.
3109 * Consult the destination service's documentation to determine the
3110 * appropriate IAM roles to assign to the identity.
2324 */ 3111 */
2325 core.String writerIdentity; 3112 core.String writerIdentity;
2326 3113
2327 LogSink(); 3114 LogSink();
2328 3115
2329 LogSink.fromJson(core.Map _json) { 3116 LogSink.fromJson(core.Map _json) {
2330 if (_json.containsKey("destination")) { 3117 if (_json.containsKey("destination")) {
2331 destination = _json["destination"]; 3118 destination = _json["destination"];
2332 } 3119 }
2333 if (_json.containsKey("endTime")) { 3120 if (_json.containsKey("endTime")) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 if (writerIdentity != null) { 3160 if (writerIdentity != null) {
2374 _json["writerIdentity"] = writerIdentity; 3161 _json["writerIdentity"] = writerIdentity;
2375 } 3162 }
2376 return _json; 3163 return _json;
2377 } 3164 }
2378 } 3165 }
2379 3166
2380 /** 3167 /**
2381 * An object representing a resource that can be used for monitoring, logging, 3168 * An object representing a resource that can be used for monitoring, logging,
2382 * billing, or other purposes. Examples include virtual machine instances, 3169 * billing, or other purposes. Examples include virtual machine instances,
2383 * databases, and storage devices such as disks. The `type` field identifies a 3170 * databases, and storage devices such as disks. The type field identifies a
2384 * MonitoredResourceDescriptor object that describes the resource's 3171 * MonitoredResourceDescriptor object that describes the resource's schema.
2385 * schema. Information in the `labels` field identifies the actual resource and 3172 * Information in the labels field identifies the actual resource and its
2386 * its attributes according to the schema. For example, a particular Compute 3173 * attributes according to the schema. For example, a particular Compute Engine
2387 * Engine VM instance could be represented by the following object, because the 3174 * VM instance could be represented by the following object, because the
2388 * MonitoredResourceDescriptor for `"gce_instance"` has labels 3175 * MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and
2389 * `"instance_id"` and `"zone"`: 3176 * "zone":
2390 * 3177 * { "type": "gce_instance",
2391 * { "type": "gce_instance", 3178 * "labels": { "instance_id": "12345678901234",
2392 * "labels": { "instance_id": "12345678901234", 3179 * "zone": "us-central1-a" }}
2393 * "zone": "us-central1-a" }}
2394 */ 3180 */
2395 class MonitoredResource { 3181 class MonitoredResource {
2396 /** 3182 /**
2397 * Required. Values for all of the labels listed in the associated monitored 3183 * Required. Values for all of the labels listed in the associated monitored
2398 * resource descriptor. For example, Cloud SQL databases use the labels 3184 * resource descriptor. For example, Cloud SQL databases use the labels
2399 * `"database_id"` and `"zone"`. 3185 * "database_id" and "zone".
2400 */ 3186 */
2401 core.Map<core.String, core.String> labels; 3187 core.Map<core.String, core.String> labels;
2402 /** 3188 /**
2403 * Required. The monitored resource type. This field must match 3189 * Required. The monitored resource type. This field must match the type field
2404 * the `type` field of a MonitoredResourceDescriptor object. For 3190 * of a MonitoredResourceDescriptor object. For example, the type of a Cloud
2405 * example, the type of a Cloud SQL database is `"cloudsql_database"`. 3191 * SQL database is "cloudsql_database".
2406 */ 3192 */
2407 core.String type; 3193 core.String type;
2408 3194
2409 MonitoredResource(); 3195 MonitoredResource();
2410 3196
2411 MonitoredResource.fromJson(core.Map _json) { 3197 MonitoredResource.fromJson(core.Map _json) {
2412 if (_json.containsKey("labels")) { 3198 if (_json.containsKey("labels")) {
2413 labels = _json["labels"]; 3199 labels = _json["labels"];
2414 } 3200 }
2415 if (_json.containsKey("type")) { 3201 if (_json.containsKey("type")) {
2416 type = _json["type"]; 3202 type = _json["type"];
2417 } 3203 }
2418 } 3204 }
2419 3205
2420 core.Map toJson() { 3206 core.Map toJson() {
2421 var _json = new core.Map(); 3207 var _json = new core.Map();
2422 if (labels != null) { 3208 if (labels != null) {
2423 _json["labels"] = labels; 3209 _json["labels"] = labels;
2424 } 3210 }
2425 if (type != null) { 3211 if (type != null) {
2426 _json["type"] = type; 3212 _json["type"] = type;
2427 } 3213 }
2428 return _json; 3214 return _json;
2429 } 3215 }
2430 } 3216 }
2431 3217
2432 /** 3218 /**
2433 * An object that describes the schema of a MonitoredResource object using a 3219 * An object that describes the schema of a MonitoredResource object using a
2434 * type name and a set of labels. For example, the monitored resource 3220 * type name and a set of labels. For example, the monitored resource descriptor
2435 * descriptor for Google Compute Engine VM instances has a type of 3221 * for Google Compute Engine VM instances has a type of "gce_instance" and
2436 * `"gce_instance"` and specifies the use of the labels `"instance_id"` and 3222 * specifies the use of the labels "instance_id" and "zone" to identify
2437 * `"zone"` to identify particular VM instances. 3223 * particular VM instances.Different APIs can support different monitored
2438 * 3224 * resource types. APIs generally provide a list method that returns the
2439 * Different APIs can support different monitored resource types. APIs generally 3225 * monitored resource descriptors used by the API.
2440 * provide a `list` method that returns the monitored resource descriptors used
2441 * by the API.
2442 */ 3226 */
2443 class MonitoredResourceDescriptor { 3227 class MonitoredResourceDescriptor {
2444 /** 3228 /**
2445 * Optional. A detailed description of the monitored resource type that might 3229 * Optional. A detailed description of the monitored resource type that might
2446 * be used in documentation. 3230 * be used in documentation.
2447 */ 3231 */
2448 core.String description; 3232 core.String description;
2449 /** 3233 /**
2450 * Optional. A concise name for the monitored resource type that might be 3234 * Optional. A concise name for the monitored resource type that might be
2451 * displayed in user interfaces. It should be a Title Cased Noun Phrase, 3235 * displayed in user interfaces. It should be a Title Cased Noun Phrase,
2452 * without any article or other determiners. For example, 3236 * without any article or other determiners. For example, "Google Cloud SQL
2453 * `"Google Cloud SQL Database"`. 3237 * Database".
2454 */ 3238 */
2455 core.String displayName; 3239 core.String displayName;
2456 /** 3240 /**
2457 * Required. A set of labels used to describe instances of this monitored 3241 * Required. A set of labels used to describe instances of this monitored
2458 * resource type. For example, an individual Google Cloud SQL database is 3242 * resource type. For example, an individual Google Cloud SQL database is
2459 * identified by values for the labels `"database_id"` and `"zone"`. 3243 * identified by values for the labels "database_id" and "zone".
2460 */ 3244 */
2461 core.List<LabelDescriptor> labels; 3245 core.List<LabelDescriptor> labels;
2462 /** 3246 /**
2463 * Optional. The resource name of the monitored resource descriptor: 3247 * Optional. The resource name of the monitored resource descriptor:
2464 * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where 3248 * "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is
2465 * {type} is the value of the `type` field in this object and 3249 * the value of the type field in this object and {project_id} is a project ID
2466 * {project_id} is a project ID that provides API-specific context for 3250 * that provides API-specific context for accessing the type. APIs that do not
2467 * accessing the type. APIs that do not use project information can use the 3251 * use project information can use the resource name format
2468 * resource name format `"monitoredResourceDescriptors/{type}"`. 3252 * "monitoredResourceDescriptors/{type}".
2469 */ 3253 */
2470 core.String name; 3254 core.String name;
2471 /** 3255 /**
2472 * Required. The monitored resource type. For example, the type 3256 * Required. The monitored resource type. For example, the type
2473 * `"cloudsql_database"` represents databases in Google Cloud SQL. 3257 * "cloudsql_database" represents databases in Google Cloud SQL. The maximum
2474 * The maximum length of this value is 256 characters. 3258 * length of this value is 256 characters.
2475 */ 3259 */
2476 core.String type; 3260 core.String type;
2477 3261
2478 MonitoredResourceDescriptor(); 3262 MonitoredResourceDescriptor();
2479 3263
2480 MonitoredResourceDescriptor.fromJson(core.Map _json) { 3264 MonitoredResourceDescriptor.fromJson(core.Map _json) {
2481 if (_json.containsKey("description")) { 3265 if (_json.containsKey("description")) {
2482 description = _json["description"]; 3266 description = _json["description"];
2483 } 3267 }
2484 if (_json.containsKey("displayName")) { 3268 if (_json.containsKey("displayName")) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 core.String appEngineRelease; 3309 core.String appEngineRelease;
2526 /** Application that handled this request. */ 3310 /** Application that handled this request. */
2527 core.String appId; 3311 core.String appId;
2528 /** An indication of the relative cost of serving this request. */ 3312 /** An indication of the relative cost of serving this request. */
2529 core.double cost; 3313 core.double cost;
2530 /** Time when the request finished. */ 3314 /** Time when the request finished. */
2531 core.String endTime; 3315 core.String endTime;
2532 /** Whether this request is finished or active. */ 3316 /** Whether this request is finished or active. */
2533 core.bool finished; 3317 core.bool finished;
2534 /** 3318 /**
2535 * Whether this is the first RequestLog entry for this request. If an active 3319 * Whether this is the first RequestLog entry for this request. If an active
2536 * request has several RequestLog entries written to Cloud Logging, this field 3320 * request has several RequestLog entries written to Stackdriver Logging, then
2537 * will be set for one of them. 3321 * this field will be set for one of them.
2538 */ 3322 */
2539 core.bool first; 3323 core.bool first;
2540 /** Internet host and port number of the resource being requested. */ 3324 /** Internet host and port number of the resource being requested. */
2541 core.String host; 3325 core.String host;
2542 /** HTTP version of request. Example: `"HTTP/1.1"`. */ 3326 /** HTTP version of request. Example: "HTTP/1.1". */
2543 core.String httpVersion; 3327 core.String httpVersion;
2544 /** An identifier for the instance that handled the request. */ 3328 /** An identifier for the instance that handled the request. */
2545 core.String instanceId; 3329 core.String instanceId;
2546 /** 3330 /**
2547 * If the instance processing this request belongs to a manually scaled 3331 * If the instance processing this request belongs to a manually scaled
2548 * module, then this is the 0-based index of the instance. Otherwise, this 3332 * module, then this is the 0-based index of the instance. Otherwise, this
2549 * value is -1. 3333 * value is -1.
2550 */ 3334 */
2551 core.int instanceIndex; 3335 core.int instanceIndex;
2552 /** Origin IP address. */ 3336 /** Origin IP address. */
2553 core.String ip; 3337 core.String ip;
2554 /** Latency of the request. */ 3338 /** Latency of the request. */
2555 core.String latency; 3339 core.String latency;
2556 /** 3340 /**
2557 * A list of log lines emitted by the application while serving this request. 3341 * A list of log lines emitted by the application while serving this request.
2558 */ 3342 */
2559 core.List<LogLine> line; 3343 core.List<LogLine> line;
2560 /** Number of CPU megacycles used to process request. */ 3344 /** Number of CPU megacycles used to process request. */
2561 core.String megaCycles; 3345 core.String megaCycles;
2562 /** 3346 /** Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". */
2563 * Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`.
2564 */
2565 core.String method; 3347 core.String method;
2566 /** Module of the application that handled this request. */ 3348 /** Module of the application that handled this request. */
2567 core.String moduleId; 3349 core.String moduleId;
2568 /** 3350 /**
2569 * The logged-in user who made the request. 3351 * The logged-in user who made the request.Most likely, this is the part of
2570 * 3352 * the user's email before the @ sign. The field value is the same for
2571 * Most likely, this is the part of the user's email before the `@` sign. The 3353 * different requests from the same user, but different users can have similar
2572 * field value is the same for different requests from the same user, but 3354 * names. This information is also available to the application via the App
2573 * different users can have similar names. This information is also 3355 * Engine Users API.This field will be populated starting with App Engine
2574 * available to the application via the App Engine Users API. 3356 * 1.9.21.
2575 *
2576 * This field will be populated starting with App Engine 1.9.21.
2577 */ 3357 */
2578 core.String nickname; 3358 core.String nickname;
2579 /** Time this request spent in the pending request queue. */ 3359 /** Time this request spent in the pending request queue. */
2580 core.String pendingTime; 3360 core.String pendingTime;
2581 /** Referrer URL of request. */ 3361 /** Referrer URL of request. */
2582 core.String referrer; 3362 core.String referrer;
2583 /** 3363 /**
2584 * Globally unique identifier for a request, which is based on the request 3364 * Globally unique identifier for a request, which is based on the request
2585 * start time. Request IDs for requests which started later will compare 3365 * start time. Request IDs for requests which started later will compare
2586 * greater as strings than those for requests which started earlier. 3366 * greater as strings than those for requests which started earlier.
2587 */ 3367 */
2588 core.String requestId; 3368 core.String requestId;
2589 /** 3369 /**
2590 * Contains the path and query portion of the URL that was requested. For 3370 * Contains the path and query portion of the URL that was requested. For
2591 * example, if the URL was "http://example.com/app?name=val", the resource 3371 * example, if the URL was "http://example.com/app?name=val", the resource
2592 * would be "/app?name=val". The fragment identifier, which is identified by 3372 * would be "/app?name=val". The fragment identifier, which is identified by
2593 * the `#` character, is not included. 3373 * the # character, is not included.
2594 */ 3374 */
2595 core.String resource; 3375 core.String resource;
2596 /** Size in bytes sent back to client by request. */ 3376 /** Size in bytes sent back to client by request. */
2597 core.String responseSize; 3377 core.String responseSize;
2598 /** 3378 /**
2599 * Source code for the application that handled this request. There can be 3379 * Source code for the application that handled this request. There can be
2600 * more than one source reference per deployed application if source code is 3380 * more than one source reference per deployed application if source code is
2601 * distributed among multiple repositories. 3381 * distributed among multiple repositories.
2602 */ 3382 */
2603 core.List<SourceReference> sourceReference; 3383 core.List<SourceReference> sourceReference;
2604 /** Time when the request started. */ 3384 /** Time when the request started. */
2605 core.String startTime; 3385 core.String startTime;
2606 /** HTTP response status code. Example: 200, 404. */ 3386 /** HTTP response status code. Example: 200, 404. */
2607 core.int status; 3387 core.int status;
2608 /** Task name of the request, in the case of an offline request. */ 3388 /** Task name of the request, in the case of an offline request. */
2609 core.String taskName; 3389 core.String taskName;
2610 /** Queue name of the request, in the case of an offline request. */ 3390 /** Queue name of the request, in the case of an offline request. */
2611 core.String taskQueueName; 3391 core.String taskQueueName;
2612 /** Cloud Trace identifier for this request. */ 3392 /** Stackdriver Trace identifier for this request. */
2613 core.String traceId; 3393 core.String traceId;
2614 /** File or class that handled the request. */ 3394 /** File or class that handled the request. */
2615 core.String urlMapEntry; 3395 core.String urlMapEntry;
2616 /** User agent that made the request. */ 3396 /** User agent that made the request. */
2617 core.String userAgent; 3397 core.String userAgent;
2618 /** Version of the application that handled this request. */ 3398 /** Version of the application that handled this request. */
2619 core.String versionId; 3399 core.String versionId;
2620 /** Whether this was a loading request for the instance. */ 3400 /** Whether this was a loading request for the instance. */
2621 core.bool wasLoadingRequest; 3401 core.bool wasLoadingRequest;
2622 3402
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2828 /** 3608 /**
2829 * Source file name. Depending on the runtime environment, this might be a 3609 * Source file name. Depending on the runtime environment, this might be a
2830 * simple name or a fully-qualified name. 3610 * simple name or a fully-qualified name.
2831 */ 3611 */
2832 core.String file; 3612 core.String file;
2833 /** 3613 /**
2834 * Human-readable name of the function or method being invoked, with optional 3614 * Human-readable name of the function or method being invoked, with optional
2835 * context such as the class or package name. This information is used in 3615 * context such as the class or package name. This information is used in
2836 * contexts such as the logs viewer, where a file and line number are less 3616 * contexts such as the logs viewer, where a file and line number are less
2837 * meaningful. The format can vary by language. For example: 3617 * meaningful. The format can vary by language. For example:
2838 * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` 3618 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
2839 * (Python).
2840 */ 3619 */
2841 core.String functionName; 3620 core.String functionName;
2842 /** Line within the source file. */ 3621 /** Line within the source file. */
2843 core.String line; 3622 core.String line;
2844 3623
2845 SourceLocation(); 3624 SourceLocation();
2846 3625
2847 SourceLocation.fromJson(core.Map _json) { 3626 SourceLocation.fromJson(core.Map _json) {
2848 if (_json.containsKey("file")) { 3627 if (_json.containsKey("file")) {
2849 file = _json["file"]; 3628 file = _json["file"];
(...skipping 20 matching lines...) Expand all
2870 return _json; 3649 return _json;
2871 } 3650 }
2872 } 3651 }
2873 3652
2874 /** 3653 /**
2875 * A reference to a particular snapshot of the source tree used to build and 3654 * A reference to a particular snapshot of the source tree used to build and
2876 * deploy an application. 3655 * deploy an application.
2877 */ 3656 */
2878 class SourceReference { 3657 class SourceReference {
2879 /** 3658 /**
2880 * Optional. A URI string identifying the repository. 3659 * Optional. A URI string identifying the repository. Example:
2881 * Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" 3660 * "https://github.com/GoogleCloudPlatform/kubernetes.git"
2882 */ 3661 */
2883 core.String repository; 3662 core.String repository;
2884 /** 3663 /**
2885 * The canonical and persistent identifier of the deployed revision. 3664 * The canonical and persistent identifier of the deployed revision. Example
2886 * Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" 3665 * (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
2887 */ 3666 */
2888 core.String revisionId; 3667 core.String revisionId;
2889 3668
2890 SourceReference(); 3669 SourceReference();
2891 3670
2892 SourceReference.fromJson(core.Map _json) { 3671 SourceReference.fromJson(core.Map _json) {
2893 if (_json.containsKey("repository")) { 3672 if (_json.containsKey("repository")) {
2894 repository = _json["repository"]; 3673 repository = _json["repository"];
2895 } 3674 }
2896 if (_json.containsKey("revisionId")) { 3675 if (_json.containsKey("revisionId")) {
(...skipping 10 matching lines...) Expand all
2907 _json["revisionId"] = revisionId; 3686 _json["revisionId"] = revisionId;
2908 } 3687 }
2909 return _json; 3688 return _json;
2910 } 3689 }
2911 } 3690 }
2912 3691
2913 /** The parameters to WriteLogEntries. */ 3692 /** The parameters to WriteLogEntries. */
2914 class WriteLogEntriesRequest { 3693 class WriteLogEntriesRequest {
2915 /** 3694 /**
2916 * Required. The log entries to write. Values supplied for the fields 3695 * Required. The log entries to write. Values supplied for the fields
2917 * `log_name`, `resource`, and `labels` in this `entries.write` request are 3696 * log_name, resource, and labels in this entries.write request are added to
2918 * added to those log entries that do not provide their own values for the 3697 * those log entries that do not provide their own values for the fields.To
2919 * fields. 3698 * improve throughput and to avoid exceeding the quota limit for calls to
2920 * 3699 * entries.write, you should write multiple log entries at once rather than
2921 * To improve throughput and to avoid exceeding the
2922 * [quota limit](/logging/quota-policy) for calls to `entries.write`,
2923 * you should write multiple log entries at once rather than
2924 * calling this method for each individual log entry. 3700 * calling this method for each individual log entry.
2925 */ 3701 */
2926 core.List<LogEntry> entries; 3702 core.List<LogEntry> entries;
2927 /** 3703 /**
2928 * Optional. Default labels that are added to the `labels` field of all log 3704 * Optional. Default labels that are added to the labels field of all log
2929 * entries in `entries`. If a log entry already has a label with the same key 3705 * entries in entries. If a log entry already has a label with the same key as
2930 * as a label in this parameter, then the log entry's label is not changed. 3706 * a label in this parameter, then the log entry's label is not changed. See
2931 * See LogEntry. 3707 * LogEntry.
2932 */ 3708 */
2933 core.Map<core.String, core.String> labels; 3709 core.Map<core.String, core.String> labels;
2934 /** 3710 /**
2935 * Optional. A default log resource name that is assigned to all log entries 3711 * Optional. A default log resource name that is assigned to all log entries
2936 * in `entries` that do not specify a value for `log_name`. Example: 3712 * in entries that do not specify a value for log_name:
2937 * `"projects/my-project/logs/syslog"`. See 3713 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
2938 * LogEntry. 3714 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
3715 * [LOG_ID] must be URL-encoded. For example,
3716 * "projects/my-project-id/logs/syslog" or
3717 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
3718 * For more information about log names, see LogEntry.
2939 */ 3719 */
2940 core.String logName; 3720 core.String logName;
2941 /** 3721 /**
2942 * Optional. Whether valid entries should be written even if some other 3722 * Optional. Whether valid entries should be written even if some other
2943 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any 3723 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
2944 * entry is not written, the response status will be the error associated 3724 * entry is not written, the response status will be the error associated with
2945 * with one of the failed entries and include error details in the form of 3725 * one of the failed entries and include error details in the form of
2946 * WriteLogEntriesPartialErrors. 3726 * WriteLogEntriesPartialErrors.
2947 */ 3727 */
2948 core.bool partialSuccess; 3728 core.bool partialSuccess;
2949 /** 3729 /**
2950 * Optional. A default monitored resource object that is assigned to all log 3730 * Optional. A default monitored resource object that is assigned to all log
2951 * entries in `entries` that do not specify a value for `resource`. Example: 3731 * entries in entries that do not specify a value for resource. Example:
2952 * 3732 * { "type": "gce_instance",
2953 * { "type": "gce_instance", 3733 * "labels": {
2954 * "labels": { 3734 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
2955 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
2956 *
2957 * See LogEntry. 3735 * See LogEntry.
2958 */ 3736 */
2959 MonitoredResource resource; 3737 MonitoredResource resource;
2960 3738
2961 WriteLogEntriesRequest(); 3739 WriteLogEntriesRequest();
2962 3740
2963 WriteLogEntriesRequest.fromJson(core.Map _json) { 3741 WriteLogEntriesRequest.fromJson(core.Map _json) {
2964 if (_json.containsKey("entries")) { 3742 if (_json.containsKey("entries")) {
2965 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List(); 3743 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List();
2966 } 3744 }
(...skipping 25 matching lines...) Expand all
2992 if (partialSuccess != null) { 3770 if (partialSuccess != null) {
2993 _json["partialSuccess"] = partialSuccess; 3771 _json["partialSuccess"] = partialSuccess;
2994 } 3772 }
2995 if (resource != null) { 3773 if (resource != null) {
2996 _json["resource"] = (resource).toJson(); 3774 _json["resource"] = (resource).toJson();
2997 } 3775 }
2998 return _json; 3776 return _json;
2999 } 3777 }
3000 } 3778 }
3001 3779
3002 /** 3780 /** Result returned from WriteLogEntries. empty */
3003 * Result returned from WriteLogEntries.
3004 * empty
3005 */
3006 class WriteLogEntriesResponse { 3781 class WriteLogEntriesResponse {
3007 3782
3008 WriteLogEntriesResponse(); 3783 WriteLogEntriesResponse();
3009 3784
3010 WriteLogEntriesResponse.fromJson(core.Map _json) { 3785 WriteLogEntriesResponse.fromJson(core.Map _json) {
3011 } 3786 }
3012 3787
3013 core.Map toJson() { 3788 core.Map toJson() {
3014 var _json = new core.Map(); 3789 var _json = new core.Map();
3015 return _json; 3790 return _json;
3016 } 3791 }
3017 } 3792 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/language/v1.dart ('k') | generated/googleapis/lib/monitoring/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698