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

Side by Side Diff: generated/googleapis_beta/lib/logging/v2beta1.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
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_beta.logging.v2beta1; 3 library googleapis_beta.logging.v2beta1;
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 57
58 class BillingAccountsLogsResourceApi { 58 class BillingAccountsLogsResourceApi {
59 final commons.ApiRequester _requester; 59 final commons.ApiRequester _requester;
60 60
61 BillingAccountsLogsResourceApi(commons.ApiRequester client) : 61 BillingAccountsLogsResourceApi(commons.ApiRequester client) :
62 _requester = client; 62 _requester = client;
63 63
64 /** 64 /**
65 * Deletes a log and all its log entries. 65 * Deletes all the log entries in a log. The log reappears if it receives new
66 * The log will reappear if it receives new entries. 66 * entries.
67 * 67 *
68 * Request parameters: 68 * Request parameters:
69 * 69 *
70 * [logName] - Required. The resource name of the log to delete. Example: 70 * [logName] - Required. The resource name of the log to delete:
71 * `"projects/my-project/logs/syslog"`. 71 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
72 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
73 * [LOG_ID] must be URL-encoded. For example,
74 * "projects/my-project-id/logs/syslog",
75 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
76 * For more information about log names, see LogEntry.
72 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". 77 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$".
73 * 78 *
74 * Completes with a [Empty]. 79 * Completes with a [Empty].
75 * 80 *
76 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 81 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
77 * error. 82 * error.
78 * 83 *
79 * If the used [http.Client] completes with an error when making a REST call, 84 * If the used [http.Client] completes with an error when making a REST call,
80 * this method will complete with the same error. 85 * this method will complete with the same error.
81 */ 86 */
(...skipping 14 matching lines...) Expand all
96 var _response = _requester.request(_url, 101 var _response = _requester.request(_url,
97 "DELETE", 102 "DELETE",
98 body: _body, 103 body: _body,
99 queryParams: _queryParams, 104 queryParams: _queryParams,
100 uploadOptions: _uploadOptions, 105 uploadOptions: _uploadOptions,
101 uploadMedia: _uploadMedia, 106 uploadMedia: _uploadMedia,
102 downloadOptions: _downloadOptions); 107 downloadOptions: _downloadOptions);
103 return _response.then((data) => new Empty.fromJson(data)); 108 return _response.then((data) => new Empty.fromJson(data));
104 } 109 }
105 110
111 /**
112 * Lists the logs in projects or organizations. Only logs that have entries
113 * are listed.
114 *
115 * Request parameters:
116 *
117 * [parent] - Required. The resource name that owns the logs:
118 * "projects/[PROJECT_ID]"
119 * "organizations/[ORGANIZATION_ID]"
120 *
121 * Value must have pattern "^billingAccounts/[^/]+$".
122 *
123 * [pageSize] - Optional. The maximum number of results to return from this
124 * request. Non-positive values are ignored. The presence of nextPageToken in
125 * the response indicates that more results might be available.
126 *
127 * [pageToken] - Optional. If present, then retrieve the next batch of results
128 * from the preceding call to this method. pageToken must be the value of
129 * nextPageToken from the previous response. The values of other method
130 * parameters should be identical to those in the previous call.
131 *
132 * Completes with a [ListLogsResponse].
133 *
134 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
135 * error.
136 *
137 * If the used [http.Client] completes with an error when making a REST call,
138 * this method will complete with the same error.
139 */
140 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
141 var _url = null;
142 var _queryParams = new core.Map();
143 var _uploadMedia = null;
144 var _uploadOptions = null;
145 var _downloadOptions = commons.DownloadOptions.Metadata;
146 var _body = null;
147
148 if (parent == null) {
149 throw new core.ArgumentError("Parameter parent is required.");
150 }
151 if (pageSize != null) {
152 _queryParams["pageSize"] = ["${pageSize}"];
153 }
154 if (pageToken != null) {
155 _queryParams["pageToken"] = [pageToken];
156 }
157
158 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/log s';
159
160 var _response = _requester.request(_url,
161 "GET",
162 body: _body,
163 queryParams: _queryParams,
164 uploadOptions: _uploadOptions,
165 uploadMedia: _uploadMedia,
166 downloadOptions: _downloadOptions);
167 return _response.then((data) => new ListLogsResponse.fromJson(data));
168 }
169
106 } 170 }
107 171
108 172
109 class EntriesResourceApi { 173 class EntriesResourceApi {
110 final commons.ApiRequester _requester; 174 final commons.ApiRequester _requester;
111 175
112 EntriesResourceApi(commons.ApiRequester client) : 176 EntriesResourceApi(commons.ApiRequester client) :
113 _requester = client; 177 _requester = client;
114 178
115 /** 179 /**
116 * Lists log entries. Use this method to retrieve log entries from Cloud 180 * Lists log entries. Use this method to retrieve log entries from Stackdriver
117 * Logging. For ways to export log entries, see 181 * Logging. For ways to export log entries, see Exporting Logs.
118 * [Exporting Logs](/logging/docs/export).
119 * 182 *
120 * [request] - The metadata request object. 183 * [request] - The metadata request object.
121 * 184 *
122 * Request parameters: 185 * Request parameters:
123 * 186 *
124 * Completes with a [ListLogEntriesResponse]. 187 * Completes with a [ListLogEntriesResponse].
125 * 188 *
126 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 189 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
127 * error. 190 * error.
128 * 191 *
(...skipping 18 matching lines...) Expand all
147 "POST", 210 "POST",
148 body: _body, 211 body: _body,
149 queryParams: _queryParams, 212 queryParams: _queryParams,
150 uploadOptions: _uploadOptions, 213 uploadOptions: _uploadOptions,
151 uploadMedia: _uploadMedia, 214 uploadMedia: _uploadMedia,
152 downloadOptions: _downloadOptions); 215 downloadOptions: _downloadOptions);
153 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); 216 return _response.then((data) => new ListLogEntriesResponse.fromJson(data));
154 } 217 }
155 218
156 /** 219 /**
157 * Writes log entries to Stackdriver Logging. All log entries are 220 * Writes log entries to Stackdriver Logging. All log entries are written by
158 * written by this method. 221 * this method.
159 * 222 *
160 * [request] - The metadata request object. 223 * [request] - The metadata request object.
161 * 224 *
162 * Request parameters: 225 * Request parameters:
163 * 226 *
164 * Completes with a [WriteLogEntriesResponse]. 227 * Completes with a [WriteLogEntriesResponse].
165 * 228 *
166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 229 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
167 * error. 230 * error.
168 * 231 *
(...skipping 27 matching lines...) Expand all
196 } 259 }
197 260
198 261
199 class MonitoredResourceDescriptorsResourceApi { 262 class MonitoredResourceDescriptorsResourceApi {
200 final commons.ApiRequester _requester; 263 final commons.ApiRequester _requester;
201 264
202 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) : 265 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) :
203 _requester = client; 266 _requester = client;
204 267
205 /** 268 /**
206 * Lists the monitored resource descriptors used by Stackdriver Logging. 269 * Lists the descriptors for monitored resource types used by Stackdriver
270 * Logging.
207 * 271 *
208 * Request parameters: 272 * Request parameters:
209 * 273 *
210 * [pageSize] - Optional. The maximum number of results to return from this 274 * [pageSize] - Optional. The maximum number of results to return from this
211 * request. 275 * request. Non-positive values are ignored. The presence of nextPageToken in
212 * Non-positive values are ignored. The presence of `nextPageToken` in the 276 * the response indicates that more results might be available.
213 * response indicates that more results might be available.
214 * 277 *
215 * [pageToken] - Optional. If present, then retrieve the next batch of results 278 * [pageToken] - Optional. If present, then retrieve the next batch of results
216 * from the 279 * from the preceding call to this method. pageToken must be the value of
217 * preceding call to this method. `pageToken` must be the value of 280 * nextPageToken from the previous response. The values of other method
218 * `nextPageToken` from the previous response. The values of other method
219 * parameters should be identical to those in the previous call. 281 * parameters should be identical to those in the previous call.
220 * 282 *
221 * Completes with a [ListMonitoredResourceDescriptorsResponse]. 283 * Completes with a [ListMonitoredResourceDescriptorsResponse].
222 * 284 *
223 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 285 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
224 * error. 286 * error.
225 * 287 *
226 * If the used [http.Client] completes with an error when making a REST call, 288 * If the used [http.Client] completes with an error when making a REST call,
227 * this method will complete with the same error. 289 * this method will complete with the same error.
228 */ 290 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 328 }
267 329
268 330
269 class OrganizationsLogsResourceApi { 331 class OrganizationsLogsResourceApi {
270 final commons.ApiRequester _requester; 332 final commons.ApiRequester _requester;
271 333
272 OrganizationsLogsResourceApi(commons.ApiRequester client) : 334 OrganizationsLogsResourceApi(commons.ApiRequester client) :
273 _requester = client; 335 _requester = client;
274 336
275 /** 337 /**
276 * Deletes a log and all its log entries. 338 * Deletes all the log entries in a log. The log reappears if it receives new
277 * The log will reappear if it receives new entries. 339 * entries.
278 * 340 *
279 * Request parameters: 341 * Request parameters:
280 * 342 *
281 * [logName] - Required. The resource name of the log to delete. Example: 343 * [logName] - Required. The resource name of the log to delete:
282 * `"projects/my-project/logs/syslog"`. 344 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
345 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
346 * [LOG_ID] must be URL-encoded. For example,
347 * "projects/my-project-id/logs/syslog",
348 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
349 * For more information about log names, see LogEntry.
283 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$". 350 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$".
284 * 351 *
285 * Completes with a [Empty]. 352 * Completes with a [Empty].
286 * 353 *
287 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 354 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
288 * error. 355 * error.
289 * 356 *
290 * If the used [http.Client] completes with an error when making a REST call, 357 * If the used [http.Client] completes with an error when making a REST call,
291 * this method will complete with the same error. 358 * this method will complete with the same error.
292 */ 359 */
(...skipping 14 matching lines...) Expand all
307 var _response = _requester.request(_url, 374 var _response = _requester.request(_url,
308 "DELETE", 375 "DELETE",
309 body: _body, 376 body: _body,
310 queryParams: _queryParams, 377 queryParams: _queryParams,
311 uploadOptions: _uploadOptions, 378 uploadOptions: _uploadOptions,
312 uploadMedia: _uploadMedia, 379 uploadMedia: _uploadMedia,
313 downloadOptions: _downloadOptions); 380 downloadOptions: _downloadOptions);
314 return _response.then((data) => new Empty.fromJson(data)); 381 return _response.then((data) => new Empty.fromJson(data));
315 } 382 }
316 383
384 /**
385 * Lists the logs in projects or organizations. Only logs that have entries
386 * are listed.
387 *
388 * Request parameters:
389 *
390 * [parent] - Required. The resource name that owns the logs:
391 * "projects/[PROJECT_ID]"
392 * "organizations/[ORGANIZATION_ID]"
393 *
394 * Value must have pattern "^organizations/[^/]+$".
395 *
396 * [pageSize] - Optional. The maximum number of results to return from this
397 * request. Non-positive values are ignored. The presence of nextPageToken in
398 * the response indicates that more results might be available.
399 *
400 * [pageToken] - Optional. If present, then retrieve the next batch of results
401 * from the preceding call to this method. pageToken must be the value of
402 * nextPageToken from the previous response. The values of other method
403 * parameters should be identical to those in the previous call.
404 *
405 * Completes with a [ListLogsResponse].
406 *
407 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
408 * error.
409 *
410 * If the used [http.Client] completes with an error when making a REST call,
411 * this method will complete with the same error.
412 */
413 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
414 var _url = null;
415 var _queryParams = new core.Map();
416 var _uploadMedia = null;
417 var _uploadOptions = null;
418 var _downloadOptions = commons.DownloadOptions.Metadata;
419 var _body = null;
420
421 if (parent == null) {
422 throw new core.ArgumentError("Parameter parent is required.");
423 }
424 if (pageSize != null) {
425 _queryParams["pageSize"] = ["${pageSize}"];
426 }
427 if (pageToken != null) {
428 _queryParams["pageToken"] = [pageToken];
429 }
430
431 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/log s';
432
433 var _response = _requester.request(_url,
434 "GET",
435 body: _body,
436 queryParams: _queryParams,
437 uploadOptions: _uploadOptions,
438 uploadMedia: _uploadMedia,
439 downloadOptions: _downloadOptions);
440 return _response.then((data) => new ListLogsResponse.fromJson(data));
441 }
442
317 } 443 }
318 444
319 445
320 class ProjectsResourceApi { 446 class ProjectsResourceApi {
321 final commons.ApiRequester _requester; 447 final commons.ApiRequester _requester;
322 448
323 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); 449 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester);
324 ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requ ester); 450 ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requ ester);
325 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester) ; 451 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester) ;
326 452
327 ProjectsResourceApi(commons.ApiRequester client) : 453 ProjectsResourceApi(commons.ApiRequester client) :
328 _requester = client; 454 _requester = client;
329 } 455 }
330 456
331 457
332 class ProjectsLogsResourceApi { 458 class ProjectsLogsResourceApi {
333 final commons.ApiRequester _requester; 459 final commons.ApiRequester _requester;
334 460
335 ProjectsLogsResourceApi(commons.ApiRequester client) : 461 ProjectsLogsResourceApi(commons.ApiRequester client) :
336 _requester = client; 462 _requester = client;
337 463
338 /** 464 /**
339 * Deletes a log and all its log entries. 465 * Deletes all the log entries in a log. The log reappears if it receives new
340 * The log will reappear if it receives new entries. 466 * entries.
341 * 467 *
342 * Request parameters: 468 * Request parameters:
343 * 469 *
344 * [logName] - Required. The resource name of the log to delete. Example: 470 * [logName] - Required. The resource name of the log to delete:
345 * `"projects/my-project/logs/syslog"`. 471 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
472 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
473 * [LOG_ID] must be URL-encoded. For example,
474 * "projects/my-project-id/logs/syslog",
475 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
476 * For more information about log names, see LogEntry.
346 * Value must have pattern "^projects/[^/]+/logs/[^/]+$". 477 * Value must have pattern "^projects/[^/]+/logs/[^/]+$".
347 * 478 *
348 * Completes with a [Empty]. 479 * Completes with a [Empty].
349 * 480 *
350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 481 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
351 * error. 482 * error.
352 * 483 *
353 * If the used [http.Client] completes with an error when making a REST call, 484 * If the used [http.Client] completes with an error when making a REST call,
354 * this method will complete with the same error. 485 * this method will complete with the same error.
355 */ 486 */
(...skipping 14 matching lines...) Expand all
370 var _response = _requester.request(_url, 501 var _response = _requester.request(_url,
371 "DELETE", 502 "DELETE",
372 body: _body, 503 body: _body,
373 queryParams: _queryParams, 504 queryParams: _queryParams,
374 uploadOptions: _uploadOptions, 505 uploadOptions: _uploadOptions,
375 uploadMedia: _uploadMedia, 506 uploadMedia: _uploadMedia,
376 downloadOptions: _downloadOptions); 507 downloadOptions: _downloadOptions);
377 return _response.then((data) => new Empty.fromJson(data)); 508 return _response.then((data) => new Empty.fromJson(data));
378 } 509 }
379 510
511 /**
512 * Lists the logs in projects or organizations. Only logs that have entries
513 * are listed.
514 *
515 * Request parameters:
516 *
517 * [parent] - Required. The resource name that owns the logs:
518 * "projects/[PROJECT_ID]"
519 * "organizations/[ORGANIZATION_ID]"
520 *
521 * Value must have pattern "^projects/[^/]+$".
522 *
523 * [pageSize] - Optional. The maximum number of results to return from this
524 * request. Non-positive values are ignored. The presence of nextPageToken in
525 * the response indicates that more results might be available.
526 *
527 * [pageToken] - Optional. If present, then retrieve the next batch of results
528 * from the preceding call to this method. pageToken must be the value of
529 * nextPageToken from the previous response. The values of other method
530 * parameters should be identical to those in the previous call.
531 *
532 * Completes with a [ListLogsResponse].
533 *
534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
535 * error.
536 *
537 * If the used [http.Client] completes with an error when making a REST call,
538 * this method will complete with the same error.
539 */
540 async.Future<ListLogsResponse> list(core.String parent, {core.int pageSize, co re.String pageToken}) {
541 var _url = null;
542 var _queryParams = new core.Map();
543 var _uploadMedia = null;
544 var _uploadOptions = null;
545 var _downloadOptions = commons.DownloadOptions.Metadata;
546 var _body = null;
547
548 if (parent == null) {
549 throw new core.ArgumentError("Parameter parent is required.");
550 }
551 if (pageSize != null) {
552 _queryParams["pageSize"] = ["${pageSize}"];
553 }
554 if (pageToken != null) {
555 _queryParams["pageToken"] = [pageToken];
556 }
557
558 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/log s';
559
560 var _response = _requester.request(_url,
561 "GET",
562 body: _body,
563 queryParams: _queryParams,
564 uploadOptions: _uploadOptions,
565 uploadMedia: _uploadMedia,
566 downloadOptions: _downloadOptions);
567 return _response.then((data) => new ListLogsResponse.fromJson(data));
568 }
569
380 } 570 }
381 571
382 572
383 class ProjectsMetricsResourceApi { 573 class ProjectsMetricsResourceApi {
384 final commons.ApiRequester _requester; 574 final commons.ApiRequester _requester;
385 575
386 ProjectsMetricsResourceApi(commons.ApiRequester client) : 576 ProjectsMetricsResourceApi(commons.ApiRequester client) :
387 _requester = client; 577 _requester = client;
388 578
389 /** 579 /**
390 * Creates a logs-based metric. 580 * Creates a logs-based metric.
391 * 581 *
392 * [request] - The metadata request object. 582 * [request] - The metadata request object.
393 * 583 *
394 * Request parameters: 584 * Request parameters:
395 * 585 *
396 * [parent] - The resource name of the project in which to create the metric. 586 * [parent] - The resource name of the project in which to create the metric:
397 * Example: `"projects/my-project-id"`. 587 * "projects/[PROJECT_ID]"
398 *
399 * The new metric must be provided in the request. 588 * The new metric must be provided in the request.
400 * Value must have pattern "^projects/[^/]+$". 589 * Value must have pattern "^projects/[^/]+$".
401 * 590 *
402 * Completes with a [LogMetric]. 591 * Completes with a [LogMetric].
403 * 592 *
404 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 593 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
405 * error. 594 * error.
406 * 595 *
407 * If the used [http.Client] completes with an error when making a REST call, 596 * If the used [http.Client] completes with an error when making a REST call,
408 * this method will complete with the same error. 597 * this method will complete with the same error.
(...skipping 23 matching lines...) Expand all
432 uploadMedia: _uploadMedia, 621 uploadMedia: _uploadMedia,
433 downloadOptions: _downloadOptions); 622 downloadOptions: _downloadOptions);
434 return _response.then((data) => new LogMetric.fromJson(data)); 623 return _response.then((data) => new LogMetric.fromJson(data));
435 } 624 }
436 625
437 /** 626 /**
438 * Deletes a logs-based metric. 627 * Deletes a logs-based metric.
439 * 628 *
440 * Request parameters: 629 * Request parameters:
441 * 630 *
442 * [metricName] - The resource name of the metric to delete. 631 * [metricName] - The resource name of the metric to delete:
443 * Example: `"projects/my-project-id/metrics/my-metric-id"`. 632 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
633 *
444 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 634 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
445 * 635 *
446 * Completes with a [Empty]. 636 * Completes with a [Empty].
447 * 637 *
448 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 638 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
449 * error. 639 * error.
450 * 640 *
451 * If the used [http.Client] completes with an error when making a REST call, 641 * If the used [http.Client] completes with an error when making a REST call,
452 * this method will complete with the same error. 642 * this method will complete with the same error.
453 */ 643 */
(...skipping 19 matching lines...) Expand all
473 uploadMedia: _uploadMedia, 663 uploadMedia: _uploadMedia,
474 downloadOptions: _downloadOptions); 664 downloadOptions: _downloadOptions);
475 return _response.then((data) => new Empty.fromJson(data)); 665 return _response.then((data) => new Empty.fromJson(data));
476 } 666 }
477 667
478 /** 668 /**
479 * Gets a logs-based metric. 669 * Gets a logs-based metric.
480 * 670 *
481 * Request parameters: 671 * Request parameters:
482 * 672 *
483 * [metricName] - The resource name of the desired metric. 673 * [metricName] - The resource name of the desired metric:
484 * Example: `"projects/my-project-id/metrics/my-metric-id"`. 674 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
675 *
485 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 676 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
486 * 677 *
487 * Completes with a [LogMetric]. 678 * Completes with a [LogMetric].
488 * 679 *
489 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 680 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
490 * error. 681 * error.
491 * 682 *
492 * If the used [http.Client] completes with an error when making a REST call, 683 * If the used [http.Client] completes with an error when making a REST call,
493 * this method will complete with the same error. 684 * this method will complete with the same error.
494 */ 685 */
(...skipping 19 matching lines...) Expand all
514 uploadMedia: _uploadMedia, 705 uploadMedia: _uploadMedia,
515 downloadOptions: _downloadOptions); 706 downloadOptions: _downloadOptions);
516 return _response.then((data) => new LogMetric.fromJson(data)); 707 return _response.then((data) => new LogMetric.fromJson(data));
517 } 708 }
518 709
519 /** 710 /**
520 * Lists logs-based metrics. 711 * Lists logs-based metrics.
521 * 712 *
522 * Request parameters: 713 * Request parameters:
523 * 714 *
524 * [parent] - Required. The resource name containing the metrics. 715 * [parent] - Required. The name of the project containing the metrics:
525 * Example: `"projects/my-project-id"`. 716 * "projects/[PROJECT_ID]"
717 *
526 * Value must have pattern "^projects/[^/]+$". 718 * Value must have pattern "^projects/[^/]+$".
527 * 719 *
528 * [pageSize] - Optional. The maximum number of results to return from this 720 * [pageSize] - Optional. The maximum number of results to return from this
529 * request. 721 * request. Non-positive values are ignored. The presence of nextPageToken in
530 * Non-positive values are ignored. The presence of `nextPageToken` in the 722 * the response indicates that more results might be available.
531 * response indicates that more results might be available.
532 * 723 *
533 * [pageToken] - Optional. If present, then retrieve the next batch of results 724 * [pageToken] - Optional. If present, then retrieve the next batch of results
534 * from the 725 * from the preceding call to this method. pageToken must be the value of
535 * preceding call to this method. `pageToken` must be the value of 726 * nextPageToken from the previous response. The values of other method
536 * `nextPageToken` from the previous response. The values of other method
537 * parameters should be identical to those in the previous call. 727 * parameters should be identical to those in the previous call.
538 * 728 *
539 * Completes with a [ListLogMetricsResponse]. 729 * Completes with a [ListLogMetricsResponse].
540 * 730 *
541 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 731 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
542 * error. 732 * error.
543 * 733 *
544 * If the used [http.Client] completes with an error when making a REST call, 734 * If the used [http.Client] completes with an error when making a REST call,
545 * this method will complete with the same error. 735 * this method will complete with the same error.
546 */ 736 */
(...skipping 27 matching lines...) Expand all
574 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); 764 return _response.then((data) => new ListLogMetricsResponse.fromJson(data));
575 } 765 }
576 766
577 /** 767 /**
578 * Creates or updates a logs-based metric. 768 * Creates or updates a logs-based metric.
579 * 769 *
580 * [request] - The metadata request object. 770 * [request] - The metadata request object.
581 * 771 *
582 * Request parameters: 772 * Request parameters:
583 * 773 *
584 * [metricName] - The resource name of the metric to update. 774 * [metricName] - The resource name of the metric to update:
585 * Example: `"projects/my-project-id/metrics/my-metric-id"`. 775 * "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
586 * 776 * The updated metric must be provided in the request and it's name field must
587 * The updated metric must be provided in the request and have the 777 * be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID],
588 * same identifier that is specified in `metricName`. 778 * then a new metric is created.
589 * If the metric does not exist, it is created.
590 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". 779 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$".
591 * 780 *
592 * Completes with a [LogMetric]. 781 * Completes with a [LogMetric].
593 * 782 *
594 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 783 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
595 * error. 784 * error.
596 * 785 *
597 * If the used [http.Client] completes with an error when making a REST call, 786 * If the used [http.Client] completes with an error when making a REST call,
598 * this method will complete with the same error. 787 * this method will complete with the same error.
599 */ 788 */
(...skipping 27 matching lines...) Expand all
627 } 816 }
628 817
629 818
630 class ProjectsSinksResourceApi { 819 class ProjectsSinksResourceApi {
631 final commons.ApiRequester _requester; 820 final commons.ApiRequester _requester;
632 821
633 ProjectsSinksResourceApi(commons.ApiRequester client) : 822 ProjectsSinksResourceApi(commons.ApiRequester client) :
634 _requester = client; 823 _requester = client;
635 824
636 /** 825 /**
637 * Creates a sink. 826 * Creates a sink that exports specified log entries to a destination. The
827 * export of newly-ingested log entries begins immediately, unless the current
828 * time is outside the sink's start and end times or the sink's
829 * writer_identity is not permitted to write to the destination. A sink can
830 * export log entries only from the resource owning the sink.
638 * 831 *
639 * [request] - The metadata request object. 832 * [request] - The metadata request object.
640 * 833 *
641 * Request parameters: 834 * Request parameters:
642 * 835 *
643 * [parent] - Required. The resource in which to create the sink. 836 * [parent] - Required. The resource in which to create the sink:
644 * Example: `"projects/my-project-id"`. 837 * "projects/[PROJECT_ID]"
645 * The new sink must be provided in the request. 838 * "organizations/[ORGANIZATION_ID]"
839 * Examples: "projects/my-logging-project", "organizations/123456789".
646 * Value must have pattern "^projects/[^/]+$". 840 * Value must have pattern "^projects/[^/]+$".
647 * 841 *
648 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 842 * [uniqueWriterIdentity] - Optional. Determines the kind of IAM identity
649 * service account returned 843 * returned as writer_identity in the new sink. If this value is omitted or
650 * in the sink's writer_identity. Set this field to be true to export 844 * set to false, and if the sink's parent is a project, then the value
651 * logs from one project to a different project. This field is ignored for 845 * returned as writer_identity is cloud-logs@google.com, the same identity
652 * non-project sinks (e.g. organization sinks) because those sinks are 846 * used before the addition of writer identities to this API. The sink's
653 * required to have dedicated service accounts. 847 * destination must be in the same project as the sink itself.If this field is
848 * set to true, or if the sink is owned by a non-project resource such as an
849 * organization, then the value of writer_identity will be a unique service
850 * account used only for exports from the new sink. For more information, see
851 * writer_identity in LogSink.
654 * 852 *
655 * Completes with a [LogSink]. 853 * Completes with a [LogSink].
656 * 854 *
657 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 855 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
658 * error. 856 * error.
659 * 857 *
660 * If the used [http.Client] completes with an error when making a REST call, 858 * If the used [http.Client] completes with an error when making a REST call,
661 * this method will complete with the same error. 859 * this method will complete with the same error.
662 */ 860 */
663 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) { 861 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u niqueWriterIdentity}) {
(...skipping 20 matching lines...) Expand all
684 "POST", 882 "POST",
685 body: _body, 883 body: _body,
686 queryParams: _queryParams, 884 queryParams: _queryParams,
687 uploadOptions: _uploadOptions, 885 uploadOptions: _uploadOptions,
688 uploadMedia: _uploadMedia, 886 uploadMedia: _uploadMedia,
689 downloadOptions: _downloadOptions); 887 downloadOptions: _downloadOptions);
690 return _response.then((data) => new LogSink.fromJson(data)); 888 return _response.then((data) => new LogSink.fromJson(data));
691 } 889 }
692 890
693 /** 891 /**
694 * Deletes a sink. 892 * Deletes a sink. If the sink has a unique writer_identity, then that service
893 * account is also deleted.
695 * 894 *
696 * Request parameters: 895 * Request parameters:
697 * 896 *
698 * [sinkName] - Required. The resource name of the sink to delete, including 897 * [sinkName] - Required. The full resource name of the sink to delete,
699 * the parent 898 * including the parent resource and the sink identifier:
700 * resource and the sink identifier. Example: 899 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
701 * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink 900 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
702 * does not exist. 901 * It is an error if the sink does not exist. Example:
902 * "projects/my-project-id/sinks/my-sink-id". It is an error if the sink does
903 * not exist.
703 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 904 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
704 * 905 *
705 * Completes with a [Empty]. 906 * Completes with a [Empty].
706 * 907 *
707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 908 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
708 * error. 909 * error.
709 * 910 *
710 * If the used [http.Client] completes with an error when making a REST call, 911 * If the used [http.Client] completes with an error when making a REST call,
711 * this method will complete with the same error. 912 * this method will complete with the same error.
712 */ 913 */
(...skipping 19 matching lines...) Expand all
732 uploadMedia: _uploadMedia, 933 uploadMedia: _uploadMedia,
733 downloadOptions: _downloadOptions); 934 downloadOptions: _downloadOptions);
734 return _response.then((data) => new Empty.fromJson(data)); 935 return _response.then((data) => new Empty.fromJson(data));
735 } 936 }
736 937
737 /** 938 /**
738 * Gets a sink. 939 * Gets a sink.
739 * 940 *
740 * Request parameters: 941 * Request parameters:
741 * 942 *
742 * [sinkName] - Required. The resource name of the sink to return. 943 * [sinkName] - Required. The parent resource name of the sink:
743 * Example: `"projects/my-project-id/sinks/my-sink-id"`. 944 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
945 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
946 * Example: "projects/my-project-id/sinks/my-sink-id".
744 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 947 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
745 * 948 *
746 * Completes with a [LogSink]. 949 * Completes with a [LogSink].
747 * 950 *
748 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 951 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
749 * error. 952 * error.
750 * 953 *
751 * If the used [http.Client] completes with an error when making a REST call, 954 * If the used [http.Client] completes with an error when making a REST call,
752 * this method will complete with the same error. 955 * this method will complete with the same error.
753 */ 956 */
(...skipping 19 matching lines...) Expand all
773 uploadMedia: _uploadMedia, 976 uploadMedia: _uploadMedia,
774 downloadOptions: _downloadOptions); 977 downloadOptions: _downloadOptions);
775 return _response.then((data) => new LogSink.fromJson(data)); 978 return _response.then((data) => new LogSink.fromJson(data));
776 } 979 }
777 980
778 /** 981 /**
779 * Lists sinks. 982 * Lists sinks.
780 * 983 *
781 * Request parameters: 984 * Request parameters:
782 * 985 *
783 * [parent] - Required. The resource name where this sink was created. 986 * [parent] - Required. The parent resource whose sinks are to be listed.
784 * Example: `"projects/my-logging-project"`. 987 * Examples: "projects/my-logging-project", "organizations/123456789".
785 * Value must have pattern "^projects/[^/]+$". 988 * Value must have pattern "^projects/[^/]+$".
786 * 989 *
787 * [pageSize] - Optional. The maximum number of results to return from this 990 * [pageSize] - Optional. The maximum number of results to return from this
788 * request. 991 * request. Non-positive values are ignored. The presence of nextPageToken in
789 * Non-positive values are ignored. The presence of `nextPageToken` in the 992 * the response indicates that more results might be available.
790 * response indicates that more results might be available.
791 * 993 *
792 * [pageToken] - Optional. If present, then retrieve the next batch of results 994 * [pageToken] - Optional. If present, then retrieve the next batch of results
793 * from the 995 * from the preceding call to this method. pageToken must be the value of
794 * preceding call to this method. `pageToken` must be the value of 996 * nextPageToken from the previous response. The values of other method
795 * `nextPageToken` from the previous response. The values of other method
796 * parameters should be identical to those in the previous call. 997 * parameters should be identical to those in the previous call.
797 * 998 *
798 * Completes with a [ListSinksResponse]. 999 * Completes with a [ListSinksResponse].
799 * 1000 *
800 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1001 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
801 * error. 1002 * error.
802 * 1003 *
803 * If the used [http.Client] completes with an error when making a REST call, 1004 * If the used [http.Client] completes with an error when making a REST call,
804 * this method will complete with the same error. 1005 * this method will complete with the same error.
805 */ 1006 */
(...skipping 21 matching lines...) Expand all
827 "GET", 1028 "GET",
828 body: _body, 1029 body: _body,
829 queryParams: _queryParams, 1030 queryParams: _queryParams,
830 uploadOptions: _uploadOptions, 1031 uploadOptions: _uploadOptions,
831 uploadMedia: _uploadMedia, 1032 uploadMedia: _uploadMedia,
832 downloadOptions: _downloadOptions); 1033 downloadOptions: _downloadOptions);
833 return _response.then((data) => new ListSinksResponse.fromJson(data)); 1034 return _response.then((data) => new ListSinksResponse.fromJson(data));
834 } 1035 }
835 1036
836 /** 1037 /**
837 * Updates or creates a sink. 1038 * Updates a sink. If the named sink doesn't exist, then this method is
1039 * identical to sinks.create. If the named sink does exist, then this method
1040 * replaces the following fields in the existing sink with values from the new
1041 * sink: destination, filter, output_version_format, start_time, and end_time.
1042 * The updated filter might also have a new writer_identity; see the
1043 * unique_writer_identity field.
838 * 1044 *
839 * [request] - The metadata request object. 1045 * [request] - The metadata request object.
840 * 1046 *
841 * Request parameters: 1047 * Request parameters:
842 * 1048 *
843 * [sinkName] - Required. The resource name of the sink to update, including 1049 * [sinkName] - Required. The full resource name of the sink to update,
844 * the parent 1050 * including the parent resource and the sink identifier:
845 * resource and the sink identifier. If the sink does not exist, this method 1051 * "projects/[PROJECT_ID]/sinks/[SINK_ID]"
846 * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. 1052 * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1053 * Example: "projects/my-project-id/sinks/my-sink-id".
847 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". 1054 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$".
848 * 1055 *
849 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated 1056 * [uniqueWriterIdentity] - Optional. See sinks.create for a description of
850 * service account returned 1057 * this field. When updating a sink, the effect of this field on the value of
851 * in the sink's writer_identity. Set this field to be true to export 1058 * writer_identity in the updated sink depends on both the old and new values
852 * logs from one project to a different project. This field is ignored for 1059 * of this field:
853 * non-project sinks (e.g. organization sinks) because those sinks are 1060 * If the old and new values of this field are both false or both true, then
854 * required to have dedicated service accounts. 1061 * there is no change to the sink's writer_identity.
1062 * If the old value was false and the new value is true, then writer_identity
1063 * is changed to a unique service account.
1064 * It is an error if the old value was true and the new value is false.
855 * 1065 *
856 * Completes with a [LogSink]. 1066 * Completes with a [LogSink].
857 * 1067 *
858 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1068 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
859 * error. 1069 * error.
860 * 1070 *
861 * If the used [http.Client] completes with an error when making a REST call, 1071 * If the used [http.Client] completes with an error when making a REST call,
862 * this method will complete with the same error. 1072 * this method will complete with the same error.
863 */ 1073 */
864 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) { 1074 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool uniqueWriterIdentity}) {
(...skipping 25 matching lines...) Expand all
890 downloadOptions: _downloadOptions); 1100 downloadOptions: _downloadOptions);
891 return _response.then((data) => new LogSink.fromJson(data)); 1101 return _response.then((data) => new LogSink.fromJson(data));
892 } 1102 }
893 1103
894 } 1104 }
895 1105
896 1106
897 1107
898 /** 1108 /**
899 * A generic empty message that you can re-use to avoid defining duplicated 1109 * A generic empty message that you can re-use to avoid defining duplicated
900 * empty messages in your APIs. A typical example is to use it as the request 1110 * empty messages in your APIs. A typical example is to use it as the request or
901 * or the response type of an API method. For instance: 1111 * the response type of an API method. For instance:
902 * 1112 * service Foo {
903 * service Foo { 1113 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
904 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 1114 * }
905 * } 1115 * The JSON representation for Empty is empty JSON object {}.
906 *
907 * The JSON representation for `Empty` is empty JSON object `{}`.
908 */ 1116 */
909 class Empty { 1117 class Empty {
910 1118
911 Empty(); 1119 Empty();
912 1120
913 Empty.fromJson(core.Map _json) { 1121 Empty.fromJson(core.Map _json) {
914 } 1122 }
915 1123
916 core.Map toJson() { 1124 core.Map toJson() {
917 var _json = new core.Map(); 1125 var _json = new core.Map();
918 return _json; 1126 return _json;
919 } 1127 }
920 } 1128 }
921 1129
922 /** 1130 /**
923 * A common proto for logging HTTP requests. Only contains semantics 1131 * A common proto for logging HTTP requests. Only contains semantics defined by
924 * defined by the HTTP specification. Product-specific logging 1132 * the HTTP specification. Product-specific logging information MUST be defined
925 * information MUST be defined in a separate message. 1133 * in a separate message.
926 */ 1134 */
927 class HttpRequest { 1135 class HttpRequest {
928 /** 1136 /**
929 * The number of HTTP response bytes inserted into cache. Set only when a 1137 * The number of HTTP response bytes inserted into cache. Set only when a
930 * cache fill was attempted. 1138 * cache fill was attempted.
931 */ 1139 */
932 core.String cacheFillBytes; 1140 core.String cacheFillBytes;
933 /** 1141 /**
934 * Whether or not an entity was served from cache 1142 * Whether or not an entity was served from cache (with or without
935 * (with or without validation). 1143 * validation).
936 */ 1144 */
937 core.bool cacheHit; 1145 core.bool cacheHit;
938 /** Whether or not a cache lookup was attempted. */ 1146 /** Whether or not a cache lookup was attempted. */
939 core.bool cacheLookup; 1147 core.bool cacheLookup;
940 /** 1148 /**
941 * Whether or not the response was validated with the origin server before 1149 * Whether or not the response was validated with the origin server before
942 * being served from cache. This field is only meaningful if `cache_hit` is 1150 * being served from cache. This field is only meaningful if cache_hit is
943 * True. 1151 * True.
944 */ 1152 */
945 core.bool cacheValidatedWithOriginServer; 1153 core.bool cacheValidatedWithOriginServer;
946 /** 1154 /**
947 * The request processing latency on the server, from the time the request was 1155 * The request processing latency on the server, from the time the request was
948 * received until the response was sent. 1156 * received until the response was sent.
949 */ 1157 */
950 core.String latency; 1158 core.String latency;
951 /** 1159 /**
952 * The referer URL of the request, as defined in 1160 * The referer URL of the request, as defined in HTTP/1.1 Header Field
953 * [HTTP/1.1 Header Field 1161 * Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
954 * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
955 */ 1162 */
956 core.String referer; 1163 core.String referer;
957 /** 1164 /**
958 * The IP address (IPv4 or IPv6) of the client that issued the HTTP 1165 * The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
959 * request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. 1166 * Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
960 */ 1167 */
961 core.String remoteIp; 1168 core.String remoteIp;
962 /** The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. */ 1169 /** The request method. Examples: "GET", "HEAD", "PUT", "POST". */
963 core.String requestMethod; 1170 core.String requestMethod;
964 /** 1171 /**
965 * The size of the HTTP request message in bytes, including the request 1172 * The size of the HTTP request message in bytes, including the request
966 * headers and the request body. 1173 * headers and the request body.
967 */ 1174 */
968 core.String requestSize; 1175 core.String requestSize;
969 /** 1176 /**
970 * The scheme (http, https), the host name, the path and the query 1177 * The scheme (http, https), the host name, the path and the query portion of
971 * portion of the URL that was requested. 1178 * the URL that was requested. Example:
972 * Example: `"http://example.com/some/info?color=red"`. 1179 * "http://example.com/some/info?color=red".
973 */ 1180 */
974 core.String requestUrl; 1181 core.String requestUrl;
975 /** 1182 /**
976 * The size of the HTTP response message sent back to the client, in bytes, 1183 * The size of the HTTP response message sent back to the client, in bytes,
977 * including the response headers and the response body. 1184 * including the response headers and the response body.
978 */ 1185 */
979 core.String responseSize; 1186 core.String responseSize;
980 /** 1187 /**
981 * The IP address (IPv4 or IPv6) of the origin server that the request was 1188 * The IP address (IPv4 or IPv6) of the origin server that the request was
982 * sent to. 1189 * sent to.
983 */ 1190 */
984 core.String serverIp; 1191 core.String serverIp;
985 /** 1192 /**
986 * The response code indicating the status of response. 1193 * The response code indicating the status of response. Examples: 200, 404.
987 * Examples: 200, 404.
988 */ 1194 */
989 core.int status; 1195 core.int status;
990 /** 1196 /**
991 * The user agent sent by the client. Example: 1197 * The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE
992 * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1198 * 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)".
993 * 1.0.3705)"`.
994 */ 1199 */
995 core.String userAgent; 1200 core.String userAgent;
996 1201
997 HttpRequest(); 1202 HttpRequest();
998 1203
999 HttpRequest.fromJson(core.Map _json) { 1204 HttpRequest.fromJson(core.Map _json) {
1000 if (_json.containsKey("cacheFillBytes")) { 1205 if (_json.containsKey("cacheFillBytes")) {
1001 cacheFillBytes = _json["cacheFillBytes"]; 1206 cacheFillBytes = _json["cacheFillBytes"];
1002 } 1207 }
1003 if (_json.containsKey("cacheHit")) { 1208 if (_json.containsKey("cacheHit")) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 if (key != null) { 1331 if (key != null) {
1127 _json["key"] = key; 1332 _json["key"] = key;
1128 } 1333 }
1129 if (valueType != null) { 1334 if (valueType != null) {
1130 _json["valueType"] = valueType; 1335 _json["valueType"] = valueType;
1131 } 1336 }
1132 return _json; 1337 return _json;
1133 } 1338 }
1134 } 1339 }
1135 1340
1136 /** The parameters to `ListLogEntries`. */ 1341 /** The parameters to ListLogEntries. */
1137 class ListLogEntriesRequest { 1342 class ListLogEntriesRequest {
1138 /** 1343 /**
1139 * Optional. A filter that chooses which log entries to return. See [Advanced 1344 * Optional. A filter that chooses which log entries to return. See Advanced
1140 * Logs Filters](/logging/docs/view/advanced_filters). Only log entries that 1345 * Logs Filters. Only log entries that match the filter are returned. An empty
1141 * match the filter are returned. An empty filter matches all log entries. 1346 * filter matches all log entries in the resources listed in resource_names.
1347 * Referencing a parent resource that is not listed in resource_names will
1348 * cause the filter to return no results. The maximum length of the filter is
1349 * 20000 characters.
1142 */ 1350 */
1143 core.String filter; 1351 core.String filter;
1144 /** 1352 /**
1145 * Optional. How the results should be sorted. Presently, the only permitted 1353 * Optional. How the results should be sorted. Presently, the only permitted
1146 * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first 1354 * values are "timestamp asc" (default) and "timestamp desc". The first option
1147 * option returns entries in order of increasing values of 1355 * returns entries in order of increasing values of LogEntry.timestamp (oldest
1148 * `LogEntry.timestamp` (oldest first), and the second option returns entries 1356 * first), and the second option returns entries in order of decreasing
1149 * in order of decreasing timestamps (newest first). Entries with equal 1357 * timestamps (newest first). Entries with equal timestamps are returned in
1150 * timestamps are returned in order of `LogEntry.insertId`. 1358 * order of LogEntry.insertId.
1151 */ 1359 */
1152 core.String orderBy; 1360 core.String orderBy;
1153 /** 1361 /**
1154 * Optional. The maximum number of results to return from this request. 1362 * Optional. The maximum number of results to return from this request.
1155 * Non-positive values are ignored. The presence of `nextPageToken` in the 1363 * Non-positive values are ignored. The presence of nextPageToken in the
1156 * response indicates that more results might be available. 1364 * response indicates that more results might be available.
1157 */ 1365 */
1158 core.int pageSize; 1366 core.int pageSize;
1159 /** 1367 /**
1160 * Optional. If present, then retrieve the next batch of results from the 1368 * Optional. If present, then retrieve the next batch of results from the
1161 * preceding call to this method. `pageToken` must be the value of 1369 * preceding call to this method. pageToken must be the value of nextPageToken
1162 * `nextPageToken` from the previous response. The values of other method 1370 * from the previous response. The values of other method parameters should be
1163 * parameters should be identical to those in the previous call. 1371 * identical to those in the previous call.
1164 */ 1372 */
1165 core.String pageToken; 1373 core.String pageToken;
1166 /** 1374 /**
1167 * Deprecated. One or more project identifiers or project numbers from which 1375 * Deprecated. Use resource_names instead. One or more project identifiers or
1168 * to retrieve log entries. Examples: `"my-project-1A"`, `"1234567890"`. If 1376 * project numbers from which to retrieve log entries. Example:
1169 * present, these project identifiers are converted to resource format and 1377 * "my-project-1A". If present, these project identifiers are converted to
1170 * added to the list of resources in `resourceNames`. Callers should use 1378 * resource name format and added to the list of resources in resource_names.
1171 * `resourceNames` rather than this parameter.
1172 */ 1379 */
1173 core.List<core.String> projectIds; 1380 core.List<core.String> projectIds;
1174 /** 1381 /**
1175 * Required. One or more cloud resources from which to retrieve log entries. 1382 * Required. Names of one or more resources from which to retrieve log
1176 * Example: `"projects/my-project-1A"`, `"projects/1234567890"`. Projects 1383 * entries:
1177 * listed in `projectIds` are added to this list. 1384 * "projects/[PROJECT_ID]"
1385 * "organizations/[ORGANIZATION_ID]"
1386 * Projects listed in the project_ids field are added to this list.
1178 */ 1387 */
1179 core.List<core.String> resourceNames; 1388 core.List<core.String> resourceNames;
1180 1389
1181 ListLogEntriesRequest(); 1390 ListLogEntriesRequest();
1182 1391
1183 ListLogEntriesRequest.fromJson(core.Map _json) { 1392 ListLogEntriesRequest.fromJson(core.Map _json) {
1184 if (_json.containsKey("filter")) { 1393 if (_json.containsKey("filter")) {
1185 filter = _json["filter"]; 1394 filter = _json["filter"];
1186 } 1395 }
1187 if (_json.containsKey("orderBy")) { 1396 if (_json.containsKey("orderBy")) {
(...skipping 30 matching lines...) Expand all
1218 if (projectIds != null) { 1427 if (projectIds != null) {
1219 _json["projectIds"] = projectIds; 1428 _json["projectIds"] = projectIds;
1220 } 1429 }
1221 if (resourceNames != null) { 1430 if (resourceNames != null) {
1222 _json["resourceNames"] = resourceNames; 1431 _json["resourceNames"] = resourceNames;
1223 } 1432 }
1224 return _json; 1433 return _json;
1225 } 1434 }
1226 } 1435 }
1227 1436
1228 /** Result returned from `ListLogEntries`. */ 1437 /** Result returned from ListLogEntries. */
1229 class ListLogEntriesResponse { 1438 class ListLogEntriesResponse {
1230 /** A list of log entries. */ 1439 /** A list of log entries. */
1231 core.List<LogEntry> entries; 1440 core.List<LogEntry> entries;
1232 /** 1441 /**
1233 * If there might be more results than appear in this response, then 1442 * If there might be more results than those appearing in this response, then
1234 * `nextPageToken` is included. To get the next set of results, call this 1443 * nextPageToken is included. To get the next set of results, call this method
1235 * method again using the value of `nextPageToken` as `pageToken`. 1444 * again using the value of nextPageToken as pageToken.If a value for
1445 * next_page_token appears and the entries field is empty, it means that the
1446 * search found no log entries so far but it did not have time to search all
1447 * the possible log entries. Retry the method with this value for page_token
1448 * to continue the search. Alternatively, consider speeding up the search by
1449 * changing your filter to specify a single log name or resource type, or to
1450 * narrow the time range of the search.
1236 */ 1451 */
1237 core.String nextPageToken; 1452 core.String nextPageToken;
1238 1453
1239 ListLogEntriesResponse(); 1454 ListLogEntriesResponse();
1240 1455
1241 ListLogEntriesResponse.fromJson(core.Map _json) { 1456 ListLogEntriesResponse.fromJson(core.Map _json) {
1242 if (_json.containsKey("entries")) { 1457 if (_json.containsKey("entries")) {
1243 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List(); 1458 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List();
1244 } 1459 }
1245 if (_json.containsKey("nextPageToken")) { 1460 if (_json.containsKey("nextPageToken")) {
(...skipping 12 matching lines...) Expand all
1258 return _json; 1473 return _json;
1259 } 1474 }
1260 } 1475 }
1261 1476
1262 /** Result returned from ListLogMetrics. */ 1477 /** Result returned from ListLogMetrics. */
1263 class ListLogMetricsResponse { 1478 class ListLogMetricsResponse {
1264 /** A list of logs-based metrics. */ 1479 /** A list of logs-based metrics. */
1265 core.List<LogMetric> metrics; 1480 core.List<LogMetric> metrics;
1266 /** 1481 /**
1267 * If there might be more results than appear in this response, then 1482 * If there might be more results than appear in this response, then
1268 * `nextPageToken` is included. To get the next set of results, call this 1483 * nextPageToken is included. To get the next set of results, call this method
1269 * method again using the value of `nextPageToken` as `pageToken`. 1484 * again using the value of nextPageToken as pageToken.
1270 */ 1485 */
1271 core.String nextPageToken; 1486 core.String nextPageToken;
1272 1487
1273 ListLogMetricsResponse(); 1488 ListLogMetricsResponse();
1274 1489
1275 ListLogMetricsResponse.fromJson(core.Map _json) { 1490 ListLogMetricsResponse.fromJson(core.Map _json) {
1276 if (_json.containsKey("metrics")) { 1491 if (_json.containsKey("metrics")) {
1277 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t oList(); 1492 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t oList();
1278 } 1493 }
1279 if (_json.containsKey("nextPageToken")) { 1494 if (_json.containsKey("nextPageToken")) {
1280 nextPageToken = _json["nextPageToken"]; 1495 nextPageToken = _json["nextPageToken"];
1281 } 1496 }
1282 } 1497 }
1283 1498
1284 core.Map toJson() { 1499 core.Map toJson() {
1285 var _json = new core.Map(); 1500 var _json = new core.Map();
1286 if (metrics != null) { 1501 if (metrics != null) {
1287 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); 1502 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
1288 } 1503 }
1289 if (nextPageToken != null) { 1504 if (nextPageToken != null) {
1290 _json["nextPageToken"] = nextPageToken; 1505 _json["nextPageToken"] = nextPageToken;
1291 } 1506 }
1292 return _json; 1507 return _json;
1293 } 1508 }
1294 } 1509 }
1295 1510
1511 /** Result returned from ListLogs. */
1512 class ListLogsResponse {
1513 /**
1514 * A list of log names. For example, "projects/my-project/syslog" or
1515 * "organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
1516 */
1517 core.List<core.String> logNames;
1518 /**
1519 * If there might be more results than those appearing in this response, then
1520 * nextPageToken is included. To get the next set of results, call this method
1521 * again using the value of nextPageToken as pageToken.
1522 */
1523 core.String nextPageToken;
1524
1525 ListLogsResponse();
1526
1527 ListLogsResponse.fromJson(core.Map _json) {
1528 if (_json.containsKey("logNames")) {
1529 logNames = _json["logNames"];
1530 }
1531 if (_json.containsKey("nextPageToken")) {
1532 nextPageToken = _json["nextPageToken"];
1533 }
1534 }
1535
1536 core.Map toJson() {
1537 var _json = new core.Map();
1538 if (logNames != null) {
1539 _json["logNames"] = logNames;
1540 }
1541 if (nextPageToken != null) {
1542 _json["nextPageToken"] = nextPageToken;
1543 }
1544 return _json;
1545 }
1546 }
1547
1296 /** Result returned from ListMonitoredResourceDescriptors. */ 1548 /** Result returned from ListMonitoredResourceDescriptors. */
1297 class ListMonitoredResourceDescriptorsResponse { 1549 class ListMonitoredResourceDescriptorsResponse {
1298 /** 1550 /**
1299 * If there might be more results than appear in this response, then 1551 * If there might be more results than those appearing in this response, then
1300 * `nextPageToken` is included. To get the next set of results, call this 1552 * nextPageToken is included. To get the next set of results, call this method
1301 * method again using the value of `nextPageToken` as `pageToken`. 1553 * again using the value of nextPageToken as pageToken.
1302 */ 1554 */
1303 core.String nextPageToken; 1555 core.String nextPageToken;
1304 /** A list of resource descriptors. */ 1556 /** A list of resource descriptors. */
1305 core.List<MonitoredResourceDescriptor> resourceDescriptors; 1557 core.List<MonitoredResourceDescriptor> resourceDescriptors;
1306 1558
1307 ListMonitoredResourceDescriptorsResponse(); 1559 ListMonitoredResourceDescriptorsResponse();
1308 1560
1309 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { 1561 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) {
1310 if (_json.containsKey("nextPageToken")) { 1562 if (_json.containsKey("nextPageToken")) {
1311 nextPageToken = _json["nextPageToken"]; 1563 nextPageToken = _json["nextPageToken"];
1312 } 1564 }
1313 if (_json.containsKey("resourceDescriptors")) { 1565 if (_json.containsKey("resourceDescriptors")) {
1314 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni toredResourceDescriptor.fromJson(value)).toList(); 1566 resourceDescriptors = _json["resourceDescriptors"].map((value) => new Moni toredResourceDescriptor.fromJson(value)).toList();
1315 } 1567 }
1316 } 1568 }
1317 1569
1318 core.Map toJson() { 1570 core.Map toJson() {
1319 var _json = new core.Map(); 1571 var _json = new core.Map();
1320 if (nextPageToken != null) { 1572 if (nextPageToken != null) {
1321 _json["nextPageToken"] = nextPageToken; 1573 _json["nextPageToken"] = nextPageToken;
1322 } 1574 }
1323 if (resourceDescriptors != null) { 1575 if (resourceDescriptors != null) {
1324 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value). toJson()).toList(); 1576 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value). toJson()).toList();
1325 } 1577 }
1326 return _json; 1578 return _json;
1327 } 1579 }
1328 } 1580 }
1329 1581
1330 /** Result returned from `ListSinks`. */ 1582 /** Result returned from ListSinks. */
1331 class ListSinksResponse { 1583 class ListSinksResponse {
1332 /** 1584 /**
1333 * If there might be more results than appear in this response, then 1585 * If there might be more results than appear in this response, then
1334 * `nextPageToken` is included. To get the next set of results, call the same 1586 * nextPageToken is included. To get the next set of results, call the same
1335 * method again using the value of `nextPageToken` as `pageToken`. 1587 * method again using the value of nextPageToken as pageToken.
1336 */ 1588 */
1337 core.String nextPageToken; 1589 core.String nextPageToken;
1338 /** A list of sinks. */ 1590 /** A list of sinks. */
1339 core.List<LogSink> sinks; 1591 core.List<LogSink> sinks;
1340 1592
1341 ListSinksResponse(); 1593 ListSinksResponse();
1342 1594
1343 ListSinksResponse.fromJson(core.Map _json) { 1595 ListSinksResponse.fromJson(core.Map _json) {
1344 if (_json.containsKey("nextPageToken")) { 1596 if (_json.containsKey("nextPageToken")) {
1345 nextPageToken = _json["nextPageToken"]; 1597 nextPageToken = _json["nextPageToken"];
(...skipping 11 matching lines...) Expand all
1357 if (sinks != null) { 1609 if (sinks != null) {
1358 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); 1610 _json["sinks"] = sinks.map((value) => (value).toJson()).toList();
1359 } 1611 }
1360 return _json; 1612 return _json;
1361 } 1613 }
1362 } 1614 }
1363 1615
1364 /** An individual entry in a log. */ 1616 /** An individual entry in a log. */
1365 class LogEntry { 1617 class LogEntry {
1366 /** 1618 /**
1367 * Optional. Information about the HTTP request associated with this 1619 * Optional. Information about the HTTP request associated with this log
1368 * log entry, if applicable. 1620 * entry, if applicable.
1369 */ 1621 */
1370 HttpRequest httpRequest; 1622 HttpRequest httpRequest;
1371 /** 1623 /**
1372 * Optional. A unique ID for the log entry. If you provide this 1624 * Optional. A unique ID for the log entry. If you provide this field, the
1373 * field, the logging service considers other log entries in the 1625 * logging service considers other log entries in the same project with the
1374 * same project with the same ID as duplicates which can be removed. If 1626 * same ID as duplicates which can be removed. If omitted, Stackdriver Logging
1375 * omitted, Stackdriver Logging will generate a unique ID for this 1627 * will generate a unique ID for this log entry.
1376 * log entry.
1377 */ 1628 */
1378 core.String insertId; 1629 core.String insertId;
1379 /** 1630 /**
1380 * The log entry payload, represented as a structure that 1631 * The log entry payload, represented as a structure that is expressed as a
1381 * is expressed as a JSON object. 1632 * JSON object.
1382 * 1633 *
1383 * The values for Object must be JSON objects. It can consist of `num`, 1634 * The values for Object must be JSON objects. It can consist of `num`,
1384 * `String`, `bool` and `null` as well as `Map` and `List` values. 1635 * `String`, `bool` and `null` as well as `Map` and `List` values.
1385 */ 1636 */
1386 core.Map<core.String, core.Object> jsonPayload; 1637 core.Map<core.String, core.Object> jsonPayload;
1387 /** 1638 /**
1388 * Optional. A set of user-defined (key, value) data that provides additional 1639 * Optional. A set of user-defined (key, value) data that provides additional
1389 * information about the log entry. 1640 * information about the log entry.
1390 */ 1641 */
1391 core.Map<core.String, core.String> labels; 1642 core.Map<core.String, core.String> labels;
1392 /** 1643 /**
1393 * Required. The resource name of the log to which this log entry 1644 * Required. The resource name of the log to which this log entry belongs:
1394 * belongs. The format of the name is 1645 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
1395 * `"projects/<project-id>/logs/<log-id>"`. Examples: 1646 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1396 * `"projects/my-projectid/logs/syslog"`, 1647 * [LOG_ID] must be URL-encoded within log_name. Example:
1397 * `"projects/my-projectid/logs/library.googleapis.com%2Fbook_log"`. 1648 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
1398 * 1649 * [LOG_ID] must be less than 512 characters long and can only include the
1399 * The log ID part of resource name must be less than 512 characters 1650 * following characters: upper and lower case alphanumeric characters,
1400 * long and can only include the following characters: upper and 1651 * forward-slash, underscore, hyphen, and period.For backward compatibility,
1401 * lower case alphanumeric characters: [A-Za-z0-9]; and punctuation 1652 * if log_name begins with a forward-slash, such as /projects/..., then the
1402 * characters: forward-slash, underscore, hyphen, and period. 1653 * log entry is ingested as usual but the forward-slash is removed. Listing
1403 * Forward-slash (`/`) characters in the log ID must be URL-encoded. 1654 * the log entry will not show the leading slash and filtering for a log name
1655 * with a leading slash will never return any results.
1404 */ 1656 */
1405 core.String logName; 1657 core.String logName;
1406 /** 1658 /**
1407 * Optional. Information about an operation associated with the log entry, if 1659 * Optional. Information about an operation associated with the log entry, if
1408 * applicable. 1660 * applicable.
1409 */ 1661 */
1410 LogEntryOperation operation; 1662 LogEntryOperation operation;
1411 /** 1663 /**
1412 * The log entry payload, represented as a protocol buffer. Some 1664 * The log entry payload, represented as a protocol buffer. Some Google Cloud
1413 * Google Cloud Platform services use this field for their log 1665 * Platform services use this field for their log entry payloads.
1414 * entry payloads.
1415 * 1666 *
1416 * The values for Object must be JSON objects. It can consist of `num`, 1667 * The values for Object must be JSON objects. It can consist of `num`,
1417 * `String`, `bool` and `null` as well as `Map` and `List` values. 1668 * `String`, `bool` and `null` as well as `Map` and `List` values.
1418 */ 1669 */
1419 core.Map<core.String, core.Object> protoPayload; 1670 core.Map<core.String, core.Object> protoPayload;
1420 /** 1671 /**
1421 * Required. The monitored resource associated with this log entry. 1672 * Required. The monitored resource associated with this log entry. Example: a
1422 * Example: a log entry that reports a database error would be 1673 * log entry that reports a database error would be associated with the
1423 * associated with the monitored resource designating the particular 1674 * monitored resource designating the particular database that reported the
1424 * database that reported the error. 1675 * error.
1425 */ 1676 */
1426 MonitoredResource resource; 1677 MonitoredResource resource;
1427 /** 1678 /**
1428 * Optional. The severity of the log entry. The default value is 1679 * Optional. The severity of the log entry. The default value is
1429 * `LogSeverity.DEFAULT`. 1680 * LogSeverity.DEFAULT.
1430 * Possible string values are: 1681 * Possible string values are:
1431 * - "DEFAULT" : (0) The log entry has no assigned severity level. 1682 * - "DEFAULT" : (0) The log entry has no assigned severity level.
1432 * - "DEBUG" : (100) Debug or trace information. 1683 * - "DEBUG" : (100) Debug or trace information.
1433 * - "INFO" : (200) Routine information, such as ongoing status or 1684 * - "INFO" : (200) Routine information, such as ongoing status or
1434 * performance. 1685 * performance.
1435 * - "NOTICE" : (300) Normal but significant events, such as start up, shut 1686 * - "NOTICE" : (300) Normal but significant events, such as start up, shut
1436 * down, or 1687 * down, or a configuration change.
1437 * a configuration change.
1438 * - "WARNING" : (400) Warning events might cause problems. 1688 * - "WARNING" : (400) Warning events might cause problems.
1439 * - "ERROR" : (500) Error events are likely to cause problems. 1689 * - "ERROR" : (500) Error events are likely to cause problems.
1440 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. 1690 * - "CRITICAL" : (600) Critical events cause more severe problems or outages.
1441 * - "ALERT" : (700) A person must take an action immediately. 1691 * - "ALERT" : (700) A person must take an action immediately.
1442 * - "EMERGENCY" : (800) One or more systems are unusable. 1692 * - "EMERGENCY" : (800) One or more systems are unusable.
1443 */ 1693 */
1444 core.String severity; 1694 core.String severity;
1695 /**
1696 * Optional. Source code location information associated with the log entry,
1697 * if any.
1698 */
1699 LogEntrySourceLocation sourceLocation;
1445 /** The log entry payload, represented as a Unicode string (UTF-8). */ 1700 /** The log entry payload, represented as a Unicode string (UTF-8). */
1446 core.String textPayload; 1701 core.String textPayload;
1447 /** 1702 /**
1448 * Optional. The time the event described by the log entry occurred. If 1703 * Optional. The time the event described by the log entry occurred. If
1449 * omitted, Stackdriver Logging will use the time the log entry is received. 1704 * omitted, Stackdriver Logging will use the time the log entry is received.
1450 */ 1705 */
1451 core.String timestamp; 1706 core.String timestamp;
1707 /**
1708 * Optional. Resource name of the trace associated with the log entry, if any.
1709 * If it contains a relative resource name, the name is assumed to be relative
1710 * to //tracing.googleapis.com. Example:
1711 * projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
1712 */
1713 core.String trace;
1452 1714
1453 LogEntry(); 1715 LogEntry();
1454 1716
1455 LogEntry.fromJson(core.Map _json) { 1717 LogEntry.fromJson(core.Map _json) {
1456 if (_json.containsKey("httpRequest")) { 1718 if (_json.containsKey("httpRequest")) {
1457 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); 1719 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]);
1458 } 1720 }
1459 if (_json.containsKey("insertId")) { 1721 if (_json.containsKey("insertId")) {
1460 insertId = _json["insertId"]; 1722 insertId = _json["insertId"];
1461 } 1723 }
(...skipping 11 matching lines...) Expand all
1473 } 1735 }
1474 if (_json.containsKey("protoPayload")) { 1736 if (_json.containsKey("protoPayload")) {
1475 protoPayload = _json["protoPayload"]; 1737 protoPayload = _json["protoPayload"];
1476 } 1738 }
1477 if (_json.containsKey("resource")) { 1739 if (_json.containsKey("resource")) {
1478 resource = new MonitoredResource.fromJson(_json["resource"]); 1740 resource = new MonitoredResource.fromJson(_json["resource"]);
1479 } 1741 }
1480 if (_json.containsKey("severity")) { 1742 if (_json.containsKey("severity")) {
1481 severity = _json["severity"]; 1743 severity = _json["severity"];
1482 } 1744 }
1745 if (_json.containsKey("sourceLocation")) {
1746 sourceLocation = new LogEntrySourceLocation.fromJson(_json["sourceLocation "]);
1747 }
1483 if (_json.containsKey("textPayload")) { 1748 if (_json.containsKey("textPayload")) {
1484 textPayload = _json["textPayload"]; 1749 textPayload = _json["textPayload"];
1485 } 1750 }
1486 if (_json.containsKey("timestamp")) { 1751 if (_json.containsKey("timestamp")) {
1487 timestamp = _json["timestamp"]; 1752 timestamp = _json["timestamp"];
1488 } 1753 }
1754 if (_json.containsKey("trace")) {
1755 trace = _json["trace"];
1756 }
1489 } 1757 }
1490 1758
1491 core.Map toJson() { 1759 core.Map toJson() {
1492 var _json = new core.Map(); 1760 var _json = new core.Map();
1493 if (httpRequest != null) { 1761 if (httpRequest != null) {
1494 _json["httpRequest"] = (httpRequest).toJson(); 1762 _json["httpRequest"] = (httpRequest).toJson();
1495 } 1763 }
1496 if (insertId != null) { 1764 if (insertId != null) {
1497 _json["insertId"] = insertId; 1765 _json["insertId"] = insertId;
1498 } 1766 }
(...skipping 11 matching lines...) Expand all
1510 } 1778 }
1511 if (protoPayload != null) { 1779 if (protoPayload != null) {
1512 _json["protoPayload"] = protoPayload; 1780 _json["protoPayload"] = protoPayload;
1513 } 1781 }
1514 if (resource != null) { 1782 if (resource != null) {
1515 _json["resource"] = (resource).toJson(); 1783 _json["resource"] = (resource).toJson();
1516 } 1784 }
1517 if (severity != null) { 1785 if (severity != null) {
1518 _json["severity"] = severity; 1786 _json["severity"] = severity;
1519 } 1787 }
1788 if (sourceLocation != null) {
1789 _json["sourceLocation"] = (sourceLocation).toJson();
1790 }
1520 if (textPayload != null) { 1791 if (textPayload != null) {
1521 _json["textPayload"] = textPayload; 1792 _json["textPayload"] = textPayload;
1522 } 1793 }
1523 if (timestamp != null) { 1794 if (timestamp != null) {
1524 _json["timestamp"] = timestamp; 1795 _json["timestamp"] = timestamp;
1525 } 1796 }
1797 if (trace != null) {
1798 _json["trace"] = trace;
1799 }
1526 return _json; 1800 return _json;
1527 } 1801 }
1528 } 1802 }
1529 1803
1530 /** 1804 /**
1531 * Additional information about a potentially long-running operation with which 1805 * Additional information about a potentially long-running operation with which
1532 * a log entry is associated. 1806 * a log entry is associated.
1533 */ 1807 */
1534 class LogEntryOperation { 1808 class LogEntryOperation {
1535 /** 1809 /**
1536 * Optional. Set this to True if this is the first log entry in the operation. 1810 * Optional. Set this to True if this is the first log entry in the operation.
1537 */ 1811 */
1538 core.bool first; 1812 core.bool first;
1539 /** 1813 /**
1540 * Optional. An arbitrary operation identifier. Log entries with the 1814 * Optional. An arbitrary operation identifier. Log entries with the same
1541 * same identifier are assumed to be part of the same operation. 1815 * identifier are assumed to be part of the same operation.
1542 */ 1816 */
1543 core.String id; 1817 core.String id;
1544 /** 1818 /**
1545 * Optional. Set this to True if this is the last log entry in the operation. 1819 * Optional. Set this to True if this is the last log entry in the operation.
1546 */ 1820 */
1547 core.bool last; 1821 core.bool last;
1548 /** 1822 /**
1549 * Optional. An arbitrary producer identifier. The combination of 1823 * Optional. An arbitrary producer identifier. The combination of id and
1550 * `id` and `producer` must be globally unique. Examples for `producer`: 1824 * producer must be globally unique. Examples for producer:
1551 * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. 1825 * "MyDivision.MyBigCompany.com", "github.com/MyProject/MyApplication".
1552 */ 1826 */
1553 core.String producer; 1827 core.String producer;
1554 1828
1555 LogEntryOperation(); 1829 LogEntryOperation();
1556 1830
1557 LogEntryOperation.fromJson(core.Map _json) { 1831 LogEntryOperation.fromJson(core.Map _json) {
1558 if (_json.containsKey("first")) { 1832 if (_json.containsKey("first")) {
1559 first = _json["first"]; 1833 first = _json["first"];
1560 } 1834 }
1561 if (_json.containsKey("id")) { 1835 if (_json.containsKey("id")) {
(...skipping 18 matching lines...) Expand all
1580 if (last != null) { 1854 if (last != null) {
1581 _json["last"] = last; 1855 _json["last"] = last;
1582 } 1856 }
1583 if (producer != null) { 1857 if (producer != null) {
1584 _json["producer"] = producer; 1858 _json["producer"] = producer;
1585 } 1859 }
1586 return _json; 1860 return _json;
1587 } 1861 }
1588 } 1862 }
1589 1863
1864 /**
1865 * Additional information about the source code location that produced the log
1866 * entry.
1867 */
1868 class LogEntrySourceLocation {
1869 /**
1870 * Optional. Source file name. Depending on the runtime environment, this
1871 * might be a simple name or a fully-qualified name.
1872 */
1873 core.String file;
1874 /**
1875 * Optional. Human-readable name of the function or method being invoked, with
1876 * optional context such as the class or package name. This information may be
1877 * used in contexts such as the logs viewer, where a file and line number are
1878 * less meaningful. The format can vary by language. For example:
1879 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
1880 */
1881 core.String function;
1882 /**
1883 * Optional. Line within the source file. 1-based; 0 indicates no line number
1884 * available.
1885 */
1886 core.String line;
1887
1888 LogEntrySourceLocation();
1889
1890 LogEntrySourceLocation.fromJson(core.Map _json) {
1891 if (_json.containsKey("file")) {
1892 file = _json["file"];
1893 }
1894 if (_json.containsKey("function")) {
1895 function = _json["function"];
1896 }
1897 if (_json.containsKey("line")) {
1898 line = _json["line"];
1899 }
1900 }
1901
1902 core.Map toJson() {
1903 var _json = new core.Map();
1904 if (file != null) {
1905 _json["file"] = file;
1906 }
1907 if (function != null) {
1908 _json["function"] = function;
1909 }
1910 if (line != null) {
1911 _json["line"] = line;
1912 }
1913 return _json;
1914 }
1915 }
1916
1590 /** Application log line emitted while processing a request. */ 1917 /** Application log line emitted while processing a request. */
1591 class LogLine { 1918 class LogLine {
1592 /** App-provided log message. */ 1919 /** App-provided log message. */
1593 core.String logMessage; 1920 core.String logMessage;
1594 /** 1921 /**
1595 * Severity of this log entry. 1922 * Severity of this log entry.
1596 * Possible string values are: 1923 * Possible string values are:
1597 * - "DEFAULT" : (0) The log entry has no assigned severity level. 1924 * - "DEFAULT" : (0) The log entry has no assigned severity level.
1598 * - "DEBUG" : (100) Debug or trace information. 1925 * - "DEBUG" : (100) Debug or trace information.
1599 * - "INFO" : (200) Routine information, such as ongoing status or 1926 * - "INFO" : (200) Routine information, such as ongoing status or
1600 * performance. 1927 * performance.
1601 * - "NOTICE" : (300) Normal but significant events, such as start up, shut 1928 * - "NOTICE" : (300) Normal but significant events, such as start up, shut
1602 * down, or 1929 * down, or a configuration change.
1603 * a configuration change.
1604 * - "WARNING" : (400) Warning events might cause problems. 1930 * - "WARNING" : (400) Warning events might cause problems.
1605 * - "ERROR" : (500) Error events are likely to cause problems. 1931 * - "ERROR" : (500) Error events are likely to cause problems.
1606 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. 1932 * - "CRITICAL" : (600) Critical events cause more severe problems or outages.
1607 * - "ALERT" : (700) A person must take an action immediately. 1933 * - "ALERT" : (700) A person must take an action immediately.
1608 * - "EMERGENCY" : (800) One or more systems are unusable. 1934 * - "EMERGENCY" : (800) One or more systems are unusable.
1609 */ 1935 */
1610 core.String severity; 1936 core.String severity;
1611 /** Where in the source code this log message was written. */ 1937 /** Where in the source code this log message was written. */
1612 SourceLocation sourceLocation; 1938 SourceLocation sourceLocation;
1613 /** Approximate time when this log entry was made. */ 1939 /** Approximate time when this log entry was made. */
(...skipping 28 matching lines...) Expand all
1642 _json["sourceLocation"] = (sourceLocation).toJson(); 1968 _json["sourceLocation"] = (sourceLocation).toJson();
1643 } 1969 }
1644 if (time != null) { 1970 if (time != null) {
1645 _json["time"] = time; 1971 _json["time"] = time;
1646 } 1972 }
1647 return _json; 1973 return _json;
1648 } 1974 }
1649 } 1975 }
1650 1976
1651 /** 1977 /**
1652 * Describes a logs-based metric. The value of the metric is the 1978 * Describes a logs-based metric. The value of the metric is the number of log
1653 * number of log entries that match a logs filter. 1979 * entries that match a logs filter in a given time interval.
1654 */ 1980 */
1655 class LogMetric { 1981 class LogMetric {
1656 /** 1982 /**
1657 * Optional. A description of this metric, which is used in documentation. 1983 * Optional. A description of this metric, which is used in documentation.
1658 */ 1984 */
1659 core.String description; 1985 core.String description;
1660 /** 1986 /**
1661 * Required. An [advanced logs filter](/logging/docs/view/advanced_filters). 1987 * Required. An advanced logs filter which is used to match log entries.
1662 * Example: `"resource.type=gae_app AND severity>=ERROR"`. 1988 * Example:
1989 * "resource.type=gae_app AND severity>=ERROR"
1990 * The maximum length of the filter is 20000 characters.
1663 */ 1991 */
1664 core.String filter; 1992 core.String filter;
1665 /** 1993 /**
1666 * Required. The client-assigned metric identifier. Example: 1994 * Required. The client-assigned metric identifier. Examples: "error_count",
1667 * `"severe_errors"`. Metric identifiers are limited to 100 1995 * "nginx/requests".Metric identifiers are limited to 100 characters and can
1668 * characters and can include only the following characters: `A-Z`, 1996 * include only the following characters: A-Z, a-z, 0-9, and the special
1669 * `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The 1997 * characters _-.,+!*',()%/. The forward-slash character (/) denotes a
1670 * forward-slash character (`/`) denotes a hierarchy of name pieces, 1998 * hierarchy of name pieces, and it cannot be the first character of the
1671 * and it cannot be the first character of the name. The '%' character 1999 * name.The metric identifier in this field must not be URL-encoded
1672 * is used to URL encode unsafe and reserved characters and must be 2000 * (https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric
1673 * followed by two hexadecimal digits according to RFC 1738. 2001 * identifier appears as the [METRIC_ID] part of a metric_name API parameter,
2002 * then the metric identifier must be URL-encoded. Example:
2003 * "projects/my-project/metrics/nginx%2Frequests".
1674 */ 2004 */
1675 core.String name; 2005 core.String name;
1676 /** 2006 /**
1677 * Output only. The API version that created or updated this metric. 2007 * Output only. The API version that created or updated this metric. The
1678 * The version also dictates the syntax of the filter expression. When a value 2008 * version also dictates the syntax of the filter expression. When a value for
1679 * for this field is missing, the default value of V2 should be assumed. 2009 * this field is missing, the default value of V2 should be assumed.
1680 * Possible string values are: 2010 * Possible string values are:
1681 * - "V2" : Stackdriver Logging API v2. 2011 * - "V2" : Stackdriver Logging API v2.
1682 * - "V1" : Stackdriver Logging API v1. 2012 * - "V1" : Stackdriver Logging API v1.
1683 */ 2013 */
1684 core.String version; 2014 core.String version;
1685 2015
1686 LogMetric(); 2016 LogMetric();
1687 2017
1688 LogMetric.fromJson(core.Map _json) { 2018 LogMetric.fromJson(core.Map _json) {
1689 if (_json.containsKey("description")) { 2019 if (_json.containsKey("description")) {
(...skipping 22 matching lines...) Expand all
1712 _json["name"] = name; 2042 _json["name"] = name;
1713 } 2043 }
1714 if (version != null) { 2044 if (version != null) {
1715 _json["version"] = version; 2045 _json["version"] = version;
1716 } 2046 }
1717 return _json; 2047 return _json;
1718 } 2048 }
1719 } 2049 }
1720 2050
1721 /** 2051 /**
1722 * Describes a sink used to export log entries outside of Stackdriver Logging. 2052 * Describes a sink used to export log entries to one of the following
1723 * A logs filter controls which log entries are exported. Sinks can have a 2053 * destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
1724 * start time and an end time; these can be used to place log entries from an 2054 * Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
1725 * exact time range into a particular destination. If both `start_time` and 2055 * The sink must be created within a project or organization.
1726 * `end_time` are present, then `start_time` must be less than `end_time`.
1727 */ 2056 */
1728 class LogSink { 2057 class LogSink {
1729 /** 2058 /**
1730 * Required. The export destination. See 2059 * Required. The export destination:
1731 * [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). 2060 * "storage.googleapis.com/[GCS_BUCKET]"
1732 * Examples: 2061 * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
1733 * 2062 * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
1734 * "storage.googleapis.com/my-gcs-bucket" 2063 * The sink's writer_identity, set when the sink is created, must have
1735 * "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset" 2064 * permission to write to the destination or else the log entries are not
1736 * "pubsub.googleapis.com/projects/my-project/topics/my-topic" 2065 * exported. For more information, see Exporting Logs With Sinks.
1737 */ 2066 */
1738 core.String destination; 2067 core.String destination;
1739 /** 2068 /**
1740 * Optional. Time at which this sink will stop exporting log entries. If this 2069 * Optional. The time at which this sink will stop exporting log entries. Log
1741 * value is present, then log entries are exported only if `entry.timestamp` < 2070 * entries are exported only if their timestamp is earlier than the end time.
1742 * `end_time`. 2071 * If this field is not supplied, there is no end time. If both a start time
2072 * and an end time are provided, then the end time must be later than the
2073 * start time.
1743 */ 2074 */
1744 core.String endTime; 2075 core.String endTime;
1745 /** 2076 /**
1746 * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). 2077 * Optional. An advanced logs filter. The only exported log entries are those
1747 * Only log entries matching the filter are exported. The filter 2078 * that are in the resource owning the sink and that match the filter. The
1748 * must be consistent with the log entry format specified by the 2079 * filter must use the log entry format specified by the output_version_format
1749 * `outputVersionFormat` parameter, regardless of the format of the 2080 * parameter. For example, in the v2 format:
1750 * log entry that was originally written to Stackdriver Logging. 2081 * logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
1751 * Example filter (V2 format):
1752 *
1753 * logName=projects/my-projectid/logs/syslog AND severity>=ERROR
1754 */ 2082 */
1755 core.String filter; 2083 core.String filter;
1756 /** 2084 /**
1757 * Required. The client-assigned sink identifier, unique within the 2085 * Required. The client-assigned sink identifier, unique within the project.
1758 * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are 2086 * Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
1759 * limited to 1000 characters and can include only the following characters: 2087 * characters and can include only the following characters: upper and
1760 * `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length 2088 * lower-case alphanumeric characters, underscores, hyphens, and periods.
1761 * of the name is 100 characters.
1762 */ 2089 */
1763 core.String name; 2090 core.String name;
1764 /** 2091 /**
1765 * Optional. The log entry version to use for this sink's exported log 2092 * Optional. The log entry format to use for this sink's exported log entries.
1766 * entries. This version does not have to correspond to the version of the 2093 * The v2 format is used by default. The v1 format is deprecated and should be
1767 * log entry that was written to Stackdriver Logging. If omitted, the 2094 * used only as part of a migration effort to v2. See Migration to the v2 API.
1768 * v2 format is used.
1769 * Possible string values are: 2095 * Possible string values are:
1770 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified version format will default 2096 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified format version that will
1771 * to V2. 2097 * default to V2.
1772 * - "V2" : `LogEntry` version 2 format. 2098 * - "V2" : LogEntry version 2 format.
1773 * - "V1" : `LogEntry` version 1 format. 2099 * - "V1" : LogEntry version 1 format.
1774 */ 2100 */
1775 core.String outputVersionFormat; 2101 core.String outputVersionFormat;
1776 /** 2102 /**
1777 * Optional. The time at which this sink will begin exporting log entries. If 2103 * Optional. The time at which this sink will begin exporting log entries. Log
1778 * this value is present, then log entries are exported only if `start_time` 2104 * entries are exported only if their timestamp is not earlier than the start
1779 * <=`entry.timestamp`. 2105 * time. The default value of this field is the time the sink is created or
2106 * updated.
1780 */ 2107 */
1781 core.String startTime; 2108 core.String startTime;
1782 /** 2109 /**
1783 * Output only. An IAM identity&mdash;a service account or group&mdash;that 2110 * Output only. An IAM identity&mdash;a service account or group&mdash;under
1784 * will write exported log entries to the destination on behalf of Stackdriver 2111 * which Stackdriver Logging writes the exported log entries to the sink's
1785 * Logging. You must grant this identity write-access to the destination. 2112 * destination. This field is set by sinks.create and sinks.update, based on
1786 * Consult the destination service's documentation to determine the exact role 2113 * the setting of unique_writer_identity in those methods.Until you grant this
1787 * that must be granted. 2114 * identity write-access to the destination, log entry exports from this sink
2115 * will fail. For more information, see Granting access for a resource.
2116 * Consult the destination service's documentation to determine the
2117 * appropriate IAM roles to assign to the identity.
1788 */ 2118 */
1789 core.String writerIdentity; 2119 core.String writerIdentity;
1790 2120
1791 LogSink(); 2121 LogSink();
1792 2122
1793 LogSink.fromJson(core.Map _json) { 2123 LogSink.fromJson(core.Map _json) {
1794 if (_json.containsKey("destination")) { 2124 if (_json.containsKey("destination")) {
1795 destination = _json["destination"]; 2125 destination = _json["destination"];
1796 } 2126 }
1797 if (_json.containsKey("endTime")) { 2127 if (_json.containsKey("endTime")) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 if (writerIdentity != null) { 2167 if (writerIdentity != null) {
1838 _json["writerIdentity"] = writerIdentity; 2168 _json["writerIdentity"] = writerIdentity;
1839 } 2169 }
1840 return _json; 2170 return _json;
1841 } 2171 }
1842 } 2172 }
1843 2173
1844 /** 2174 /**
1845 * An object representing a resource that can be used for monitoring, logging, 2175 * An object representing a resource that can be used for monitoring, logging,
1846 * billing, or other purposes. Examples include virtual machine instances, 2176 * billing, or other purposes. Examples include virtual machine instances,
1847 * databases, and storage devices such as disks. The `type` field identifies a 2177 * databases, and storage devices such as disks. The type field identifies a
1848 * MonitoredResourceDescriptor object that describes the resource's 2178 * MonitoredResourceDescriptor object that describes the resource's schema.
1849 * schema. Information in the `labels` field identifies the actual resource and 2179 * Information in the labels field identifies the actual resource and its
1850 * its attributes according to the schema. For example, a particular Compute 2180 * attributes according to the schema. For example, a particular Compute Engine
1851 * Engine VM instance could be represented by the following object, because the 2181 * VM instance could be represented by the following object, because the
1852 * MonitoredResourceDescriptor for `"gce_instance"` has labels 2182 * MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and
1853 * `"instance_id"` and `"zone"`: 2183 * "zone":
1854 * 2184 * { "type": "gce_instance",
1855 * { "type": "gce_instance", 2185 * "labels": { "instance_id": "12345678901234",
1856 * "labels": { "instance_id": "12345678901234", 2186 * "zone": "us-central1-a" }}
1857 * "zone": "us-central1-a" }}
1858 */ 2187 */
1859 class MonitoredResource { 2188 class MonitoredResource {
1860 /** 2189 /**
1861 * Required. Values for all of the labels listed in the associated monitored 2190 * Required. Values for all of the labels listed in the associated monitored
1862 * resource descriptor. For example, Cloud SQL databases use the labels 2191 * resource descriptor. For example, Cloud SQL databases use the labels
1863 * `"database_id"` and `"zone"`. 2192 * "database_id" and "zone".
1864 */ 2193 */
1865 core.Map<core.String, core.String> labels; 2194 core.Map<core.String, core.String> labels;
1866 /** 2195 /**
1867 * Required. The monitored resource type. This field must match 2196 * Required. The monitored resource type. This field must match the type field
1868 * the `type` field of a MonitoredResourceDescriptor object. For 2197 * of a MonitoredResourceDescriptor object. For example, the type of a Cloud
1869 * example, the type of a Cloud SQL database is `"cloudsql_database"`. 2198 * SQL database is "cloudsql_database".
1870 */ 2199 */
1871 core.String type; 2200 core.String type;
1872 2201
1873 MonitoredResource(); 2202 MonitoredResource();
1874 2203
1875 MonitoredResource.fromJson(core.Map _json) { 2204 MonitoredResource.fromJson(core.Map _json) {
1876 if (_json.containsKey("labels")) { 2205 if (_json.containsKey("labels")) {
1877 labels = _json["labels"]; 2206 labels = _json["labels"];
1878 } 2207 }
1879 if (_json.containsKey("type")) { 2208 if (_json.containsKey("type")) {
1880 type = _json["type"]; 2209 type = _json["type"];
1881 } 2210 }
1882 } 2211 }
1883 2212
1884 core.Map toJson() { 2213 core.Map toJson() {
1885 var _json = new core.Map(); 2214 var _json = new core.Map();
1886 if (labels != null) { 2215 if (labels != null) {
1887 _json["labels"] = labels; 2216 _json["labels"] = labels;
1888 } 2217 }
1889 if (type != null) { 2218 if (type != null) {
1890 _json["type"] = type; 2219 _json["type"] = type;
1891 } 2220 }
1892 return _json; 2221 return _json;
1893 } 2222 }
1894 } 2223 }
1895 2224
1896 /** 2225 /**
1897 * An object that describes the schema of a MonitoredResource object using a 2226 * An object that describes the schema of a MonitoredResource object using a
1898 * type name and a set of labels. For example, the monitored resource 2227 * type name and a set of labels. For example, the monitored resource descriptor
1899 * descriptor for Google Compute Engine VM instances has a type of 2228 * for Google Compute Engine VM instances has a type of "gce_instance" and
1900 * `"gce_instance"` and specifies the use of the labels `"instance_id"` and 2229 * specifies the use of the labels "instance_id" and "zone" to identify
1901 * `"zone"` to identify particular VM instances. 2230 * particular VM instances.Different APIs can support different monitored
1902 * 2231 * resource types. APIs generally provide a list method that returns the
1903 * Different APIs can support different monitored resource types. APIs generally 2232 * monitored resource descriptors used by the API.
1904 * provide a `list` method that returns the monitored resource descriptors used
1905 * by the API.
1906 */ 2233 */
1907 class MonitoredResourceDescriptor { 2234 class MonitoredResourceDescriptor {
1908 /** 2235 /**
1909 * Optional. A detailed description of the monitored resource type that might 2236 * Optional. A detailed description of the monitored resource type that might
1910 * be used in documentation. 2237 * be used in documentation.
1911 */ 2238 */
1912 core.String description; 2239 core.String description;
1913 /** 2240 /**
1914 * Optional. A concise name for the monitored resource type that might be 2241 * Optional. A concise name for the monitored resource type that might be
1915 * displayed in user interfaces. It should be a Title Cased Noun Phrase, 2242 * displayed in user interfaces. It should be a Title Cased Noun Phrase,
1916 * without any article or other determiners. For example, 2243 * without any article or other determiners. For example, "Google Cloud SQL
1917 * `"Google Cloud SQL Database"`. 2244 * Database".
1918 */ 2245 */
1919 core.String displayName; 2246 core.String displayName;
1920 /** 2247 /**
1921 * Required. A set of labels used to describe instances of this monitored 2248 * Required. A set of labels used to describe instances of this monitored
1922 * resource type. For example, an individual Google Cloud SQL database is 2249 * resource type. For example, an individual Google Cloud SQL database is
1923 * identified by values for the labels `"database_id"` and `"zone"`. 2250 * identified by values for the labels "database_id" and "zone".
1924 */ 2251 */
1925 core.List<LabelDescriptor> labels; 2252 core.List<LabelDescriptor> labels;
1926 /** 2253 /**
1927 * Optional. The resource name of the monitored resource descriptor: 2254 * Optional. The resource name of the monitored resource descriptor:
1928 * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where 2255 * "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is
1929 * {type} is the value of the `type` field in this object and 2256 * the value of the type field in this object and {project_id} is a project ID
1930 * {project_id} is a project ID that provides API-specific context for 2257 * that provides API-specific context for accessing the type. APIs that do not
1931 * accessing the type. APIs that do not use project information can use the 2258 * use project information can use the resource name format
1932 * resource name format `"monitoredResourceDescriptors/{type}"`. 2259 * "monitoredResourceDescriptors/{type}".
1933 */ 2260 */
1934 core.String name; 2261 core.String name;
1935 /** 2262 /**
1936 * Required. The monitored resource type. For example, the type 2263 * Required. The monitored resource type. For example, the type
1937 * `"cloudsql_database"` represents databases in Google Cloud SQL. 2264 * "cloudsql_database" represents databases in Google Cloud SQL. The maximum
1938 * The maximum length of this value is 256 characters. 2265 * length of this value is 256 characters.
1939 */ 2266 */
1940 core.String type; 2267 core.String type;
1941 2268
1942 MonitoredResourceDescriptor(); 2269 MonitoredResourceDescriptor();
1943 2270
1944 MonitoredResourceDescriptor.fromJson(core.Map _json) { 2271 MonitoredResourceDescriptor.fromJson(core.Map _json) {
1945 if (_json.containsKey("description")) { 2272 if (_json.containsKey("description")) {
1946 description = _json["description"]; 2273 description = _json["description"];
1947 } 2274 }
1948 if (_json.containsKey("displayName")) { 2275 if (_json.containsKey("displayName")) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 core.String appEngineRelease; 2316 core.String appEngineRelease;
1990 /** Application that handled this request. */ 2317 /** Application that handled this request. */
1991 core.String appId; 2318 core.String appId;
1992 /** An indication of the relative cost of serving this request. */ 2319 /** An indication of the relative cost of serving this request. */
1993 core.double cost; 2320 core.double cost;
1994 /** Time when the request finished. */ 2321 /** Time when the request finished. */
1995 core.String endTime; 2322 core.String endTime;
1996 /** Whether this request is finished or active. */ 2323 /** Whether this request is finished or active. */
1997 core.bool finished; 2324 core.bool finished;
1998 /** 2325 /**
1999 * Whether this is the first RequestLog entry for this request. If an active 2326 * Whether this is the first RequestLog entry for this request. If an active
2000 * request has several RequestLog entries written to Cloud Logging, this field 2327 * request has several RequestLog entries written to Stackdriver Logging, then
2001 * will be set for one of them. 2328 * this field will be set for one of them.
2002 */ 2329 */
2003 core.bool first; 2330 core.bool first;
2004 /** Internet host and port number of the resource being requested. */ 2331 /** Internet host and port number of the resource being requested. */
2005 core.String host; 2332 core.String host;
2006 /** HTTP version of request. Example: `"HTTP/1.1"`. */ 2333 /** HTTP version of request. Example: "HTTP/1.1". */
2007 core.String httpVersion; 2334 core.String httpVersion;
2008 /** An identifier for the instance that handled the request. */ 2335 /** An identifier for the instance that handled the request. */
2009 core.String instanceId; 2336 core.String instanceId;
2010 /** 2337 /**
2011 * If the instance processing this request belongs to a manually scaled 2338 * If the instance processing this request belongs to a manually scaled
2012 * module, then this is the 0-based index of the instance. Otherwise, this 2339 * module, then this is the 0-based index of the instance. Otherwise, this
2013 * value is -1. 2340 * value is -1.
2014 */ 2341 */
2015 core.int instanceIndex; 2342 core.int instanceIndex;
2016 /** Origin IP address. */ 2343 /** Origin IP address. */
2017 core.String ip; 2344 core.String ip;
2018 /** Latency of the request. */ 2345 /** Latency of the request. */
2019 core.String latency; 2346 core.String latency;
2020 /** 2347 /**
2021 * A list of log lines emitted by the application while serving this request. 2348 * A list of log lines emitted by the application while serving this request.
2022 */ 2349 */
2023 core.List<LogLine> line; 2350 core.List<LogLine> line;
2024 /** Number of CPU megacycles used to process request. */ 2351 /** Number of CPU megacycles used to process request. */
2025 core.String megaCycles; 2352 core.String megaCycles;
2026 /** 2353 /** Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". */
2027 * Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`.
2028 */
2029 core.String method; 2354 core.String method;
2030 /** Module of the application that handled this request. */ 2355 /** Module of the application that handled this request. */
2031 core.String moduleId; 2356 core.String moduleId;
2032 /** 2357 /**
2033 * The logged-in user who made the request. 2358 * The logged-in user who made the request.Most likely, this is the part of
2034 * 2359 * the user's email before the @ sign. The field value is the same for
2035 * Most likely, this is the part of the user's email before the `@` sign. The 2360 * different requests from the same user, but different users can have similar
2036 * field value is the same for different requests from the same user, but 2361 * names. This information is also available to the application via the App
2037 * different users can have similar names. This information is also 2362 * Engine Users API.This field will be populated starting with App Engine
2038 * available to the application via the App Engine Users API. 2363 * 1.9.21.
2039 *
2040 * This field will be populated starting with App Engine 1.9.21.
2041 */ 2364 */
2042 core.String nickname; 2365 core.String nickname;
2043 /** Time this request spent in the pending request queue. */ 2366 /** Time this request spent in the pending request queue. */
2044 core.String pendingTime; 2367 core.String pendingTime;
2045 /** Referrer URL of request. */ 2368 /** Referrer URL of request. */
2046 core.String referrer; 2369 core.String referrer;
2047 /** 2370 /**
2048 * Globally unique identifier for a request, which is based on the request 2371 * Globally unique identifier for a request, which is based on the request
2049 * start time. Request IDs for requests which started later will compare 2372 * start time. Request IDs for requests which started later will compare
2050 * greater as strings than those for requests which started earlier. 2373 * greater as strings than those for requests which started earlier.
2051 */ 2374 */
2052 core.String requestId; 2375 core.String requestId;
2053 /** 2376 /**
2054 * Contains the path and query portion of the URL that was requested. For 2377 * Contains the path and query portion of the URL that was requested. For
2055 * example, if the URL was "http://example.com/app?name=val", the resource 2378 * example, if the URL was "http://example.com/app?name=val", the resource
2056 * would be "/app?name=val". The fragment identifier, which is identified by 2379 * would be "/app?name=val". The fragment identifier, which is identified by
2057 * the `#` character, is not included. 2380 * the # character, is not included.
2058 */ 2381 */
2059 core.String resource; 2382 core.String resource;
2060 /** Size in bytes sent back to client by request. */ 2383 /** Size in bytes sent back to client by request. */
2061 core.String responseSize; 2384 core.String responseSize;
2062 /** 2385 /**
2063 * Source code for the application that handled this request. There can be 2386 * Source code for the application that handled this request. There can be
2064 * more than one source reference per deployed application if source code is 2387 * more than one source reference per deployed application if source code is
2065 * distributed among multiple repositories. 2388 * distributed among multiple repositories.
2066 */ 2389 */
2067 core.List<SourceReference> sourceReference; 2390 core.List<SourceReference> sourceReference;
2068 /** Time when the request started. */ 2391 /** Time when the request started. */
2069 core.String startTime; 2392 core.String startTime;
2070 /** HTTP response status code. Example: 200, 404. */ 2393 /** HTTP response status code. Example: 200, 404. */
2071 core.int status; 2394 core.int status;
2072 /** Task name of the request, in the case of an offline request. */ 2395 /** Task name of the request, in the case of an offline request. */
2073 core.String taskName; 2396 core.String taskName;
2074 /** Queue name of the request, in the case of an offline request. */ 2397 /** Queue name of the request, in the case of an offline request. */
2075 core.String taskQueueName; 2398 core.String taskQueueName;
2076 /** Cloud Trace identifier for this request. */ 2399 /** Stackdriver Trace identifier for this request. */
2077 core.String traceId; 2400 core.String traceId;
2078 /** File or class that handled the request. */ 2401 /** File or class that handled the request. */
2079 core.String urlMapEntry; 2402 core.String urlMapEntry;
2080 /** User agent that made the request. */ 2403 /** User agent that made the request. */
2081 core.String userAgent; 2404 core.String userAgent;
2082 /** Version of the application that handled this request. */ 2405 /** Version of the application that handled this request. */
2083 core.String versionId; 2406 core.String versionId;
2084 /** Whether this was a loading request for the instance. */ 2407 /** Whether this was a loading request for the instance. */
2085 core.bool wasLoadingRequest; 2408 core.bool wasLoadingRequest;
2086 2409
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2292 /** 2615 /**
2293 * Source file name. Depending on the runtime environment, this might be a 2616 * Source file name. Depending on the runtime environment, this might be a
2294 * simple name or a fully-qualified name. 2617 * simple name or a fully-qualified name.
2295 */ 2618 */
2296 core.String file; 2619 core.String file;
2297 /** 2620 /**
2298 * Human-readable name of the function or method being invoked, with optional 2621 * Human-readable name of the function or method being invoked, with optional
2299 * context such as the class or package name. This information is used in 2622 * context such as the class or package name. This information is used in
2300 * contexts such as the logs viewer, where a file and line number are less 2623 * contexts such as the logs viewer, where a file and line number are less
2301 * meaningful. The format can vary by language. For example: 2624 * meaningful. The format can vary by language. For example:
2302 * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` 2625 * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python).
2303 * (Python).
2304 */ 2626 */
2305 core.String functionName; 2627 core.String functionName;
2306 /** Line within the source file. */ 2628 /** Line within the source file. */
2307 core.String line; 2629 core.String line;
2308 2630
2309 SourceLocation(); 2631 SourceLocation();
2310 2632
2311 SourceLocation.fromJson(core.Map _json) { 2633 SourceLocation.fromJson(core.Map _json) {
2312 if (_json.containsKey("file")) { 2634 if (_json.containsKey("file")) {
2313 file = _json["file"]; 2635 file = _json["file"];
(...skipping 20 matching lines...) Expand all
2334 return _json; 2656 return _json;
2335 } 2657 }
2336 } 2658 }
2337 2659
2338 /** 2660 /**
2339 * A reference to a particular snapshot of the source tree used to build and 2661 * A reference to a particular snapshot of the source tree used to build and
2340 * deploy an application. 2662 * deploy an application.
2341 */ 2663 */
2342 class SourceReference { 2664 class SourceReference {
2343 /** 2665 /**
2344 * Optional. A URI string identifying the repository. 2666 * Optional. A URI string identifying the repository. Example:
2345 * Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" 2667 * "https://github.com/GoogleCloudPlatform/kubernetes.git"
2346 */ 2668 */
2347 core.String repository; 2669 core.String repository;
2348 /** 2670 /**
2349 * The canonical and persistent identifier of the deployed revision. 2671 * The canonical and persistent identifier of the deployed revision. Example
2350 * Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" 2672 * (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
2351 */ 2673 */
2352 core.String revisionId; 2674 core.String revisionId;
2353 2675
2354 SourceReference(); 2676 SourceReference();
2355 2677
2356 SourceReference.fromJson(core.Map _json) { 2678 SourceReference.fromJson(core.Map _json) {
2357 if (_json.containsKey("repository")) { 2679 if (_json.containsKey("repository")) {
2358 repository = _json["repository"]; 2680 repository = _json["repository"];
2359 } 2681 }
2360 if (_json.containsKey("revisionId")) { 2682 if (_json.containsKey("revisionId")) {
(...skipping 10 matching lines...) Expand all
2371 _json["revisionId"] = revisionId; 2693 _json["revisionId"] = revisionId;
2372 } 2694 }
2373 return _json; 2695 return _json;
2374 } 2696 }
2375 } 2697 }
2376 2698
2377 /** The parameters to WriteLogEntries. */ 2699 /** The parameters to WriteLogEntries. */
2378 class WriteLogEntriesRequest { 2700 class WriteLogEntriesRequest {
2379 /** 2701 /**
2380 * Required. The log entries to write. Values supplied for the fields 2702 * Required. The log entries to write. Values supplied for the fields
2381 * `log_name`, `resource`, and `labels` in this `entries.write` request are 2703 * log_name, resource, and labels in this entries.write request are added to
2382 * added to those log entries that do not provide their own values for the 2704 * those log entries that do not provide their own values for the fields.To
2383 * fields. 2705 * improve throughput and to avoid exceeding the quota limit for calls to
2384 * 2706 * entries.write, you should write multiple log entries at once rather than
2385 * To improve throughput and to avoid exceeding the
2386 * [quota limit](/logging/quota-policy) for calls to `entries.write`,
2387 * you should write multiple log entries at once rather than
2388 * calling this method for each individual log entry. 2707 * calling this method for each individual log entry.
2389 */ 2708 */
2390 core.List<LogEntry> entries; 2709 core.List<LogEntry> entries;
2391 /** 2710 /**
2392 * Optional. Default labels that are added to the `labels` field of all log 2711 * Optional. Default labels that are added to the labels field of all log
2393 * entries in `entries`. If a log entry already has a label with the same key 2712 * entries in entries. If a log entry already has a label with the same key as
2394 * as a label in this parameter, then the log entry's label is not changed. 2713 * a label in this parameter, then the log entry's label is not changed. See
2395 * See LogEntry. 2714 * LogEntry.
2396 */ 2715 */
2397 core.Map<core.String, core.String> labels; 2716 core.Map<core.String, core.String> labels;
2398 /** 2717 /**
2399 * Optional. A default log resource name that is assigned to all log entries 2718 * Optional. A default log resource name that is assigned to all log entries
2400 * in `entries` that do not specify a value for `log_name`. Example: 2719 * in entries that do not specify a value for log_name:
2401 * `"projects/my-project/logs/syslog"`. See 2720 * "projects/[PROJECT_ID]/logs/[LOG_ID]"
2402 * LogEntry. 2721 * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
2722 * [LOG_ID] must be URL-encoded. For example,
2723 * "projects/my-project-id/logs/syslog" or
2724 * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivi ty".
2725 * For more information about log names, see LogEntry.
2403 */ 2726 */
2404 core.String logName; 2727 core.String logName;
2405 /** 2728 /**
2406 * Optional. Whether valid entries should be written even if some other 2729 * Optional. Whether valid entries should be written even if some other
2407 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any 2730 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
2408 * entry is not written, the response status will be the error associated 2731 * entry is not written, the response status will be the error associated with
2409 * with one of the failed entries and include error details in the form of 2732 * one of the failed entries and include error details in the form of
2410 * WriteLogEntriesPartialErrors. 2733 * WriteLogEntriesPartialErrors.
2411 */ 2734 */
2412 core.bool partialSuccess; 2735 core.bool partialSuccess;
2413 /** 2736 /**
2414 * Optional. A default monitored resource object that is assigned to all log 2737 * Optional. A default monitored resource object that is assigned to all log
2415 * entries in `entries` that do not specify a value for `resource`. Example: 2738 * entries in entries that do not specify a value for resource. Example:
2416 * 2739 * { "type": "gce_instance",
2417 * { "type": "gce_instance", 2740 * "labels": {
2418 * "labels": { 2741 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
2419 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }}
2420 *
2421 * See LogEntry. 2742 * See LogEntry.
2422 */ 2743 */
2423 MonitoredResource resource; 2744 MonitoredResource resource;
2424 2745
2425 WriteLogEntriesRequest(); 2746 WriteLogEntriesRequest();
2426 2747
2427 WriteLogEntriesRequest.fromJson(core.Map _json) { 2748 WriteLogEntriesRequest.fromJson(core.Map _json) {
2428 if (_json.containsKey("entries")) { 2749 if (_json.containsKey("entries")) {
2429 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List(); 2750 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to List();
2430 } 2751 }
(...skipping 25 matching lines...) Expand all
2456 if (partialSuccess != null) { 2777 if (partialSuccess != null) {
2457 _json["partialSuccess"] = partialSuccess; 2778 _json["partialSuccess"] = partialSuccess;
2458 } 2779 }
2459 if (resource != null) { 2780 if (resource != null) {
2460 _json["resource"] = (resource).toJson(); 2781 _json["resource"] = (resource).toJson();
2461 } 2782 }
2462 return _json; 2783 return _json;
2463 } 2784 }
2464 } 2785 }
2465 2786
2466 /** 2787 /** Result returned from WriteLogEntries. empty */
2467 * Result returned from WriteLogEntries.
2468 * empty
2469 */
2470 class WriteLogEntriesResponse { 2788 class WriteLogEntriesResponse {
2471 2789
2472 WriteLogEntriesResponse(); 2790 WriteLogEntriesResponse();
2473 2791
2474 WriteLogEntriesResponse.fromJson(core.Map _json) { 2792 WriteLogEntriesResponse.fromJson(core.Map _json) {
2475 } 2793 }
2476 2794
2477 core.Map toJson() { 2795 core.Map toJson() {
2478 var _json = new core.Map(); 2796 var _json = new core.Map();
2479 return _json; 2797 return _json;
2480 } 2798 }
2481 } 2799 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/language/v1beta1.dart ('k') | generated/googleapis_beta/lib/ml/v1beta1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698