OLD | NEW |
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; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client logging/v2beta1'; | 15 const core.String USER_AGENT = 'dart-api-client logging/v2beta1'; |
16 | 16 |
17 /** | 17 /** Writes log entries and manages your Stackdriver Logging configuration. */ |
18 * Writes log entries and manages your logs, log sinks, and logs-based metrics. | |
19 */ | |
20 class LoggingApi { | 18 class LoggingApi { |
21 /** View and manage your data across Google Cloud Platform services */ | 19 /** View and manage your data across Google Cloud Platform services */ |
22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
23 | 21 |
24 /** View your data across Google Cloud Platform services */ | 22 /** View your data across Google Cloud Platform services */ |
25 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; | 23 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; |
26 | 24 |
27 /** Administrate log data for your projects */ | 25 /** Administrate log data for your projects */ |
28 static const LoggingAdminScope = "https://www.googleapis.com/auth/logging.admi
n"; | 26 static const LoggingAdminScope = "https://www.googleapis.com/auth/logging.admi
n"; |
29 | 27 |
30 /** View log data for your projects */ | 28 /** View log data for your projects */ |
31 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
; | 29 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
; |
32 | 30 |
33 /** Submit log data for your projects */ | 31 /** Submit log data for your projects */ |
34 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ
e"; | 32 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ
e"; |
35 | 33 |
36 | 34 |
37 final commons.ApiRequester _requester; | 35 final commons.ApiRequester _requester; |
38 | 36 |
| 37 BillingAccountsResourceApi get billingAccounts => new BillingAccountsResourceA
pi(_requester); |
39 EntriesResourceApi get entries => new EntriesResourceApi(_requester); | 38 EntriesResourceApi get entries => new EntriesResourceApi(_requester); |
40 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => ne
w MonitoredResourceDescriptorsResourceApi(_requester); | 39 MonitoredResourceDescriptorsResourceApi get monitoredResourceDescriptors => ne
w MonitoredResourceDescriptorsResourceApi(_requester); |
| 40 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re
quester); |
41 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 41 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
42 | 42 |
43 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap
is.com/", core.String servicePath: ""}) : | 43 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap
is.com/", core.String servicePath: ""}) : |
44 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 44 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
45 } | 45 } |
46 | 46 |
47 | 47 |
| 48 class BillingAccountsResourceApi { |
| 49 final commons.ApiRequester _requester; |
| 50 |
| 51 BillingAccountsLogsResourceApi get logs => new BillingAccountsLogsResourceApi(
_requester); |
| 52 |
| 53 BillingAccountsResourceApi(commons.ApiRequester client) : |
| 54 _requester = client; |
| 55 } |
| 56 |
| 57 |
| 58 class BillingAccountsLogsResourceApi { |
| 59 final commons.ApiRequester _requester; |
| 60 |
| 61 BillingAccountsLogsResourceApi(commons.ApiRequester client) : |
| 62 _requester = client; |
| 63 |
| 64 /** |
| 65 * Deletes a log and all its log entries. |
| 66 * The log will reappear if it receives new entries. |
| 67 * |
| 68 * Request parameters: |
| 69 * |
| 70 * [logName] - Required. The resource name of the log to delete. Example: |
| 71 * `"projects/my-project/logs/syslog"`. |
| 72 * Value must have pattern "^billingAccounts/[^/]+/logs/[^/]+$". |
| 73 * |
| 74 * Completes with a [Empty]. |
| 75 * |
| 76 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 77 * error. |
| 78 * |
| 79 * If the used [http.Client] completes with an error when making a REST call, |
| 80 * this method will complete with the same error. |
| 81 */ |
| 82 async.Future<Empty> delete(core.String logName) { |
| 83 var _url = null; |
| 84 var _queryParams = new core.Map(); |
| 85 var _uploadMedia = null; |
| 86 var _uploadOptions = null; |
| 87 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 88 var _body = null; |
| 89 |
| 90 if (logName == null) { |
| 91 throw new core.ArgumentError("Parameter logName is required."); |
| 92 } |
| 93 |
| 94 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); |
| 95 |
| 96 var _response = _requester.request(_url, |
| 97 "DELETE", |
| 98 body: _body, |
| 99 queryParams: _queryParams, |
| 100 uploadOptions: _uploadOptions, |
| 101 uploadMedia: _uploadMedia, |
| 102 downloadOptions: _downloadOptions); |
| 103 return _response.then((data) => new Empty.fromJson(data)); |
| 104 } |
| 105 |
| 106 } |
| 107 |
| 108 |
48 class EntriesResourceApi { | 109 class EntriesResourceApi { |
49 final commons.ApiRequester _requester; | 110 final commons.ApiRequester _requester; |
50 | 111 |
51 EntriesResourceApi(commons.ApiRequester client) : | 112 EntriesResourceApi(commons.ApiRequester client) : |
52 _requester = client; | 113 _requester = client; |
53 | 114 |
54 /** | 115 /** |
55 * Lists log entries. Use this method to retrieve log entries from Cloud | 116 * Lists log entries. Use this method to retrieve log entries from Cloud |
56 * Logging. For ways to export log entries, see [Exporting | 117 * Logging. For ways to export log entries, see |
57 * Logs](/logging/docs/export). | 118 * [Exporting Logs](/logging/docs/export). |
58 * | 119 * |
59 * [request] - The metadata request object. | 120 * [request] - The metadata request object. |
60 * | 121 * |
61 * Request parameters: | 122 * Request parameters: |
62 * | 123 * |
63 * Completes with a [ListLogEntriesResponse]. | 124 * Completes with a [ListLogEntriesResponse]. |
64 * | 125 * |
65 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 126 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
66 * error. | 127 * error. |
67 * | 128 * |
(...skipping 18 matching lines...) Expand all Loading... |
86 "POST", | 147 "POST", |
87 body: _body, | 148 body: _body, |
88 queryParams: _queryParams, | 149 queryParams: _queryParams, |
89 uploadOptions: _uploadOptions, | 150 uploadOptions: _uploadOptions, |
90 uploadMedia: _uploadMedia, | 151 uploadMedia: _uploadMedia, |
91 downloadOptions: _downloadOptions); | 152 downloadOptions: _downloadOptions); |
92 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); | 153 return _response.then((data) => new ListLogEntriesResponse.fromJson(data)); |
93 } | 154 } |
94 | 155 |
95 /** | 156 /** |
96 * Writes log entries to Cloud Logging. All log entries in Cloud Logging are | 157 * Writes log entries to Stackdriver Logging. All log entries are |
97 * written by this method. | 158 * written by this method. |
98 * | 159 * |
99 * [request] - The metadata request object. | 160 * [request] - The metadata request object. |
100 * | 161 * |
101 * Request parameters: | 162 * Request parameters: |
102 * | 163 * |
103 * Completes with a [WriteLogEntriesResponse]. | 164 * Completes with a [WriteLogEntriesResponse]. |
104 * | 165 * |
105 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
106 * error. | 167 * error. |
(...skipping 28 matching lines...) Expand all Loading... |
135 } | 196 } |
136 | 197 |
137 | 198 |
138 class MonitoredResourceDescriptorsResourceApi { | 199 class MonitoredResourceDescriptorsResourceApi { |
139 final commons.ApiRequester _requester; | 200 final commons.ApiRequester _requester; |
140 | 201 |
141 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) : | 202 MonitoredResourceDescriptorsResourceApi(commons.ApiRequester client) : |
142 _requester = client; | 203 _requester = client; |
143 | 204 |
144 /** | 205 /** |
145 * Lists monitored resource descriptors that are used by Cloud Logging. | 206 * Lists the monitored resource descriptors used by Stackdriver Logging. |
146 * | 207 * |
147 * Request parameters: | 208 * Request parameters: |
148 * | 209 * |
149 * [pageSize] - Optional. The maximum number of results to return from this | 210 * [pageSize] - Optional. The maximum number of results to return from this |
150 * request. You must check for presence of `nextPageToken` to determine if | 211 * request. |
151 * additional results are available, which you can retrieve by passing the | 212 * Non-positive values are ignored. The presence of `nextPageToken` in the |
152 * `nextPageToken` value as the `pageToken` parameter in the next request. | 213 * response indicates that more results might be available. |
153 * | 214 * |
154 * [pageToken] - Optional. If the `pageToken` parameter is supplied, then the | 215 * [pageToken] - Optional. If present, then retrieve the next batch of results |
155 * next page of results is retrieved. The `pageToken` parameter must be set to | 216 * from the |
156 * the value of the `nextPageToken` from the previous response. | 217 * preceding call to this method. `pageToken` must be the value of |
| 218 * `nextPageToken` from the previous response. The values of other method |
| 219 * parameters should be identical to those in the previous call. |
157 * | 220 * |
158 * Completes with a [ListMonitoredResourceDescriptorsResponse]. | 221 * Completes with a [ListMonitoredResourceDescriptorsResponse]. |
159 * | 222 * |
160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 223 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
161 * error. | 224 * error. |
162 * | 225 * |
163 * If the used [http.Client] completes with an error when making a REST call, | 226 * If the used [http.Client] completes with an error when making a REST call, |
164 * this method will complete with the same error. | 227 * this method will complete with the same error. |
165 */ | 228 */ |
166 async.Future<ListMonitoredResourceDescriptorsResponse> list({core.int pageSize
, core.String pageToken}) { | 229 async.Future<ListMonitoredResourceDescriptorsResponse> list({core.int pageSize
, core.String pageToken}) { |
(...skipping 19 matching lines...) Expand all Loading... |
186 queryParams: _queryParams, | 249 queryParams: _queryParams, |
187 uploadOptions: _uploadOptions, | 250 uploadOptions: _uploadOptions, |
188 uploadMedia: _uploadMedia, | 251 uploadMedia: _uploadMedia, |
189 downloadOptions: _downloadOptions); | 252 downloadOptions: _downloadOptions); |
190 return _response.then((data) => new ListMonitoredResourceDescriptorsResponse
.fromJson(data)); | 253 return _response.then((data) => new ListMonitoredResourceDescriptorsResponse
.fromJson(data)); |
191 } | 254 } |
192 | 255 |
193 } | 256 } |
194 | 257 |
195 | 258 |
| 259 class OrganizationsResourceApi { |
| 260 final commons.ApiRequester _requester; |
| 261 |
| 262 OrganizationsLogsResourceApi get logs => new OrganizationsLogsResourceApi(_req
uester); |
| 263 |
| 264 OrganizationsResourceApi(commons.ApiRequester client) : |
| 265 _requester = client; |
| 266 } |
| 267 |
| 268 |
| 269 class OrganizationsLogsResourceApi { |
| 270 final commons.ApiRequester _requester; |
| 271 |
| 272 OrganizationsLogsResourceApi(commons.ApiRequester client) : |
| 273 _requester = client; |
| 274 |
| 275 /** |
| 276 * Deletes a log and all its log entries. |
| 277 * The log will reappear if it receives new entries. |
| 278 * |
| 279 * Request parameters: |
| 280 * |
| 281 * [logName] - Required. The resource name of the log to delete. Example: |
| 282 * `"projects/my-project/logs/syslog"`. |
| 283 * Value must have pattern "^organizations/[^/]+/logs/[^/]+$". |
| 284 * |
| 285 * Completes with a [Empty]. |
| 286 * |
| 287 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 288 * error. |
| 289 * |
| 290 * If the used [http.Client] completes with an error when making a REST call, |
| 291 * this method will complete with the same error. |
| 292 */ |
| 293 async.Future<Empty> delete(core.String logName) { |
| 294 var _url = null; |
| 295 var _queryParams = new core.Map(); |
| 296 var _uploadMedia = null; |
| 297 var _uploadOptions = null; |
| 298 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 299 var _body = null; |
| 300 |
| 301 if (logName == null) { |
| 302 throw new core.ArgumentError("Parameter logName is required."); |
| 303 } |
| 304 |
| 305 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$logName'); |
| 306 |
| 307 var _response = _requester.request(_url, |
| 308 "DELETE", |
| 309 body: _body, |
| 310 queryParams: _queryParams, |
| 311 uploadOptions: _uploadOptions, |
| 312 uploadMedia: _uploadMedia, |
| 313 downloadOptions: _downloadOptions); |
| 314 return _response.then((data) => new Empty.fromJson(data)); |
| 315 } |
| 316 |
| 317 } |
| 318 |
| 319 |
196 class ProjectsResourceApi { | 320 class ProjectsResourceApi { |
197 final commons.ApiRequester _requester; | 321 final commons.ApiRequester _requester; |
198 | 322 |
199 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); | 323 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); |
200 ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requ
ester); | 324 ProjectsMetricsResourceApi get metrics => new ProjectsMetricsResourceApi(_requ
ester); |
201 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester)
; | 325 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester)
; |
202 | 326 |
203 ProjectsResourceApi(commons.ApiRequester client) : | 327 ProjectsResourceApi(commons.ApiRequester client) : |
204 _requester = client; | 328 _requester = client; |
205 } | 329 } |
206 | 330 |
207 | 331 |
208 class ProjectsLogsResourceApi { | 332 class ProjectsLogsResourceApi { |
209 final commons.ApiRequester _requester; | 333 final commons.ApiRequester _requester; |
210 | 334 |
211 ProjectsLogsResourceApi(commons.ApiRequester client) : | 335 ProjectsLogsResourceApi(commons.ApiRequester client) : |
212 _requester = client; | 336 _requester = client; |
213 | 337 |
214 /** | 338 /** |
215 * Deletes a log and all its log entries. The log will reappear if it receives | 339 * Deletes a log and all its log entries. |
216 * new entries. | 340 * The log will reappear if it receives new entries. |
217 * | 341 * |
218 * Request parameters: | 342 * Request parameters: |
219 * | 343 * |
220 * [logName] - Required. The resource name of the log to delete. Example: | 344 * [logName] - Required. The resource name of the log to delete. Example: |
221 * `"projects/my-project/logs/syslog"`. | 345 * `"projects/my-project/logs/syslog"`. |
222 * Value must have pattern "^projects/[^/] * / logs/[^/]*$". | 346 * Value must have pattern "^projects/[^/]+/logs/[^/]+$". |
223 * | 347 * |
224 * Completes with a [Empty]. | 348 * Completes with a [Empty]. |
225 * | 349 * |
226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
227 * error. | 351 * error. |
228 * | 352 * |
229 * If the used [http.Client] completes with an error when making a REST call, | 353 * If the used [http.Client] completes with an error when making a REST call, |
230 * this method will complete with the same error. | 354 * this method will complete with the same error. |
231 */ | 355 */ |
232 async.Future<Empty> delete(core.String logName) { | 356 async.Future<Empty> delete(core.String logName) { |
(...skipping 29 matching lines...) Expand all Loading... |
262 ProjectsMetricsResourceApi(commons.ApiRequester client) : | 386 ProjectsMetricsResourceApi(commons.ApiRequester client) : |
263 _requester = client; | 387 _requester = client; |
264 | 388 |
265 /** | 389 /** |
266 * Creates a logs-based metric. | 390 * Creates a logs-based metric. |
267 * | 391 * |
268 * [request] - The metadata request object. | 392 * [request] - The metadata request object. |
269 * | 393 * |
270 * Request parameters: | 394 * Request parameters: |
271 * | 395 * |
272 * [projectName] - The resource name of the project in which to create the | 396 * [parent] - The resource name of the project in which to create the metric. |
273 * metric. Example: `"projects/my-project-id"`. The new metric must be | 397 * Example: `"projects/my-project-id"`. |
274 * provided in the request. | 398 * |
275 * Value must have pattern "^projects/[^/]*$". | 399 * The new metric must be provided in the request. |
| 400 * Value must have pattern "^projects/[^/]+$". |
276 * | 401 * |
277 * Completes with a [LogMetric]. | 402 * Completes with a [LogMetric]. |
278 * | 403 * |
279 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 404 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
280 * error. | 405 * error. |
281 * | 406 * |
282 * If the used [http.Client] completes with an error when making a REST call, | 407 * If the used [http.Client] completes with an error when making a REST call, |
283 * this method will complete with the same error. | 408 * this method will complete with the same error. |
284 */ | 409 */ |
285 async.Future<LogMetric> create(LogMetric request, core.String projectName) { | 410 async.Future<LogMetric> create(LogMetric request, core.String parent) { |
286 var _url = null; | 411 var _url = null; |
287 var _queryParams = new core.Map(); | 412 var _queryParams = new core.Map(); |
288 var _uploadMedia = null; | 413 var _uploadMedia = null; |
289 var _uploadOptions = null; | 414 var _uploadOptions = null; |
290 var _downloadOptions = commons.DownloadOptions.Metadata; | 415 var _downloadOptions = commons.DownloadOptions.Metadata; |
291 var _body = null; | 416 var _body = null; |
292 | 417 |
293 if (request != null) { | 418 if (request != null) { |
294 _body = convert.JSON.encode((request).toJson()); | 419 _body = convert.JSON.encode((request).toJson()); |
295 } | 420 } |
296 if (projectName == null) { | 421 if (parent == null) { |
297 throw new core.ArgumentError("Parameter projectName is required."); | 422 throw new core.ArgumentError("Parameter parent is required."); |
298 } | 423 } |
299 | 424 |
300 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$projectName') +
'/metrics'; | 425 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/met
rics'; |
301 | 426 |
302 var _response = _requester.request(_url, | 427 var _response = _requester.request(_url, |
303 "POST", | 428 "POST", |
304 body: _body, | 429 body: _body, |
305 queryParams: _queryParams, | 430 queryParams: _queryParams, |
306 uploadOptions: _uploadOptions, | 431 uploadOptions: _uploadOptions, |
307 uploadMedia: _uploadMedia, | 432 uploadMedia: _uploadMedia, |
308 downloadOptions: _downloadOptions); | 433 downloadOptions: _downloadOptions); |
309 return _response.then((data) => new LogMetric.fromJson(data)); | 434 return _response.then((data) => new LogMetric.fromJson(data)); |
310 } | 435 } |
311 | 436 |
312 /** | 437 /** |
313 * Deletes a logs-based metric. | 438 * Deletes a logs-based metric. |
314 * | 439 * |
315 * Request parameters: | 440 * Request parameters: |
316 * | 441 * |
317 * [metricName] - The resource name of the metric to delete. Example: | 442 * [metricName] - The resource name of the metric to delete. |
318 * `"projects/my-project-id/metrics/my-metric-id"`. | 443 * Example: `"projects/my-project-id/metrics/my-metric-id"`. |
319 * Value must have pattern "^projects/[^/] * / metrics/[^/]*$". | 444 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". |
320 * | 445 * |
321 * Completes with a [Empty]. | 446 * Completes with a [Empty]. |
322 * | 447 * |
323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 448 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
324 * error. | 449 * error. |
325 * | 450 * |
326 * If the used [http.Client] completes with an error when making a REST call, | 451 * If the used [http.Client] completes with an error when making a REST call, |
327 * this method will complete with the same error. | 452 * this method will complete with the same error. |
328 */ | 453 */ |
329 async.Future<Empty> delete(core.String metricName) { | 454 async.Future<Empty> delete(core.String metricName) { |
(...skipping 18 matching lines...) Expand all Loading... |
348 uploadMedia: _uploadMedia, | 473 uploadMedia: _uploadMedia, |
349 downloadOptions: _downloadOptions); | 474 downloadOptions: _downloadOptions); |
350 return _response.then((data) => new Empty.fromJson(data)); | 475 return _response.then((data) => new Empty.fromJson(data)); |
351 } | 476 } |
352 | 477 |
353 /** | 478 /** |
354 * Gets a logs-based metric. | 479 * Gets a logs-based metric. |
355 * | 480 * |
356 * Request parameters: | 481 * Request parameters: |
357 * | 482 * |
358 * [metricName] - The resource name of the desired metric. Example: | 483 * [metricName] - The resource name of the desired metric. |
359 * `"projects/my-project-id/metrics/my-metric-id"`. | 484 * Example: `"projects/my-project-id/metrics/my-metric-id"`. |
360 * Value must have pattern "^projects/[^/] * / metrics/[^/]*$". | 485 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". |
361 * | 486 * |
362 * Completes with a [LogMetric]. | 487 * Completes with a [LogMetric]. |
363 * | 488 * |
364 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 489 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
365 * error. | 490 * error. |
366 * | 491 * |
367 * If the used [http.Client] completes with an error when making a REST call, | 492 * If the used [http.Client] completes with an error when making a REST call, |
368 * this method will complete with the same error. | 493 * this method will complete with the same error. |
369 */ | 494 */ |
370 async.Future<LogMetric> get(core.String metricName) { | 495 async.Future<LogMetric> get(core.String metricName) { |
(...skipping 18 matching lines...) Expand all Loading... |
389 uploadMedia: _uploadMedia, | 514 uploadMedia: _uploadMedia, |
390 downloadOptions: _downloadOptions); | 515 downloadOptions: _downloadOptions); |
391 return _response.then((data) => new LogMetric.fromJson(data)); | 516 return _response.then((data) => new LogMetric.fromJson(data)); |
392 } | 517 } |
393 | 518 |
394 /** | 519 /** |
395 * Lists logs-based metrics. | 520 * Lists logs-based metrics. |
396 * | 521 * |
397 * Request parameters: | 522 * Request parameters: |
398 * | 523 * |
399 * [projectName] - Required. The resource name of the project containing the | 524 * [parent] - Required. The resource name containing the metrics. |
400 * metrics. Example: `"projects/my-project-id"`. | 525 * Example: `"projects/my-project-id"`. |
401 * Value must have pattern "^projects/[^/]*$". | 526 * Value must have pattern "^projects/[^/]+$". |
402 * | |
403 * [pageToken] - Optional. If the `pageToken` parameter is supplied, then the | |
404 * next page of results is retrieved. The `pageToken` parameter must be set to | |
405 * the value of the `nextPageToken` from the previous response. The value of | |
406 * `projectName` must be the same as in the previous request. | |
407 * | 527 * |
408 * [pageSize] - Optional. The maximum number of results to return from this | 528 * [pageSize] - Optional. The maximum number of results to return from this |
409 * request. You must check for presence of `nextPageToken` to determine if | 529 * request. |
410 * additional results are available, which you can retrieve by passing the | 530 * Non-positive values are ignored. The presence of `nextPageToken` in the |
411 * `nextPageToken` value as the `pageToken` parameter in the next request. | 531 * response indicates that more results might be available. |
| 532 * |
| 533 * [pageToken] - Optional. If present, then retrieve the next batch of results |
| 534 * from the |
| 535 * preceding call to this method. `pageToken` must be the value of |
| 536 * `nextPageToken` from the previous response. The values of other method |
| 537 * parameters should be identical to those in the previous call. |
412 * | 538 * |
413 * Completes with a [ListLogMetricsResponse]. | 539 * Completes with a [ListLogMetricsResponse]. |
414 * | 540 * |
415 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 541 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
416 * error. | 542 * error. |
417 * | 543 * |
418 * If the used [http.Client] completes with an error when making a REST call, | 544 * If the used [http.Client] completes with an error when making a REST call, |
419 * this method will complete with the same error. | 545 * this method will complete with the same error. |
420 */ | 546 */ |
421 async.Future<ListLogMetricsResponse> list(core.String projectName, {core.Strin
g pageToken, core.int pageSize}) { | 547 async.Future<ListLogMetricsResponse> list(core.String parent, {core.int pageSi
ze, core.String pageToken}) { |
422 var _url = null; | 548 var _url = null; |
423 var _queryParams = new core.Map(); | 549 var _queryParams = new core.Map(); |
424 var _uploadMedia = null; | 550 var _uploadMedia = null; |
425 var _uploadOptions = null; | 551 var _uploadOptions = null; |
426 var _downloadOptions = commons.DownloadOptions.Metadata; | 552 var _downloadOptions = commons.DownloadOptions.Metadata; |
427 var _body = null; | 553 var _body = null; |
428 | 554 |
429 if (projectName == null) { | 555 if (parent == null) { |
430 throw new core.ArgumentError("Parameter projectName is required."); | 556 throw new core.ArgumentError("Parameter parent is required."); |
| 557 } |
| 558 if (pageSize != null) { |
| 559 _queryParams["pageSize"] = ["${pageSize}"]; |
431 } | 560 } |
432 if (pageToken != null) { | 561 if (pageToken != null) { |
433 _queryParams["pageToken"] = [pageToken]; | 562 _queryParams["pageToken"] = [pageToken]; |
434 } | 563 } |
435 if (pageSize != null) { | |
436 _queryParams["pageSize"] = ["${pageSize}"]; | |
437 } | |
438 | 564 |
439 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$projectName') +
'/metrics'; | 565 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/met
rics'; |
440 | 566 |
441 var _response = _requester.request(_url, | 567 var _response = _requester.request(_url, |
442 "GET", | 568 "GET", |
443 body: _body, | 569 body: _body, |
444 queryParams: _queryParams, | 570 queryParams: _queryParams, |
445 uploadOptions: _uploadOptions, | 571 uploadOptions: _uploadOptions, |
446 uploadMedia: _uploadMedia, | 572 uploadMedia: _uploadMedia, |
447 downloadOptions: _downloadOptions); | 573 downloadOptions: _downloadOptions); |
448 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); | 574 return _response.then((data) => new ListLogMetricsResponse.fromJson(data)); |
449 } | 575 } |
450 | 576 |
451 /** | 577 /** |
452 * Creates or updates a logs-based metric. | 578 * Creates or updates a logs-based metric. |
453 * | 579 * |
454 * [request] - The metadata request object. | 580 * [request] - The metadata request object. |
455 * | 581 * |
456 * Request parameters: | 582 * Request parameters: |
457 * | 583 * |
458 * [metricName] - The resource name of the metric to update. Example: | 584 * [metricName] - The resource name of the metric to update. |
459 * `"projects/my-project-id/metrics/my-metric-id"`. The updated metric must be | 585 * Example: `"projects/my-project-id/metrics/my-metric-id"`. |
460 * provided in the request and have the same identifier that is specified in | 586 * |
461 * `metricName`. If the metric does not exist, it is created. | 587 * The updated metric must be provided in the request and have the |
462 * Value must have pattern "^projects/[^/] * / metrics/[^/]*$". | 588 * same identifier that is specified in `metricName`. |
| 589 * If the metric does not exist, it is created. |
| 590 * Value must have pattern "^projects/[^/]+/metrics/[^/]+$". |
463 * | 591 * |
464 * Completes with a [LogMetric]. | 592 * Completes with a [LogMetric]. |
465 * | 593 * |
466 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 594 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
467 * error. | 595 * error. |
468 * | 596 * |
469 * If the used [http.Client] completes with an error when making a REST call, | 597 * If the used [http.Client] completes with an error when making a REST call, |
470 * this method will complete with the same error. | 598 * this method will complete with the same error. |
471 */ | 599 */ |
472 async.Future<LogMetric> update(LogMetric request, core.String metricName) { | 600 async.Future<LogMetric> update(LogMetric request, core.String metricName) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 ProjectsSinksResourceApi(commons.ApiRequester client) : | 633 ProjectsSinksResourceApi(commons.ApiRequester client) : |
506 _requester = client; | 634 _requester = client; |
507 | 635 |
508 /** | 636 /** |
509 * Creates a sink. | 637 * Creates a sink. |
510 * | 638 * |
511 * [request] - The metadata request object. | 639 * [request] - The metadata request object. |
512 * | 640 * |
513 * Request parameters: | 641 * Request parameters: |
514 * | 642 * |
515 * [projectName] - The resource name of the project in which to create the | 643 * [parent] - Required. The resource in which to create the sink. |
516 * sink. Example: `"projects/my-project-id"`. The new sink must be provided in | 644 * Example: `"projects/my-project-id"`. |
517 * the request. | 645 * The new sink must be provided in the request. |
518 * Value must have pattern "^projects/[^/]*$". | 646 * Value must have pattern "^projects/[^/]+$". |
| 647 * |
| 648 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated |
| 649 * service account returned |
| 650 * in the sink's writer_identity. Set this field to be true to export |
| 651 * logs from one project to a different project. This field is ignored for |
| 652 * non-project sinks (e.g. organization sinks) because those sinks are |
| 653 * required to have dedicated service accounts. |
519 * | 654 * |
520 * Completes with a [LogSink]. | 655 * Completes with a [LogSink]. |
521 * | 656 * |
522 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 657 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
523 * error. | 658 * error. |
524 * | 659 * |
525 * If the used [http.Client] completes with an error when making a REST call, | 660 * If the used [http.Client] completes with an error when making a REST call, |
526 * this method will complete with the same error. | 661 * this method will complete with the same error. |
527 */ | 662 */ |
528 async.Future<LogSink> create(LogSink request, core.String projectName) { | 663 async.Future<LogSink> create(LogSink request, core.String parent, {core.bool u
niqueWriterIdentity}) { |
529 var _url = null; | 664 var _url = null; |
530 var _queryParams = new core.Map(); | 665 var _queryParams = new core.Map(); |
531 var _uploadMedia = null; | 666 var _uploadMedia = null; |
532 var _uploadOptions = null; | 667 var _uploadOptions = null; |
533 var _downloadOptions = commons.DownloadOptions.Metadata; | 668 var _downloadOptions = commons.DownloadOptions.Metadata; |
534 var _body = null; | 669 var _body = null; |
535 | 670 |
536 if (request != null) { | 671 if (request != null) { |
537 _body = convert.JSON.encode((request).toJson()); | 672 _body = convert.JSON.encode((request).toJson()); |
538 } | 673 } |
539 if (projectName == null) { | 674 if (parent == null) { |
540 throw new core.ArgumentError("Parameter projectName is required."); | 675 throw new core.ArgumentError("Parameter parent is required."); |
| 676 } |
| 677 if (uniqueWriterIdentity != null) { |
| 678 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
541 } | 679 } |
542 | 680 |
543 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$projectName') +
'/sinks'; | 681 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sin
ks'; |
544 | 682 |
545 var _response = _requester.request(_url, | 683 var _response = _requester.request(_url, |
546 "POST", | 684 "POST", |
547 body: _body, | 685 body: _body, |
548 queryParams: _queryParams, | 686 queryParams: _queryParams, |
549 uploadOptions: _uploadOptions, | 687 uploadOptions: _uploadOptions, |
550 uploadMedia: _uploadMedia, | 688 uploadMedia: _uploadMedia, |
551 downloadOptions: _downloadOptions); | 689 downloadOptions: _downloadOptions); |
552 return _response.then((data) => new LogSink.fromJson(data)); | 690 return _response.then((data) => new LogSink.fromJson(data)); |
553 } | 691 } |
554 | 692 |
555 /** | 693 /** |
556 * Deletes a sink. | 694 * Deletes a sink. |
557 * | 695 * |
558 * Request parameters: | 696 * Request parameters: |
559 * | 697 * |
560 * [sinkName] - The resource name of the sink to delete. Example: | 698 * [sinkName] - Required. The resource name of the sink to delete, including |
561 * `"projects/my-project-id/sinks/my-sink-id"`. | 699 * the parent |
562 * Value must have pattern "^projects/[^/] * / sinks/[^/]*$". | 700 * resource and the sink identifier. Example: |
| 701 * `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink |
| 702 * does not exist. |
| 703 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
563 * | 704 * |
564 * Completes with a [Empty]. | 705 * Completes with a [Empty]. |
565 * | 706 * |
566 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
567 * error. | 708 * error. |
568 * | 709 * |
569 * If the used [http.Client] completes with an error when making a REST call, | 710 * If the used [http.Client] completes with an error when making a REST call, |
570 * this method will complete with the same error. | 711 * this method will complete with the same error. |
571 */ | 712 */ |
572 async.Future<Empty> delete(core.String sinkName) { | 713 async.Future<Empty> delete(core.String sinkName) { |
(...skipping 18 matching lines...) Expand all Loading... |
591 uploadMedia: _uploadMedia, | 732 uploadMedia: _uploadMedia, |
592 downloadOptions: _downloadOptions); | 733 downloadOptions: _downloadOptions); |
593 return _response.then((data) => new Empty.fromJson(data)); | 734 return _response.then((data) => new Empty.fromJson(data)); |
594 } | 735 } |
595 | 736 |
596 /** | 737 /** |
597 * Gets a sink. | 738 * Gets a sink. |
598 * | 739 * |
599 * Request parameters: | 740 * Request parameters: |
600 * | 741 * |
601 * [sinkName] - The resource name of the sink to return. Example: | 742 * [sinkName] - Required. The resource name of the sink to return. |
602 * `"projects/my-project-id/sinks/my-sink-id"`. | 743 * Example: `"projects/my-project-id/sinks/my-sink-id"`. |
603 * Value must have pattern "^projects/[^/] * / sinks/[^/]*$". | 744 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
604 * | 745 * |
605 * Completes with a [LogSink]. | 746 * Completes with a [LogSink]. |
606 * | 747 * |
607 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 748 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
608 * error. | 749 * error. |
609 * | 750 * |
610 * If the used [http.Client] completes with an error when making a REST call, | 751 * If the used [http.Client] completes with an error when making a REST call, |
611 * this method will complete with the same error. | 752 * this method will complete with the same error. |
612 */ | 753 */ |
613 async.Future<LogSink> get(core.String sinkName) { | 754 async.Future<LogSink> get(core.String sinkName) { |
(...skipping 18 matching lines...) Expand all Loading... |
632 uploadMedia: _uploadMedia, | 773 uploadMedia: _uploadMedia, |
633 downloadOptions: _downloadOptions); | 774 downloadOptions: _downloadOptions); |
634 return _response.then((data) => new LogSink.fromJson(data)); | 775 return _response.then((data) => new LogSink.fromJson(data)); |
635 } | 776 } |
636 | 777 |
637 /** | 778 /** |
638 * Lists sinks. | 779 * Lists sinks. |
639 * | 780 * |
640 * Request parameters: | 781 * Request parameters: |
641 * | 782 * |
642 * [projectName] - Required. The resource name of the project containing the | 783 * [parent] - Required. The resource name where this sink was created. |
643 * sinks. Example: `"projects/my-logging-project"`. | 784 * Example: `"projects/my-logging-project"`. |
644 * Value must have pattern "^projects/[^/]*$". | 785 * Value must have pattern "^projects/[^/]+$". |
645 * | |
646 * [pageToken] - Optional. If the `pageToken` parameter is supplied, then the | |
647 * next page of results is retrieved. The `pageToken` parameter must be set to | |
648 * the value of the `nextPageToken` from the previous response. The value of | |
649 * `projectName` must be the same as in the previous request. | |
650 * | 786 * |
651 * [pageSize] - Optional. The maximum number of results to return from this | 787 * [pageSize] - Optional. The maximum number of results to return from this |
652 * request. You must check for presence of `nextPageToken` to determine if | 788 * request. |
653 * additional results are available, which you can retrieve by passing the | 789 * Non-positive values are ignored. The presence of `nextPageToken` in the |
654 * `nextPageToken` value as the `pageToken` parameter in the next request. | 790 * response indicates that more results might be available. |
| 791 * |
| 792 * [pageToken] - Optional. If present, then retrieve the next batch of results |
| 793 * from the |
| 794 * preceding call to this method. `pageToken` must be the value of |
| 795 * `nextPageToken` from the previous response. The values of other method |
| 796 * parameters should be identical to those in the previous call. |
655 * | 797 * |
656 * Completes with a [ListSinksResponse]. | 798 * Completes with a [ListSinksResponse]. |
657 * | 799 * |
658 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 800 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
659 * error. | 801 * error. |
660 * | 802 * |
661 * If the used [http.Client] completes with an error when making a REST call, | 803 * If the used [http.Client] completes with an error when making a REST call, |
662 * this method will complete with the same error. | 804 * this method will complete with the same error. |
663 */ | 805 */ |
664 async.Future<ListSinksResponse> list(core.String projectName, {core.String pag
eToken, core.int pageSize}) { | 806 async.Future<ListSinksResponse> list(core.String parent, {core.int pageSize, c
ore.String pageToken}) { |
665 var _url = null; | 807 var _url = null; |
666 var _queryParams = new core.Map(); | 808 var _queryParams = new core.Map(); |
667 var _uploadMedia = null; | 809 var _uploadMedia = null; |
668 var _uploadOptions = null; | 810 var _uploadOptions = null; |
669 var _downloadOptions = commons.DownloadOptions.Metadata; | 811 var _downloadOptions = commons.DownloadOptions.Metadata; |
670 var _body = null; | 812 var _body = null; |
671 | 813 |
672 if (projectName == null) { | 814 if (parent == null) { |
673 throw new core.ArgumentError("Parameter projectName is required."); | 815 throw new core.ArgumentError("Parameter parent is required."); |
| 816 } |
| 817 if (pageSize != null) { |
| 818 _queryParams["pageSize"] = ["${pageSize}"]; |
674 } | 819 } |
675 if (pageToken != null) { | 820 if (pageToken != null) { |
676 _queryParams["pageToken"] = [pageToken]; | 821 _queryParams["pageToken"] = [pageToken]; |
677 } | 822 } |
678 if (pageSize != null) { | |
679 _queryParams["pageSize"] = ["${pageSize}"]; | |
680 } | |
681 | 823 |
682 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$projectName') +
'/sinks'; | 824 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/sin
ks'; |
683 | 825 |
684 var _response = _requester.request(_url, | 826 var _response = _requester.request(_url, |
685 "GET", | 827 "GET", |
686 body: _body, | 828 body: _body, |
687 queryParams: _queryParams, | 829 queryParams: _queryParams, |
688 uploadOptions: _uploadOptions, | 830 uploadOptions: _uploadOptions, |
689 uploadMedia: _uploadMedia, | 831 uploadMedia: _uploadMedia, |
690 downloadOptions: _downloadOptions); | 832 downloadOptions: _downloadOptions); |
691 return _response.then((data) => new ListSinksResponse.fromJson(data)); | 833 return _response.then((data) => new ListSinksResponse.fromJson(data)); |
692 } | 834 } |
693 | 835 |
694 /** | 836 /** |
695 * Creates or updates a sink. | 837 * Updates or creates a sink. |
696 * | 838 * |
697 * [request] - The metadata request object. | 839 * [request] - The metadata request object. |
698 * | 840 * |
699 * Request parameters: | 841 * Request parameters: |
700 * | 842 * |
701 * [sinkName] - The resource name of the sink to update. Example: | 843 * [sinkName] - Required. The resource name of the sink to update, including |
702 * `"projects/my-project-id/sinks/my-sink-id"`. The updated sink must be | 844 * the parent |
703 * provided in the request and have the same name that is specified in | 845 * resource and the sink identifier. If the sink does not exist, this method |
704 * `sinkName`. If the sink does not exist, it is created. | 846 * creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. |
705 * Value must have pattern "^projects/[^/] * / sinks/[^/]*$". | 847 * Value must have pattern "^projects/[^/]+/sinks/[^/]+$". |
| 848 * |
| 849 * [uniqueWriterIdentity] - Optional. Whether the sink will have a dedicated |
| 850 * service account returned |
| 851 * in the sink's writer_identity. Set this field to be true to export |
| 852 * logs from one project to a different project. This field is ignored for |
| 853 * non-project sinks (e.g. organization sinks) because those sinks are |
| 854 * required to have dedicated service accounts. |
706 * | 855 * |
707 * Completes with a [LogSink]. | 856 * Completes with a [LogSink]. |
708 * | 857 * |
709 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 858 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
710 * error. | 859 * error. |
711 * | 860 * |
712 * If the used [http.Client] completes with an error when making a REST call, | 861 * If the used [http.Client] completes with an error when making a REST call, |
713 * this method will complete with the same error. | 862 * this method will complete with the same error. |
714 */ | 863 */ |
715 async.Future<LogSink> update(LogSink request, core.String sinkName) { | 864 async.Future<LogSink> update(LogSink request, core.String sinkName, {core.bool
uniqueWriterIdentity}) { |
716 var _url = null; | 865 var _url = null; |
717 var _queryParams = new core.Map(); | 866 var _queryParams = new core.Map(); |
718 var _uploadMedia = null; | 867 var _uploadMedia = null; |
719 var _uploadOptions = null; | 868 var _uploadOptions = null; |
720 var _downloadOptions = commons.DownloadOptions.Metadata; | 869 var _downloadOptions = commons.DownloadOptions.Metadata; |
721 var _body = null; | 870 var _body = null; |
722 | 871 |
723 if (request != null) { | 872 if (request != null) { |
724 _body = convert.JSON.encode((request).toJson()); | 873 _body = convert.JSON.encode((request).toJson()); |
725 } | 874 } |
726 if (sinkName == null) { | 875 if (sinkName == null) { |
727 throw new core.ArgumentError("Parameter sinkName is required."); | 876 throw new core.ArgumentError("Parameter sinkName is required."); |
728 } | 877 } |
| 878 if (uniqueWriterIdentity != null) { |
| 879 _queryParams["uniqueWriterIdentity"] = ["${uniqueWriterIdentity}"]; |
| 880 } |
729 | 881 |
730 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName'); | 882 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$sinkName'); |
731 | 883 |
732 var _response = _requester.request(_url, | 884 var _response = _requester.request(_url, |
733 "PUT", | 885 "PUT", |
734 body: _body, | 886 body: _body, |
735 queryParams: _queryParams, | 887 queryParams: _queryParams, |
736 uploadOptions: _uploadOptions, | 888 uploadOptions: _uploadOptions, |
737 uploadMedia: _uploadMedia, | 889 uploadMedia: _uploadMedia, |
738 downloadOptions: _downloadOptions); | 890 downloadOptions: _downloadOptions); |
739 return _response.then((data) => new LogSink.fromJson(data)); | 891 return _response.then((data) => new LogSink.fromJson(data)); |
740 } | 892 } |
741 | 893 |
742 } | 894 } |
743 | 895 |
744 | 896 |
745 | 897 |
746 /** | 898 /** |
747 * A generic empty message that you can re-use to avoid defining duplicated | 899 * A generic empty message that you can re-use to avoid defining duplicated |
748 * empty messages in your APIs. A typical example is to use it as the request or | 900 * empty messages in your APIs. A typical example is to use it as the request |
749 * the response type of an API method. For instance: service Foo { rpc | 901 * or the response type of an API method. For instance: |
750 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON | 902 * |
751 * representation for `Empty` is empty JSON object `{}`. | 903 * service Foo { |
| 904 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 905 * } |
| 906 * |
| 907 * The JSON representation for `Empty` is empty JSON object `{}`. |
752 */ | 908 */ |
753 class Empty { | 909 class Empty { |
754 | 910 |
755 Empty(); | 911 Empty(); |
756 | 912 |
757 Empty.fromJson(core.Map _json) { | 913 Empty.fromJson(core.Map _json) { |
758 } | 914 } |
759 | 915 |
760 core.Map toJson() { | 916 core.Map toJson() { |
761 var _json = new core.Map(); | 917 var _json = new core.Map(); |
762 return _json; | 918 return _json; |
763 } | 919 } |
764 } | 920 } |
765 | 921 |
766 /** A common proto for logging HTTP requests. */ | 922 /** |
| 923 * A common proto for logging HTTP requests. Only contains semantics |
| 924 * defined by the HTTP specification. Product-specific logging |
| 925 * information MUST be defined in a separate message. |
| 926 */ |
767 class HttpRequest { | 927 class HttpRequest { |
768 /** | 928 /** |
769 * The number of HTTP response bytes inserted into cache. Set only when a | 929 * The number of HTTP response bytes inserted into cache. Set only when a |
770 * cache fill was attempted. | 930 * cache fill was attempted. |
771 */ | 931 */ |
772 core.String cacheFillBytes; | 932 core.String cacheFillBytes; |
773 /** | 933 /** |
774 * Whether or not an entity was served from cache (with or without | 934 * Whether or not an entity was served from cache |
775 * validation). | 935 * (with or without validation). |
776 */ | 936 */ |
777 core.bool cacheHit; | 937 core.bool cacheHit; |
778 /** Whether or not a cache lookup was attempted. */ | 938 /** Whether or not a cache lookup was attempted. */ |
779 core.bool cacheLookup; | 939 core.bool cacheLookup; |
780 /** | 940 /** |
781 * Whether or not the response was validated with the origin server before | 941 * Whether or not the response was validated with the origin server before |
782 * being served from cache. This field is only meaningful if `cache_hit` is | 942 * being served from cache. This field is only meaningful if `cache_hit` is |
783 * True. | 943 * True. |
784 */ | 944 */ |
785 core.bool cacheValidatedWithOriginServer; | 945 core.bool cacheValidatedWithOriginServer; |
786 /** | 946 /** |
787 * The referer URL of the request, as defined in [HTTP/1.1 Header Field | 947 * The request processing latency on the server, from the time the request was |
| 948 * received until the response was sent. |
| 949 */ |
| 950 core.String latency; |
| 951 /** |
| 952 * The referer URL of the request, as defined in |
| 953 * [HTTP/1.1 Header Field |
788 * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). | 954 * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
789 */ | 955 */ |
790 core.String referer; | 956 core.String referer; |
791 /** | 957 /** |
792 * The IP address (IPv4 or IPv6) of the client that issued the HTTP request. | 958 * The IP address (IPv4 or IPv6) of the client that issued the HTTP |
793 * Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. | 959 * request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. |
794 */ | 960 */ |
795 core.String remoteIp; | 961 core.String remoteIp; |
796 /** The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. */ | 962 /** The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. */ |
797 core.String requestMethod; | 963 core.String requestMethod; |
798 /** | 964 /** |
799 * The size of the HTTP request message in bytes, including the request | 965 * The size of the HTTP request message in bytes, including the request |
800 * headers and the request body. | 966 * headers and the request body. |
801 */ | 967 */ |
802 core.String requestSize; | 968 core.String requestSize; |
803 /** | 969 /** |
804 * The scheme (http, https), the host name, the path and the query portion of | 970 * The scheme (http, https), the host name, the path and the query |
805 * the URL that was requested. Example: | 971 * portion of the URL that was requested. |
806 * `"http://example.com/some/info?color=red"`. | 972 * Example: `"http://example.com/some/info?color=red"`. |
807 */ | 973 */ |
808 core.String requestUrl; | 974 core.String requestUrl; |
809 /** | 975 /** |
810 * The size of the HTTP response message sent back to the client, in bytes, | 976 * The size of the HTTP response message sent back to the client, in bytes, |
811 * including the response headers and the response body. | 977 * including the response headers and the response body. |
812 */ | 978 */ |
813 core.String responseSize; | 979 core.String responseSize; |
814 /** | 980 /** |
815 * The response code indicating the status of response. Examples: 200, 404. | 981 * The IP address (IPv4 or IPv6) of the origin server that the request was |
| 982 * sent to. |
| 983 */ |
| 984 core.String serverIp; |
| 985 /** |
| 986 * The response code indicating the status of response. |
| 987 * Examples: 200, 404. |
816 */ | 988 */ |
817 core.int status; | 989 core.int status; |
818 /** | 990 /** |
819 * The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE | 991 * The user agent sent by the client. Example: |
820 * 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. | 992 * `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR |
| 993 * 1.0.3705)"`. |
821 */ | 994 */ |
822 core.String userAgent; | 995 core.String userAgent; |
823 | 996 |
824 HttpRequest(); | 997 HttpRequest(); |
825 | 998 |
826 HttpRequest.fromJson(core.Map _json) { | 999 HttpRequest.fromJson(core.Map _json) { |
827 if (_json.containsKey("cacheFillBytes")) { | 1000 if (_json.containsKey("cacheFillBytes")) { |
828 cacheFillBytes = _json["cacheFillBytes"]; | 1001 cacheFillBytes = _json["cacheFillBytes"]; |
829 } | 1002 } |
830 if (_json.containsKey("cacheHit")) { | 1003 if (_json.containsKey("cacheHit")) { |
831 cacheHit = _json["cacheHit"]; | 1004 cacheHit = _json["cacheHit"]; |
832 } | 1005 } |
833 if (_json.containsKey("cacheLookup")) { | 1006 if (_json.containsKey("cacheLookup")) { |
834 cacheLookup = _json["cacheLookup"]; | 1007 cacheLookup = _json["cacheLookup"]; |
835 } | 1008 } |
836 if (_json.containsKey("cacheValidatedWithOriginServer")) { | 1009 if (_json.containsKey("cacheValidatedWithOriginServer")) { |
837 cacheValidatedWithOriginServer = _json["cacheValidatedWithOriginServer"]; | 1010 cacheValidatedWithOriginServer = _json["cacheValidatedWithOriginServer"]; |
838 } | 1011 } |
| 1012 if (_json.containsKey("latency")) { |
| 1013 latency = _json["latency"]; |
| 1014 } |
839 if (_json.containsKey("referer")) { | 1015 if (_json.containsKey("referer")) { |
840 referer = _json["referer"]; | 1016 referer = _json["referer"]; |
841 } | 1017 } |
842 if (_json.containsKey("remoteIp")) { | 1018 if (_json.containsKey("remoteIp")) { |
843 remoteIp = _json["remoteIp"]; | 1019 remoteIp = _json["remoteIp"]; |
844 } | 1020 } |
845 if (_json.containsKey("requestMethod")) { | 1021 if (_json.containsKey("requestMethod")) { |
846 requestMethod = _json["requestMethod"]; | 1022 requestMethod = _json["requestMethod"]; |
847 } | 1023 } |
848 if (_json.containsKey("requestSize")) { | 1024 if (_json.containsKey("requestSize")) { |
849 requestSize = _json["requestSize"]; | 1025 requestSize = _json["requestSize"]; |
850 } | 1026 } |
851 if (_json.containsKey("requestUrl")) { | 1027 if (_json.containsKey("requestUrl")) { |
852 requestUrl = _json["requestUrl"]; | 1028 requestUrl = _json["requestUrl"]; |
853 } | 1029 } |
854 if (_json.containsKey("responseSize")) { | 1030 if (_json.containsKey("responseSize")) { |
855 responseSize = _json["responseSize"]; | 1031 responseSize = _json["responseSize"]; |
856 } | 1032 } |
| 1033 if (_json.containsKey("serverIp")) { |
| 1034 serverIp = _json["serverIp"]; |
| 1035 } |
857 if (_json.containsKey("status")) { | 1036 if (_json.containsKey("status")) { |
858 status = _json["status"]; | 1037 status = _json["status"]; |
859 } | 1038 } |
860 if (_json.containsKey("userAgent")) { | 1039 if (_json.containsKey("userAgent")) { |
861 userAgent = _json["userAgent"]; | 1040 userAgent = _json["userAgent"]; |
862 } | 1041 } |
863 } | 1042 } |
864 | 1043 |
865 core.Map toJson() { | 1044 core.Map toJson() { |
866 var _json = new core.Map(); | 1045 var _json = new core.Map(); |
867 if (cacheFillBytes != null) { | 1046 if (cacheFillBytes != null) { |
868 _json["cacheFillBytes"] = cacheFillBytes; | 1047 _json["cacheFillBytes"] = cacheFillBytes; |
869 } | 1048 } |
870 if (cacheHit != null) { | 1049 if (cacheHit != null) { |
871 _json["cacheHit"] = cacheHit; | 1050 _json["cacheHit"] = cacheHit; |
872 } | 1051 } |
873 if (cacheLookup != null) { | 1052 if (cacheLookup != null) { |
874 _json["cacheLookup"] = cacheLookup; | 1053 _json["cacheLookup"] = cacheLookup; |
875 } | 1054 } |
876 if (cacheValidatedWithOriginServer != null) { | 1055 if (cacheValidatedWithOriginServer != null) { |
877 _json["cacheValidatedWithOriginServer"] = cacheValidatedWithOriginServer; | 1056 _json["cacheValidatedWithOriginServer"] = cacheValidatedWithOriginServer; |
878 } | 1057 } |
| 1058 if (latency != null) { |
| 1059 _json["latency"] = latency; |
| 1060 } |
879 if (referer != null) { | 1061 if (referer != null) { |
880 _json["referer"] = referer; | 1062 _json["referer"] = referer; |
881 } | 1063 } |
882 if (remoteIp != null) { | 1064 if (remoteIp != null) { |
883 _json["remoteIp"] = remoteIp; | 1065 _json["remoteIp"] = remoteIp; |
884 } | 1066 } |
885 if (requestMethod != null) { | 1067 if (requestMethod != null) { |
886 _json["requestMethod"] = requestMethod; | 1068 _json["requestMethod"] = requestMethod; |
887 } | 1069 } |
888 if (requestSize != null) { | 1070 if (requestSize != null) { |
889 _json["requestSize"] = requestSize; | 1071 _json["requestSize"] = requestSize; |
890 } | 1072 } |
891 if (requestUrl != null) { | 1073 if (requestUrl != null) { |
892 _json["requestUrl"] = requestUrl; | 1074 _json["requestUrl"] = requestUrl; |
893 } | 1075 } |
894 if (responseSize != null) { | 1076 if (responseSize != null) { |
895 _json["responseSize"] = responseSize; | 1077 _json["responseSize"] = responseSize; |
896 } | 1078 } |
| 1079 if (serverIp != null) { |
| 1080 _json["serverIp"] = serverIp; |
| 1081 } |
897 if (status != null) { | 1082 if (status != null) { |
898 _json["status"] = status; | 1083 _json["status"] = status; |
899 } | 1084 } |
900 if (userAgent != null) { | 1085 if (userAgent != null) { |
901 _json["userAgent"] = userAgent; | 1086 _json["userAgent"] = userAgent; |
902 } | 1087 } |
903 return _json; | 1088 return _json; |
904 } | 1089 } |
905 } | 1090 } |
906 | 1091 |
907 /** A description of a label. */ | 1092 /** A description of a label. */ |
908 class LabelDescriptor { | 1093 class LabelDescriptor { |
909 /** A human-readable description for the label. */ | 1094 /** A human-readable description for the label. */ |
910 core.String description; | 1095 core.String description; |
911 /** The label key. */ | 1096 /** The label key. */ |
912 core.String key; | 1097 core.String key; |
913 /** | 1098 /** |
914 * The type of data that can be assigned to the label. | 1099 * The type of data that can be assigned to the label. |
915 * Possible string values are: | 1100 * Possible string values are: |
916 * - "STRING" : A STRING. | 1101 * - "STRING" : A variable-length string. This is the default. |
917 * - "BOOL" : A BOOL. | 1102 * - "BOOL" : Boolean; true or false. |
918 * - "INT64" : A INT64. | 1103 * - "INT64" : A 64-bit signed integer. |
919 */ | 1104 */ |
920 core.String valueType; | 1105 core.String valueType; |
921 | 1106 |
922 LabelDescriptor(); | 1107 LabelDescriptor(); |
923 | 1108 |
924 LabelDescriptor.fromJson(core.Map _json) { | 1109 LabelDescriptor.fromJson(core.Map _json) { |
925 if (_json.containsKey("description")) { | 1110 if (_json.containsKey("description")) { |
926 description = _json["description"]; | 1111 description = _json["description"]; |
927 } | 1112 } |
928 if (_json.containsKey("key")) { | 1113 if (_json.containsKey("key")) { |
(...skipping 15 matching lines...) Expand all Loading... |
944 if (valueType != null) { | 1129 if (valueType != null) { |
945 _json["valueType"] = valueType; | 1130 _json["valueType"] = valueType; |
946 } | 1131 } |
947 return _json; | 1132 return _json; |
948 } | 1133 } |
949 } | 1134 } |
950 | 1135 |
951 /** The parameters to `ListLogEntries`. */ | 1136 /** The parameters to `ListLogEntries`. */ |
952 class ListLogEntriesRequest { | 1137 class ListLogEntriesRequest { |
953 /** | 1138 /** |
954 * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). | 1139 * Optional. A filter that chooses which log entries to return. See [Advanced |
955 * The filter is compared against all log entries in the projects specified by | 1140 * Logs Filters](/logging/docs/view/advanced_filters). Only log entries that |
956 * `projectIds`. Only entries that match the filter are retrieved. An empty | 1141 * match the filter are returned. An empty filter matches all log entries. |
957 * filter matches all log entries. | |
958 */ | 1142 */ |
959 core.String filter; | 1143 core.String filter; |
960 /** | 1144 /** |
961 * Optional. How the results should be sorted. Presently, the only permitted | 1145 * Optional. How the results should be sorted. Presently, the only permitted |
962 * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first | 1146 * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first |
963 * option returns entries in order of increasing values of | 1147 * option returns entries in order of increasing values of |
964 * `LogEntry.timestamp` (oldest first), and the second option returns entries | 1148 * `LogEntry.timestamp` (oldest first), and the second option returns entries |
965 * in order of decreasing timestamps (newest first). Entries with equal | 1149 * in order of decreasing timestamps (newest first). Entries with equal |
966 * timestamps are returned in order of `LogEntry.insertId`. | 1150 * timestamps are returned in order of `LogEntry.insertId`. |
967 */ | 1151 */ |
968 core.String orderBy; | 1152 core.String orderBy; |
969 /** | 1153 /** |
970 * Optional. The maximum number of results to return from this request. You | 1154 * Optional. The maximum number of results to return from this request. |
971 * must check for presence of `nextPageToken` to determine if additional | 1155 * Non-positive values are ignored. The presence of `nextPageToken` in the |
972 * results are available, which you can retrieve by passing the | 1156 * response indicates that more results might be available. |
973 * `nextPageToken` value as the `pageToken` parameter in the next request. | |
974 */ | 1157 */ |
975 core.int pageSize; | 1158 core.int pageSize; |
976 /** | 1159 /** |
977 * Optional. If the `pageToken` parameter is supplied, then the next page of | 1160 * Optional. If present, then retrieve the next batch of results from the |
978 * results is retrieved. The `pageToken` parameter must be set to the value of | 1161 * preceding call to this method. `pageToken` must be the value of |
979 * the `nextPageToken` from the previous response. The values of `projectIds`, | 1162 * `nextPageToken` from the previous response. The values of other method |
980 * `filter`, and `orderBy` must be the same as in the previous request. | 1163 * parameters should be identical to those in the previous call. |
981 */ | 1164 */ |
982 core.String pageToken; | 1165 core.String pageToken; |
983 /** | 1166 /** |
984 * Optional. If true, read access to all projects is not required and results | 1167 * Deprecated. One or more project identifiers or project numbers from which |
985 * will be returned for the subset of projects for which read access is | 1168 * to retrieve log entries. Examples: `"my-project-1A"`, `"1234567890"`. If |
986 * permitted (empty subset is permitted). | 1169 * present, these project identifiers are converted to resource format and |
987 */ | 1170 * added to the list of resources in `resourceNames`. Callers should use |
988 core.bool partialSuccess; | 1171 * `resourceNames` rather than this parameter. |
989 /** | |
990 * Required. One or more project IDs or project numbers from which to retrieve | |
991 * log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. | |
992 */ | 1172 */ |
993 core.List<core.String> projectIds; | 1173 core.List<core.String> projectIds; |
| 1174 /** |
| 1175 * Required. One or more cloud resources from which to retrieve log entries. |
| 1176 * Example: `"projects/my-project-1A"`, `"projects/1234567890"`. Projects |
| 1177 * listed in `projectIds` are added to this list. |
| 1178 */ |
| 1179 core.List<core.String> resourceNames; |
994 | 1180 |
995 ListLogEntriesRequest(); | 1181 ListLogEntriesRequest(); |
996 | 1182 |
997 ListLogEntriesRequest.fromJson(core.Map _json) { | 1183 ListLogEntriesRequest.fromJson(core.Map _json) { |
998 if (_json.containsKey("filter")) { | 1184 if (_json.containsKey("filter")) { |
999 filter = _json["filter"]; | 1185 filter = _json["filter"]; |
1000 } | 1186 } |
1001 if (_json.containsKey("orderBy")) { | 1187 if (_json.containsKey("orderBy")) { |
1002 orderBy = _json["orderBy"]; | 1188 orderBy = _json["orderBy"]; |
1003 } | 1189 } |
1004 if (_json.containsKey("pageSize")) { | 1190 if (_json.containsKey("pageSize")) { |
1005 pageSize = _json["pageSize"]; | 1191 pageSize = _json["pageSize"]; |
1006 } | 1192 } |
1007 if (_json.containsKey("pageToken")) { | 1193 if (_json.containsKey("pageToken")) { |
1008 pageToken = _json["pageToken"]; | 1194 pageToken = _json["pageToken"]; |
1009 } | 1195 } |
1010 if (_json.containsKey("partialSuccess")) { | |
1011 partialSuccess = _json["partialSuccess"]; | |
1012 } | |
1013 if (_json.containsKey("projectIds")) { | 1196 if (_json.containsKey("projectIds")) { |
1014 projectIds = _json["projectIds"]; | 1197 projectIds = _json["projectIds"]; |
1015 } | 1198 } |
| 1199 if (_json.containsKey("resourceNames")) { |
| 1200 resourceNames = _json["resourceNames"]; |
| 1201 } |
1016 } | 1202 } |
1017 | 1203 |
1018 core.Map toJson() { | 1204 core.Map toJson() { |
1019 var _json = new core.Map(); | 1205 var _json = new core.Map(); |
1020 if (filter != null) { | 1206 if (filter != null) { |
1021 _json["filter"] = filter; | 1207 _json["filter"] = filter; |
1022 } | 1208 } |
1023 if (orderBy != null) { | 1209 if (orderBy != null) { |
1024 _json["orderBy"] = orderBy; | 1210 _json["orderBy"] = orderBy; |
1025 } | 1211 } |
1026 if (pageSize != null) { | 1212 if (pageSize != null) { |
1027 _json["pageSize"] = pageSize; | 1213 _json["pageSize"] = pageSize; |
1028 } | 1214 } |
1029 if (pageToken != null) { | 1215 if (pageToken != null) { |
1030 _json["pageToken"] = pageToken; | 1216 _json["pageToken"] = pageToken; |
1031 } | 1217 } |
1032 if (partialSuccess != null) { | |
1033 _json["partialSuccess"] = partialSuccess; | |
1034 } | |
1035 if (projectIds != null) { | 1218 if (projectIds != null) { |
1036 _json["projectIds"] = projectIds; | 1219 _json["projectIds"] = projectIds; |
1037 } | 1220 } |
| 1221 if (resourceNames != null) { |
| 1222 _json["resourceNames"] = resourceNames; |
| 1223 } |
1038 return _json; | 1224 return _json; |
1039 } | 1225 } |
1040 } | 1226 } |
1041 | 1227 |
1042 /** Result returned from `ListLogEntries`. */ | 1228 /** Result returned from `ListLogEntries`. */ |
1043 class ListLogEntriesResponse { | 1229 class ListLogEntriesResponse { |
1044 /** A list of log entries. */ | 1230 /** A list of log entries. */ |
1045 core.List<LogEntry> entries; | 1231 core.List<LogEntry> entries; |
1046 /** | 1232 /** |
1047 * If there are more results than were returned, then `nextPageToken` is | 1233 * If there might be more results than appear in this response, then |
1048 * included in the response. To get the next set of results, call this method | 1234 * `nextPageToken` is included. To get the next set of results, call this |
1049 * again using the value of `nextPageToken` as `pageToken`. | 1235 * method again using the value of `nextPageToken` as `pageToken`. |
1050 */ | 1236 */ |
1051 core.String nextPageToken; | 1237 core.String nextPageToken; |
1052 /** | |
1053 * If partial_success is true, contains the project ids that had errors and | |
1054 * the associated errors. | |
1055 */ | |
1056 core.Map<core.String, Status> projectIdErrors; | |
1057 | 1238 |
1058 ListLogEntriesResponse(); | 1239 ListLogEntriesResponse(); |
1059 | 1240 |
1060 ListLogEntriesResponse.fromJson(core.Map _json) { | 1241 ListLogEntriesResponse.fromJson(core.Map _json) { |
1061 if (_json.containsKey("entries")) { | 1242 if (_json.containsKey("entries")) { |
1062 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to
List(); | 1243 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to
List(); |
1063 } | 1244 } |
1064 if (_json.containsKey("nextPageToken")) { | 1245 if (_json.containsKey("nextPageToken")) { |
1065 nextPageToken = _json["nextPageToken"]; | 1246 nextPageToken = _json["nextPageToken"]; |
1066 } | 1247 } |
1067 if (_json.containsKey("projectIdErrors")) { | |
1068 projectIdErrors = commons.mapMap(_json["projectIdErrors"], (item) => new S
tatus.fromJson(item)); | |
1069 } | |
1070 } | 1248 } |
1071 | 1249 |
1072 core.Map toJson() { | 1250 core.Map toJson() { |
1073 var _json = new core.Map(); | 1251 var _json = new core.Map(); |
1074 if (entries != null) { | 1252 if (entries != null) { |
1075 _json["entries"] = entries.map((value) => (value).toJson()).toList(); | 1253 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
1076 } | 1254 } |
1077 if (nextPageToken != null) { | 1255 if (nextPageToken != null) { |
1078 _json["nextPageToken"] = nextPageToken; | 1256 _json["nextPageToken"] = nextPageToken; |
1079 } | 1257 } |
1080 if (projectIdErrors != null) { | |
1081 _json["projectIdErrors"] = commons.mapMap(projectIdErrors, (item) => (item
).toJson()); | |
1082 } | |
1083 return _json; | 1258 return _json; |
1084 } | 1259 } |
1085 } | 1260 } |
1086 | 1261 |
1087 /** Result returned from ListLogMetrics. */ | 1262 /** Result returned from ListLogMetrics. */ |
1088 class ListLogMetricsResponse { | 1263 class ListLogMetricsResponse { |
1089 /** A list of logs-based metrics. */ | 1264 /** A list of logs-based metrics. */ |
1090 core.List<LogMetric> metrics; | 1265 core.List<LogMetric> metrics; |
1091 /** | 1266 /** |
1092 * If there are more results than were returned, then `nextPageToken` is | 1267 * If there might be more results than appear in this response, then |
1093 * included in the response. To get the next set of results, call this method | 1268 * `nextPageToken` is included. To get the next set of results, call this |
1094 * again using the value of `nextPageToken` as `pageToken`. | 1269 * method again using the value of `nextPageToken` as `pageToken`. |
1095 */ | 1270 */ |
1096 core.String nextPageToken; | 1271 core.String nextPageToken; |
1097 | 1272 |
1098 ListLogMetricsResponse(); | 1273 ListLogMetricsResponse(); |
1099 | 1274 |
1100 ListLogMetricsResponse.fromJson(core.Map _json) { | 1275 ListLogMetricsResponse.fromJson(core.Map _json) { |
1101 if (_json.containsKey("metrics")) { | 1276 if (_json.containsKey("metrics")) { |
1102 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t
oList(); | 1277 metrics = _json["metrics"].map((value) => new LogMetric.fromJson(value)).t
oList(); |
1103 } | 1278 } |
1104 if (_json.containsKey("nextPageToken")) { | 1279 if (_json.containsKey("nextPageToken")) { |
1105 nextPageToken = _json["nextPageToken"]; | 1280 nextPageToken = _json["nextPageToken"]; |
1106 } | 1281 } |
1107 } | 1282 } |
1108 | 1283 |
1109 core.Map toJson() { | 1284 core.Map toJson() { |
1110 var _json = new core.Map(); | 1285 var _json = new core.Map(); |
1111 if (metrics != null) { | 1286 if (metrics != null) { |
1112 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | 1287 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
1113 } | 1288 } |
1114 if (nextPageToken != null) { | 1289 if (nextPageToken != null) { |
1115 _json["nextPageToken"] = nextPageToken; | 1290 _json["nextPageToken"] = nextPageToken; |
1116 } | 1291 } |
1117 return _json; | 1292 return _json; |
1118 } | 1293 } |
1119 } | 1294 } |
1120 | 1295 |
1121 /** Result returned from ListMonitoredResourceDescriptors. */ | 1296 /** Result returned from ListMonitoredResourceDescriptors. */ |
1122 class ListMonitoredResourceDescriptorsResponse { | 1297 class ListMonitoredResourceDescriptorsResponse { |
1123 /** | 1298 /** |
1124 * If there are more results than were returned, then `nextPageToken` is | 1299 * If there might be more results than appear in this response, then |
1125 * included in the response. To get the next set of results, call this method | 1300 * `nextPageToken` is included. To get the next set of results, call this |
1126 * again using the value of `nextPageToken` as `pageToken`. | 1301 * method again using the value of `nextPageToken` as `pageToken`. |
1127 */ | 1302 */ |
1128 core.String nextPageToken; | 1303 core.String nextPageToken; |
1129 /** A list of resource descriptors. */ | 1304 /** A list of resource descriptors. */ |
1130 core.List<MonitoredResourceDescriptor> resourceDescriptors; | 1305 core.List<MonitoredResourceDescriptor> resourceDescriptors; |
1131 | 1306 |
1132 ListMonitoredResourceDescriptorsResponse(); | 1307 ListMonitoredResourceDescriptorsResponse(); |
1133 | 1308 |
1134 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { | 1309 ListMonitoredResourceDescriptorsResponse.fromJson(core.Map _json) { |
1135 if (_json.containsKey("nextPageToken")) { | 1310 if (_json.containsKey("nextPageToken")) { |
1136 nextPageToken = _json["nextPageToken"]; | 1311 nextPageToken = _json["nextPageToken"]; |
(...skipping 11 matching lines...) Expand all Loading... |
1148 if (resourceDescriptors != null) { | 1323 if (resourceDescriptors != null) { |
1149 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value).
toJson()).toList(); | 1324 _json["resourceDescriptors"] = resourceDescriptors.map((value) => (value).
toJson()).toList(); |
1150 } | 1325 } |
1151 return _json; | 1326 return _json; |
1152 } | 1327 } |
1153 } | 1328 } |
1154 | 1329 |
1155 /** Result returned from `ListSinks`. */ | 1330 /** Result returned from `ListSinks`. */ |
1156 class ListSinksResponse { | 1331 class ListSinksResponse { |
1157 /** | 1332 /** |
1158 * If there are more results than were returned, then `nextPageToken` is | 1333 * If there might be more results than appear in this response, then |
1159 * included in the response. To get the next set of results, call this method | 1334 * `nextPageToken` is included. To get the next set of results, call the same |
1160 * again using the value of `nextPageToken` as `pageToken`. | 1335 * method again using the value of `nextPageToken` as `pageToken`. |
1161 */ | 1336 */ |
1162 core.String nextPageToken; | 1337 core.String nextPageToken; |
1163 /** A list of sinks. */ | 1338 /** A list of sinks. */ |
1164 core.List<LogSink> sinks; | 1339 core.List<LogSink> sinks; |
1165 | 1340 |
1166 ListSinksResponse(); | 1341 ListSinksResponse(); |
1167 | 1342 |
1168 ListSinksResponse.fromJson(core.Map _json) { | 1343 ListSinksResponse.fromJson(core.Map _json) { |
1169 if (_json.containsKey("nextPageToken")) { | 1344 if (_json.containsKey("nextPageToken")) { |
1170 nextPageToken = _json["nextPageToken"]; | 1345 nextPageToken = _json["nextPageToken"]; |
(...skipping 11 matching lines...) Expand all Loading... |
1182 if (sinks != null) { | 1357 if (sinks != null) { |
1183 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); | 1358 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); |
1184 } | 1359 } |
1185 return _json; | 1360 return _json; |
1186 } | 1361 } |
1187 } | 1362 } |
1188 | 1363 |
1189 /** An individual entry in a log. */ | 1364 /** An individual entry in a log. */ |
1190 class LogEntry { | 1365 class LogEntry { |
1191 /** | 1366 /** |
1192 * Optional. Information about the HTTP request associated with this log | 1367 * Optional. Information about the HTTP request associated with this |
1193 * entry, if applicable. | 1368 * log entry, if applicable. |
1194 */ | 1369 */ |
1195 HttpRequest httpRequest; | 1370 HttpRequest httpRequest; |
1196 /** | 1371 /** |
1197 * Optional. A unique ID for the log entry. If you provide this field, the | 1372 * Optional. A unique ID for the log entry. If you provide this |
1198 * logging service considers other log entries in the same log with the same | 1373 * field, the logging service considers other log entries in the |
1199 * ID as duplicates which can be removed. If omitted, Cloud Logging will | 1374 * same project with the same ID as duplicates which can be removed. If |
1200 * generate a unique ID for this log entry. | 1375 * omitted, Stackdriver Logging will generate a unique ID for this |
| 1376 * log entry. |
1201 */ | 1377 */ |
1202 core.String insertId; | 1378 core.String insertId; |
1203 /** | 1379 /** |
1204 * The log entry payload, represented as a structure that is expressed as a | 1380 * The log entry payload, represented as a structure that |
1205 * JSON object. | 1381 * is expressed as a JSON object. |
1206 * | 1382 * |
1207 * The values for Object must be JSON objects. It can consist of `num`, | 1383 * The values for Object must be JSON objects. It can consist of `num`, |
1208 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1384 * `String`, `bool` and `null` as well as `Map` and `List` values. |
1209 */ | 1385 */ |
1210 core.Map<core.String, core.Object> jsonPayload; | 1386 core.Map<core.String, core.Object> jsonPayload; |
1211 /** | 1387 /** |
1212 * Optional. A set of user-defined (key, value) data that provides additional | 1388 * Optional. A set of user-defined (key, value) data that provides additional |
1213 * information about the log entry. | 1389 * information about the log entry. |
1214 */ | 1390 */ |
1215 core.Map<core.String, core.String> labels; | 1391 core.Map<core.String, core.String> labels; |
1216 /** | 1392 /** |
1217 * Required. The resource name of the log to which this log entry belongs. The | 1393 * Required. The resource name of the log to which this log entry |
1218 * format of the name is `"projects/ | 1394 * belongs. The format of the name is |
1219 * /logs/"`. Examples: `"projects/my-projectid/logs/syslog"`, | 1395 * `"projects/<project-id>/logs/<log-id>"`. Examples: |
1220 * `"projects/1234567890/logs/library.googleapis.com%2Fbook_log"`. The log ID | 1396 * `"projects/my-projectid/logs/syslog"`, |
1221 * part of resource name must be less than 512 characters long and can only | 1397 * `"projects/my-projectid/logs/library.googleapis.com%2Fbook_log"`. |
1222 * include the following characters: upper and lower case alphanumeric | 1398 * |
1223 * characters: [A-Za-z0-9]; and punctuation characters: forward-slash, | 1399 * The log ID part of resource name must be less than 512 characters |
1224 * underscore, hyphen, and period. Forward-slash (`/`) characters in the log | 1400 * long and can only include the following characters: upper and |
1225 * ID must be URL-encoded. | 1401 * lower case alphanumeric characters: [A-Za-z0-9]; and punctuation |
| 1402 * characters: forward-slash, underscore, hyphen, and period. |
| 1403 * Forward-slash (`/`) characters in the log ID must be URL-encoded. |
1226 */ | 1404 */ |
1227 core.String logName; | 1405 core.String logName; |
1228 /** | 1406 /** |
1229 * Optional. Information about an operation associated with the log entry, if | 1407 * Optional. Information about an operation associated with the log entry, if |
1230 * applicable. | 1408 * applicable. |
1231 */ | 1409 */ |
1232 LogEntryOperation operation; | 1410 LogEntryOperation operation; |
1233 /** | 1411 /** |
1234 * The log entry payload, represented as a protocol buffer. You can only use | 1412 * The log entry payload, represented as a protocol buffer. Some |
1235 * `protoPayload` values that belong to a set of approved types. | 1413 * Google Cloud Platform services use this field for their log |
| 1414 * entry payloads. |
1236 * | 1415 * |
1237 * The values for Object must be JSON objects. It can consist of `num`, | 1416 * The values for Object must be JSON objects. It can consist of `num`, |
1238 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1417 * `String`, `bool` and `null` as well as `Map` and `List` values. |
1239 */ | 1418 */ |
1240 core.Map<core.String, core.Object> protoPayload; | 1419 core.Map<core.String, core.Object> protoPayload; |
1241 /** | 1420 /** |
1242 * Required. The monitored resource associated with this log entry. Example: a | 1421 * Required. The monitored resource associated with this log entry. |
1243 * log entry that reports a database error would be associated with the | 1422 * Example: a log entry that reports a database error would be |
1244 * monitored resource designating the particular database that reported the | 1423 * associated with the monitored resource designating the particular |
1245 * error. | 1424 * database that reported the error. |
1246 */ | 1425 */ |
1247 MonitoredResource resource; | 1426 MonitoredResource resource; |
1248 /** | 1427 /** |
1249 * Optional. The severity of the log entry. The default value is | 1428 * Optional. The severity of the log entry. The default value is |
1250 * `LogSeverity.DEFAULT`. | 1429 * `LogSeverity.DEFAULT`. |
1251 * Possible string values are: | 1430 * Possible string values are: |
1252 * - "DEFAULT" : A DEFAULT. | 1431 * - "DEFAULT" : (0) The log entry has no assigned severity level. |
1253 * - "DEBUG" : A DEBUG. | 1432 * - "DEBUG" : (100) Debug or trace information. |
1254 * - "INFO" : A INFO. | 1433 * - "INFO" : (200) Routine information, such as ongoing status or |
1255 * - "NOTICE" : A NOTICE. | 1434 * performance. |
1256 * - "WARNING" : A WARNING. | 1435 * - "NOTICE" : (300) Normal but significant events, such as start up, shut |
1257 * - "ERROR" : A ERROR. | 1436 * down, or |
1258 * - "CRITICAL" : A CRITICAL. | 1437 * a configuration change. |
1259 * - "ALERT" : A ALERT. | 1438 * - "WARNING" : (400) Warning events might cause problems. |
1260 * - "EMERGENCY" : A EMERGENCY. | 1439 * - "ERROR" : (500) Error events are likely to cause problems. |
| 1440 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. |
| 1441 * - "ALERT" : (700) A person must take an action immediately. |
| 1442 * - "EMERGENCY" : (800) One or more systems are unusable. |
1261 */ | 1443 */ |
1262 core.String severity; | 1444 core.String severity; |
1263 /** The log entry payload, represented as a Unicode string (UTF-8). */ | 1445 /** The log entry payload, represented as a Unicode string (UTF-8). */ |
1264 core.String textPayload; | 1446 core.String textPayload; |
1265 /** | 1447 /** |
1266 * Optional. The time the event described by the log entry occurred. If | 1448 * Optional. The time the event described by the log entry occurred. If |
1267 * omitted, Cloud Logging will use the time the log entry is written. | 1449 * omitted, Stackdriver Logging will use the time the log entry is received. |
1268 */ | 1450 */ |
1269 core.String timestamp; | 1451 core.String timestamp; |
1270 | 1452 |
1271 LogEntry(); | 1453 LogEntry(); |
1272 | 1454 |
1273 LogEntry.fromJson(core.Map _json) { | 1455 LogEntry.fromJson(core.Map _json) { |
1274 if (_json.containsKey("httpRequest")) { | 1456 if (_json.containsKey("httpRequest")) { |
1275 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); | 1457 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); |
1276 } | 1458 } |
1277 if (_json.containsKey("insertId")) { | 1459 if (_json.containsKey("insertId")) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 /** | 1530 /** |
1349 * Additional information about a potentially long-running operation with which | 1531 * Additional information about a potentially long-running operation with which |
1350 * a log entry is associated. | 1532 * a log entry is associated. |
1351 */ | 1533 */ |
1352 class LogEntryOperation { | 1534 class LogEntryOperation { |
1353 /** | 1535 /** |
1354 * Optional. Set this to True if this is the first log entry in the operation. | 1536 * Optional. Set this to True if this is the first log entry in the operation. |
1355 */ | 1537 */ |
1356 core.bool first; | 1538 core.bool first; |
1357 /** | 1539 /** |
1358 * Required. An arbitrary operation identifier. Log entries with the same | 1540 * Optional. An arbitrary operation identifier. Log entries with the |
1359 * identifier are assumed to be part of the same operation. | 1541 * same identifier are assumed to be part of the same operation. |
1360 */ | 1542 */ |
1361 core.String id; | 1543 core.String id; |
1362 /** | 1544 /** |
1363 * Optional. Set this to True if this is the last log entry in the operation. | 1545 * Optional. Set this to True if this is the last log entry in the operation. |
1364 */ | 1546 */ |
1365 core.bool last; | 1547 core.bool last; |
1366 /** | 1548 /** |
1367 * Required. An arbitrary producer identifier. The combination of `id` and | 1549 * Optional. An arbitrary producer identifier. The combination of |
1368 * `producer` must be globally unique. Examples for `producer`: | 1550 * `id` and `producer` must be globally unique. Examples for `producer`: |
1369 * `"MyDivision.MyBigCompany.com"`, "github.com/MyProject/MyApplication"`. | 1551 * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. |
1370 */ | 1552 */ |
1371 core.String producer; | 1553 core.String producer; |
1372 | 1554 |
1373 LogEntryOperation(); | 1555 LogEntryOperation(); |
1374 | 1556 |
1375 LogEntryOperation.fromJson(core.Map _json) { | 1557 LogEntryOperation.fromJson(core.Map _json) { |
1376 if (_json.containsKey("first")) { | 1558 if (_json.containsKey("first")) { |
1377 first = _json["first"]; | 1559 first = _json["first"]; |
1378 } | 1560 } |
1379 if (_json.containsKey("id")) { | 1561 if (_json.containsKey("id")) { |
(...skipping 25 matching lines...) Expand all Loading... |
1405 } | 1587 } |
1406 } | 1588 } |
1407 | 1589 |
1408 /** Application log line emitted while processing a request. */ | 1590 /** Application log line emitted while processing a request. */ |
1409 class LogLine { | 1591 class LogLine { |
1410 /** App-provided log message. */ | 1592 /** App-provided log message. */ |
1411 core.String logMessage; | 1593 core.String logMessage; |
1412 /** | 1594 /** |
1413 * Severity of this log entry. | 1595 * Severity of this log entry. |
1414 * Possible string values are: | 1596 * Possible string values are: |
1415 * - "DEFAULT" : A DEFAULT. | 1597 * - "DEFAULT" : (0) The log entry has no assigned severity level. |
1416 * - "DEBUG" : A DEBUG. | 1598 * - "DEBUG" : (100) Debug or trace information. |
1417 * - "INFO" : A INFO. | 1599 * - "INFO" : (200) Routine information, such as ongoing status or |
1418 * - "NOTICE" : A NOTICE. | 1600 * performance. |
1419 * - "WARNING" : A WARNING. | 1601 * - "NOTICE" : (300) Normal but significant events, such as start up, shut |
1420 * - "ERROR" : A ERROR. | 1602 * down, or |
1421 * - "CRITICAL" : A CRITICAL. | 1603 * a configuration change. |
1422 * - "ALERT" : A ALERT. | 1604 * - "WARNING" : (400) Warning events might cause problems. |
1423 * - "EMERGENCY" : A EMERGENCY. | 1605 * - "ERROR" : (500) Error events are likely to cause problems. |
| 1606 * - "CRITICAL" : (600) Critical events cause more severe problems or outages. |
| 1607 * - "ALERT" : (700) A person must take an action immediately. |
| 1608 * - "EMERGENCY" : (800) One or more systems are unusable. |
1424 */ | 1609 */ |
1425 core.String severity; | 1610 core.String severity; |
1426 /** Where in the source code this log message was written. */ | 1611 /** Where in the source code this log message was written. */ |
1427 SourceLocation sourceLocation; | 1612 SourceLocation sourceLocation; |
1428 /** Approximate time when this log entry was made. */ | 1613 /** Approximate time when this log entry was made. */ |
1429 core.String time; | 1614 core.String time; |
1430 | 1615 |
1431 LogLine(); | 1616 LogLine(); |
1432 | 1617 |
1433 LogLine.fromJson(core.Map _json) { | 1618 LogLine.fromJson(core.Map _json) { |
(...skipping 23 matching lines...) Expand all Loading... |
1457 _json["sourceLocation"] = (sourceLocation).toJson(); | 1642 _json["sourceLocation"] = (sourceLocation).toJson(); |
1458 } | 1643 } |
1459 if (time != null) { | 1644 if (time != null) { |
1460 _json["time"] = time; | 1645 _json["time"] = time; |
1461 } | 1646 } |
1462 return _json; | 1647 return _json; |
1463 } | 1648 } |
1464 } | 1649 } |
1465 | 1650 |
1466 /** | 1651 /** |
1467 * Describes a logs-based metric. The value of the metric is the number of log | 1652 * Describes a logs-based metric. The value of the metric is the |
1468 * entries that match a logs filter. | 1653 * number of log entries that match a logs filter. |
1469 */ | 1654 */ |
1470 class LogMetric { | 1655 class LogMetric { |
1471 /** A description of this metric, which is used in documentation. */ | 1656 /** |
| 1657 * Optional. A description of this metric, which is used in documentation. |
| 1658 */ |
1472 core.String description; | 1659 core.String description; |
1473 /** | 1660 /** |
1474 * An [advanced logs filter](/logging/docs/view/advanced_filters). Example: | 1661 * Required. An [advanced logs filter](/logging/docs/view/advanced_filters). |
1475 * `"logName:syslog AND severity>=ERROR"`. | 1662 * Example: `"resource.type=gae_app AND severity>=ERROR"`. |
1476 */ | 1663 */ |
1477 core.String filter; | 1664 core.String filter; |
1478 /** | 1665 /** |
1479 * Required. The client-assigned metric identifier. Example: | 1666 * Required. The client-assigned metric identifier. Example: |
1480 * `"severe_errors"`. Metric identifiers are limited to 1000 characters and | 1667 * `"severe_errors"`. Metric identifiers are limited to 100 |
1481 * can include only the following characters: `A-Z`, `a-z`, `0-9`, and the | 1668 * characters and can include only the following characters: `A-Z`, |
1482 * special characters `_-.,+!*',()%/\`. The forward-slash character (`/`) | 1669 * `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The |
1483 * denotes a hierarchy of name pieces, and it cannot be the first character of | 1670 * forward-slash character (`/`) denotes a hierarchy of name pieces, |
1484 * the name. | 1671 * and it cannot be the first character of the name. The '%' character |
| 1672 * is used to URL encode unsafe and reserved characters and must be |
| 1673 * followed by two hexadecimal digits according to RFC 1738. |
1485 */ | 1674 */ |
1486 core.String name; | 1675 core.String name; |
| 1676 /** |
| 1677 * Output only. The API version that created or updated this metric. |
| 1678 * The version also dictates the syntax of the filter expression. When a value |
| 1679 * for this field is missing, the default value of V2 should be assumed. |
| 1680 * Possible string values are: |
| 1681 * - "V2" : Stackdriver Logging API v2. |
| 1682 * - "V1" : Stackdriver Logging API v1. |
| 1683 */ |
| 1684 core.String version; |
1487 | 1685 |
1488 LogMetric(); | 1686 LogMetric(); |
1489 | 1687 |
1490 LogMetric.fromJson(core.Map _json) { | 1688 LogMetric.fromJson(core.Map _json) { |
1491 if (_json.containsKey("description")) { | 1689 if (_json.containsKey("description")) { |
1492 description = _json["description"]; | 1690 description = _json["description"]; |
1493 } | 1691 } |
1494 if (_json.containsKey("filter")) { | 1692 if (_json.containsKey("filter")) { |
1495 filter = _json["filter"]; | 1693 filter = _json["filter"]; |
1496 } | 1694 } |
1497 if (_json.containsKey("name")) { | 1695 if (_json.containsKey("name")) { |
1498 name = _json["name"]; | 1696 name = _json["name"]; |
1499 } | 1697 } |
| 1698 if (_json.containsKey("version")) { |
| 1699 version = _json["version"]; |
| 1700 } |
1500 } | 1701 } |
1501 | 1702 |
1502 core.Map toJson() { | 1703 core.Map toJson() { |
1503 var _json = new core.Map(); | 1704 var _json = new core.Map(); |
1504 if (description != null) { | 1705 if (description != null) { |
1505 _json["description"] = description; | 1706 _json["description"] = description; |
1506 } | 1707 } |
1507 if (filter != null) { | 1708 if (filter != null) { |
1508 _json["filter"] = filter; | 1709 _json["filter"] = filter; |
1509 } | 1710 } |
1510 if (name != null) { | 1711 if (name != null) { |
1511 _json["name"] = name; | 1712 _json["name"] = name; |
1512 } | 1713 } |
| 1714 if (version != null) { |
| 1715 _json["version"] = version; |
| 1716 } |
1513 return _json; | 1717 return _json; |
1514 } | 1718 } |
1515 } | 1719 } |
1516 | 1720 |
1517 /** Describes a sink used to export log entries outside Cloud Logging. */ | 1721 /** |
| 1722 * Describes a sink used to export log entries outside of Stackdriver Logging. |
| 1723 * A logs filter controls which log entries are exported. Sinks can have a |
| 1724 * start time and an end time; these can be used to place log entries from an |
| 1725 * exact time range into a particular destination. If both `start_time` and |
| 1726 * `end_time` are present, then `start_time` must be less than `end_time`. |
| 1727 */ |
1518 class LogSink { | 1728 class LogSink { |
1519 /** | 1729 /** |
1520 * The export destination. See [Exporting Logs With | 1730 * Required. The export destination. See |
1521 * Sinks](/logging/docs/api/tasks/exporting-logs). Examples: | 1731 * [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). |
1522 * `"storage.googleapis.com/a-bucket"`, | 1732 * Examples: |
1523 * `"bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"`. | 1733 * |
| 1734 * "storage.googleapis.com/my-gcs-bucket" |
| 1735 * "bigquery.googleapis.com/projects/my-project-id/datasets/my-dataset" |
| 1736 * "pubsub.googleapis.com/projects/my-project/topics/my-topic" |
1524 */ | 1737 */ |
1525 core.String destination; | 1738 core.String destination; |
1526 /** | 1739 /** |
1527 * An [advanced logs filter](/logging/docs/view/advanced_filters). Only log | 1740 * Optional. Time at which this sink will stop exporting log entries. If this |
1528 * entries matching that filter are exported. The filter must be consistent | 1741 * value is present, then log entries are exported only if `entry.timestamp` < |
1529 * with the log entry format specified by the `outputVersionFormat` parameter, | 1742 * `end_time`. |
1530 * regardless of the format of the log entry that was originally written to | 1743 */ |
1531 * Cloud Logging. Example (V2 format): | 1744 core.String endTime; |
1532 * `"logName=projects/my-projectid/logs/syslog AND severity>=ERROR"`. | 1745 /** |
| 1746 * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). |
| 1747 * Only log entries matching the filter are exported. The filter |
| 1748 * must be consistent with the log entry format specified by the |
| 1749 * `outputVersionFormat` parameter, regardless of the format of the |
| 1750 * log entry that was originally written to Stackdriver Logging. |
| 1751 * Example filter (V2 format): |
| 1752 * |
| 1753 * logName=projects/my-projectid/logs/syslog AND severity>=ERROR |
1533 */ | 1754 */ |
1534 core.String filter; | 1755 core.String filter; |
1535 /** | 1756 /** |
1536 * Required. The client-assigned sink identifier. Example: | 1757 * Required. The client-assigned sink identifier, unique within the |
1537 * `"my-severe-errors-to-pubsub"`. Sink identifiers are limited to 1000 | 1758 * project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are |
1538 * characters and can include only the following characters: `A-Z`, `a-z`, | 1759 * limited to 1000 characters and can include only the following characters: |
1539 * `0-9`, and the special characters `_-.`. | 1760 * `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum length |
| 1761 * of the name is 100 characters. |
1540 */ | 1762 */ |
1541 core.String name; | 1763 core.String name; |
1542 /** | 1764 /** |
1543 * The log entry version to use for this sink's exported log entries. This | 1765 * Optional. The log entry version to use for this sink's exported log |
1544 * version does not have to correspond to the version of the log entry when it | 1766 * entries. This version does not have to correspond to the version of the |
1545 * was written to Cloud Logging. | 1767 * log entry that was written to Stackdriver Logging. If omitted, the |
| 1768 * v2 format is used. |
1546 * Possible string values are: | 1769 * Possible string values are: |
1547 * - "VERSION_FORMAT_UNSPECIFIED" : A VERSION_FORMAT_UNSPECIFIED. | 1770 * - "VERSION_FORMAT_UNSPECIFIED" : An unspecified version format will default |
1548 * - "V2" : A V2. | 1771 * to V2. |
1549 * - "V1" : A V1. | 1772 * - "V2" : `LogEntry` version 2 format. |
| 1773 * - "V1" : `LogEntry` version 1 format. |
1550 */ | 1774 */ |
1551 core.String outputVersionFormat; | 1775 core.String outputVersionFormat; |
| 1776 /** |
| 1777 * Optional. The time at which this sink will begin exporting log entries. If |
| 1778 * this value is present, then log entries are exported only if `start_time` |
| 1779 * <=`entry.timestamp`. |
| 1780 */ |
| 1781 core.String startTime; |
| 1782 /** |
| 1783 * Output only. An IAM identity—a service account or group—that |
| 1784 * will write exported log entries to the destination on behalf of Stackdriver |
| 1785 * Logging. You must grant this identity write-access to the destination. |
| 1786 * Consult the destination service's documentation to determine the exact role |
| 1787 * that must be granted. |
| 1788 */ |
| 1789 core.String writerIdentity; |
1552 | 1790 |
1553 LogSink(); | 1791 LogSink(); |
1554 | 1792 |
1555 LogSink.fromJson(core.Map _json) { | 1793 LogSink.fromJson(core.Map _json) { |
1556 if (_json.containsKey("destination")) { | 1794 if (_json.containsKey("destination")) { |
1557 destination = _json["destination"]; | 1795 destination = _json["destination"]; |
1558 } | 1796 } |
| 1797 if (_json.containsKey("endTime")) { |
| 1798 endTime = _json["endTime"]; |
| 1799 } |
1559 if (_json.containsKey("filter")) { | 1800 if (_json.containsKey("filter")) { |
1560 filter = _json["filter"]; | 1801 filter = _json["filter"]; |
1561 } | 1802 } |
1562 if (_json.containsKey("name")) { | 1803 if (_json.containsKey("name")) { |
1563 name = _json["name"]; | 1804 name = _json["name"]; |
1564 } | 1805 } |
1565 if (_json.containsKey("outputVersionFormat")) { | 1806 if (_json.containsKey("outputVersionFormat")) { |
1566 outputVersionFormat = _json["outputVersionFormat"]; | 1807 outputVersionFormat = _json["outputVersionFormat"]; |
1567 } | 1808 } |
| 1809 if (_json.containsKey("startTime")) { |
| 1810 startTime = _json["startTime"]; |
| 1811 } |
| 1812 if (_json.containsKey("writerIdentity")) { |
| 1813 writerIdentity = _json["writerIdentity"]; |
| 1814 } |
1568 } | 1815 } |
1569 | 1816 |
1570 core.Map toJson() { | 1817 core.Map toJson() { |
1571 var _json = new core.Map(); | 1818 var _json = new core.Map(); |
1572 if (destination != null) { | 1819 if (destination != null) { |
1573 _json["destination"] = destination; | 1820 _json["destination"] = destination; |
1574 } | 1821 } |
| 1822 if (endTime != null) { |
| 1823 _json["endTime"] = endTime; |
| 1824 } |
1575 if (filter != null) { | 1825 if (filter != null) { |
1576 _json["filter"] = filter; | 1826 _json["filter"] = filter; |
1577 } | 1827 } |
1578 if (name != null) { | 1828 if (name != null) { |
1579 _json["name"] = name; | 1829 _json["name"] = name; |
1580 } | 1830 } |
1581 if (outputVersionFormat != null) { | 1831 if (outputVersionFormat != null) { |
1582 _json["outputVersionFormat"] = outputVersionFormat; | 1832 _json["outputVersionFormat"] = outputVersionFormat; |
1583 } | 1833 } |
| 1834 if (startTime != null) { |
| 1835 _json["startTime"] = startTime; |
| 1836 } |
| 1837 if (writerIdentity != null) { |
| 1838 _json["writerIdentity"] = writerIdentity; |
| 1839 } |
1584 return _json; | 1840 return _json; |
1585 } | 1841 } |
1586 } | 1842 } |
1587 | 1843 |
1588 /** | 1844 /** |
1589 * An object representing a resource that can be used for monitoring, logging, | 1845 * An object representing a resource that can be used for monitoring, logging, |
1590 * billing, or other purposes. Examples include virtual machine instances, | 1846 * billing, or other purposes. Examples include virtual machine instances, |
1591 * databases, and storage devices such as disks. The `type` field identifies a | 1847 * databases, and storage devices such as disks. The `type` field identifies a |
1592 * MonitoredResourceDescriptor object that describes the resource's schema. | 1848 * MonitoredResourceDescriptor object that describes the resource's |
1593 * Information in the `labels` field identifies the actual resource and its | 1849 * schema. Information in the `labels` field identifies the actual resource and |
1594 * attributes according to the schema. For example, a particular Compute Engine | 1850 * its attributes according to the schema. For example, a particular Compute |
1595 * VM instance could be represented by the following object, because the | 1851 * Engine VM instance could be represented by the following object, because the |
1596 * MonitoredResourceDescriptor for `"gce_instance"` has labels `"instance_id"` | 1852 * MonitoredResourceDescriptor for `"gce_instance"` has labels |
1597 * and `"zone"`: { "type": "gce_instance", "labels": { "instance_id": | 1853 * `"instance_id"` and `"zone"`: |
1598 * "my-instance", "zone": "us-central1-a" }} | 1854 * |
| 1855 * { "type": "gce_instance", |
| 1856 * "labels": { "instance_id": "12345678901234", |
| 1857 * "zone": "us-central1-a" }} |
1599 */ | 1858 */ |
1600 class MonitoredResource { | 1859 class MonitoredResource { |
1601 /** | 1860 /** |
1602 * Required. Values for all of the labels listed in the associated monitored | 1861 * Required. Values for all of the labels listed in the associated monitored |
1603 * resource descriptor. For example, Cloud SQL databases use the labels | 1862 * resource descriptor. For example, Cloud SQL databases use the labels |
1604 * `"database_id"` and `"zone"`. | 1863 * `"database_id"` and `"zone"`. |
1605 */ | 1864 */ |
1606 core.Map<core.String, core.String> labels; | 1865 core.Map<core.String, core.String> labels; |
1607 /** | 1866 /** |
1608 * Required. The monitored resource type. This field must match the `type` | 1867 * Required. The monitored resource type. This field must match |
1609 * field of a MonitoredResourceDescriptor object. For example, the type of a | 1868 * the `type` field of a MonitoredResourceDescriptor object. For |
1610 * Cloud SQL database is `"cloudsql_database"`. | 1869 * example, the type of a Cloud SQL database is `"cloudsql_database"`. |
1611 */ | 1870 */ |
1612 core.String type; | 1871 core.String type; |
1613 | 1872 |
1614 MonitoredResource(); | 1873 MonitoredResource(); |
1615 | 1874 |
1616 MonitoredResource.fromJson(core.Map _json) { | 1875 MonitoredResource.fromJson(core.Map _json) { |
1617 if (_json.containsKey("labels")) { | 1876 if (_json.containsKey("labels")) { |
1618 labels = _json["labels"]; | 1877 labels = _json["labels"]; |
1619 } | 1878 } |
1620 if (_json.containsKey("type")) { | 1879 if (_json.containsKey("type")) { |
1621 type = _json["type"]; | 1880 type = _json["type"]; |
1622 } | 1881 } |
1623 } | 1882 } |
1624 | 1883 |
1625 core.Map toJson() { | 1884 core.Map toJson() { |
1626 var _json = new core.Map(); | 1885 var _json = new core.Map(); |
1627 if (labels != null) { | 1886 if (labels != null) { |
1628 _json["labels"] = labels; | 1887 _json["labels"] = labels; |
1629 } | 1888 } |
1630 if (type != null) { | 1889 if (type != null) { |
1631 _json["type"] = type; | 1890 _json["type"] = type; |
1632 } | 1891 } |
1633 return _json; | 1892 return _json; |
1634 } | 1893 } |
1635 } | 1894 } |
1636 | 1895 |
1637 /** | 1896 /** |
1638 * An object that describes the schema of a MonitoredResource object using a | 1897 * An object that describes the schema of a MonitoredResource object using a |
1639 * type name and a set of labels. For example, the monitored resource descriptor | 1898 * type name and a set of labels. For example, the monitored resource |
1640 * for Google Compute Engine VM instances has a type of `"gce_instance"` and | 1899 * descriptor for Google Compute Engine VM instances has a type of |
1641 * specifies the use of the labels `"instance_id"` and `"zone"` to identify | 1900 * `"gce_instance"` and specifies the use of the labels `"instance_id"` and |
1642 * particular VM instances. Different APIs can support different monitored | 1901 * `"zone"` to identify particular VM instances. |
1643 * resource types. APIs generally provide a `list` method that returns the | 1902 * |
1644 * monitored resource descriptors used by the API. | 1903 * Different APIs can support different monitored resource types. APIs generally |
| 1904 * provide a `list` method that returns the monitored resource descriptors used |
| 1905 * by the API. |
1645 */ | 1906 */ |
1646 class MonitoredResourceDescriptor { | 1907 class MonitoredResourceDescriptor { |
1647 /** | 1908 /** |
1648 * Optional. A detailed description of the monitored resource type that might | 1909 * Optional. A detailed description of the monitored resource type that might |
1649 * be used in documentation. | 1910 * be used in documentation. |
1650 */ | 1911 */ |
1651 core.String description; | 1912 core.String description; |
1652 /** | 1913 /** |
1653 * Optional. A concise name for the monitored resource type that might be | 1914 * Optional. A concise name for the monitored resource type that might be |
1654 * displayed in user interfaces. For example, `"Google Cloud SQL Database"`. | 1915 * displayed in user interfaces. It should be a Title Cased Noun Phrase, |
| 1916 * without any article or other determiners. For example, |
| 1917 * `"Google Cloud SQL Database"`. |
1655 */ | 1918 */ |
1656 core.String displayName; | 1919 core.String displayName; |
1657 /** | 1920 /** |
1658 * Required. A set of labels used to describe instances of this monitored | 1921 * Required. A set of labels used to describe instances of this monitored |
1659 * resource type. For example, an individual Google Cloud SQL database is | 1922 * resource type. For example, an individual Google Cloud SQL database is |
1660 * identified by values for the labels `"database_id"` and `"zone"`. | 1923 * identified by values for the labels `"database_id"` and `"zone"`. |
1661 */ | 1924 */ |
1662 core.List<LabelDescriptor> labels; | 1925 core.List<LabelDescriptor> labels; |
1663 /** | 1926 /** |
1664 * Optional. The resource name of the monitored resource descriptor: | 1927 * Optional. The resource name of the monitored resource descriptor: |
1665 * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where {type} | 1928 * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where |
1666 * is the value of the `type` field in this object and {project_id} is a | 1929 * {type} is the value of the `type` field in this object and |
1667 * project ID that provides API-specific context for accessing the type. APIs | 1930 * {project_id} is a project ID that provides API-specific context for |
1668 * that do not use project information can use the resource name format | 1931 * accessing the type. APIs that do not use project information can use the |
1669 * `"monitoredResourceDescriptors/{type}"`. | 1932 * resource name format `"monitoredResourceDescriptors/{type}"`. |
1670 */ | 1933 */ |
1671 core.String name; | 1934 core.String name; |
1672 /** | 1935 /** |
1673 * Required. The monitored resource type. For example, the type | 1936 * Required. The monitored resource type. For example, the type |
1674 * `"cloudsql_database"` represents databases in Google Cloud SQL. | 1937 * `"cloudsql_database"` represents databases in Google Cloud SQL. |
| 1938 * The maximum length of this value is 256 characters. |
1675 */ | 1939 */ |
1676 core.String type; | 1940 core.String type; |
1677 | 1941 |
1678 MonitoredResourceDescriptor(); | 1942 MonitoredResourceDescriptor(); |
1679 | 1943 |
1680 MonitoredResourceDescriptor.fromJson(core.Map _json) { | 1944 MonitoredResourceDescriptor.fromJson(core.Map _json) { |
1681 if (_json.containsKey("description")) { | 1945 if (_json.containsKey("description")) { |
1682 description = _json["description"]; | 1946 description = _json["description"]; |
1683 } | 1947 } |
1684 if (_json.containsKey("displayName")) { | 1948 if (_json.containsKey("displayName")) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 core.String appEngineRelease; | 1989 core.String appEngineRelease; |
1726 /** Application that handled this request. */ | 1990 /** Application that handled this request. */ |
1727 core.String appId; | 1991 core.String appId; |
1728 /** An indication of the relative cost of serving this request. */ | 1992 /** An indication of the relative cost of serving this request. */ |
1729 core.double cost; | 1993 core.double cost; |
1730 /** Time when the request finished. */ | 1994 /** Time when the request finished. */ |
1731 core.String endTime; | 1995 core.String endTime; |
1732 /** Whether this request is finished or active. */ | 1996 /** Whether this request is finished or active. */ |
1733 core.bool finished; | 1997 core.bool finished; |
1734 /** | 1998 /** |
1735 * Whether this is the first RequestLog entry for this request. If an active | 1999 * Whether this is the first RequestLog entry for this request. If an active |
1736 * request has several RequestLog entries written to Cloud Logging, this field | 2000 * request has several RequestLog entries written to Cloud Logging, this field |
1737 * will be set for one of them. | 2001 * will be set for one of them. |
1738 */ | 2002 */ |
1739 core.bool first; | 2003 core.bool first; |
1740 /** Internet host and port number of the resource being requested. */ | 2004 /** Internet host and port number of the resource being requested. */ |
1741 core.String host; | 2005 core.String host; |
1742 /** HTTP version of request. Example: `"HTTP/1.1"`. */ | 2006 /** HTTP version of request. Example: `"HTTP/1.1"`. */ |
1743 core.String httpVersion; | 2007 core.String httpVersion; |
1744 /** An identifier for the instance that handled the request. */ | 2008 /** An identifier for the instance that handled the request. */ |
1745 core.String instanceId; | 2009 core.String instanceId; |
(...skipping 13 matching lines...) Expand all Loading... |
1759 core.List<LogLine> line; | 2023 core.List<LogLine> line; |
1760 /** Number of CPU megacycles used to process request. */ | 2024 /** Number of CPU megacycles used to process request. */ |
1761 core.String megaCycles; | 2025 core.String megaCycles; |
1762 /** | 2026 /** |
1763 * Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`. | 2027 * Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`. |
1764 */ | 2028 */ |
1765 core.String method; | 2029 core.String method; |
1766 /** Module of the application that handled this request. */ | 2030 /** Module of the application that handled this request. */ |
1767 core.String moduleId; | 2031 core.String moduleId; |
1768 /** | 2032 /** |
1769 * The logged-in user who made the request. Most likely, this is the part of | 2033 * The logged-in user who made the request. |
1770 * the user's email before the `@` sign. The field value is the same for | 2034 * |
1771 * different requests from the same user, but different users can have similar | 2035 * Most likely, this is the part of the user's email before the `@` sign. The |
1772 * names. This information is also available to the application via the App | 2036 * field value is the same for different requests from the same user, but |
1773 * Engine Users API. This field will be populated starting with App Engine | 2037 * different users can have similar names. This information is also |
1774 * 1.9.21. | 2038 * available to the application via the App Engine Users API. |
| 2039 * |
| 2040 * This field will be populated starting with App Engine 1.9.21. |
1775 */ | 2041 */ |
1776 core.String nickname; | 2042 core.String nickname; |
1777 /** Time this request spent in the pending request queue. */ | 2043 /** Time this request spent in the pending request queue. */ |
1778 core.String pendingTime; | 2044 core.String pendingTime; |
1779 /** Referrer URL of request. */ | 2045 /** Referrer URL of request. */ |
1780 core.String referrer; | 2046 core.String referrer; |
1781 /** | 2047 /** |
1782 * Globally unique identifier for a request, which is based on the request | 2048 * Globally unique identifier for a request, which is based on the request |
1783 * start time. Request IDs for requests which started later will compare | 2049 * start time. Request IDs for requests which started later will compare |
1784 * greater as strings than those for requests which started earlier. | 2050 * greater as strings than those for requests which started earlier. |
1785 */ | 2051 */ |
1786 core.String requestId; | 2052 core.String requestId; |
1787 /** | 2053 /** |
1788 * Contains the path and query portion of the URL that was requested. For | 2054 * Contains the path and query portion of the URL that was requested. For |
1789 * example, if the URL was "http://example.com/app?name=val", the resource | 2055 * example, if the URL was "http://example.com/app?name=val", the resource |
1790 * would be "/app?name=val". The fragment identifier, which is identified by | 2056 * would be "/app?name=val". The fragment identifier, which is identified by |
1791 * the `#` character, is not included. | 2057 * the `#` character, is not included. |
1792 */ | 2058 */ |
1793 core.String resource; | 2059 core.String resource; |
1794 /** Size in bytes sent back to client by request. */ | 2060 /** Size in bytes sent back to client by request. */ |
1795 core.String responseSize; | 2061 core.String responseSize; |
1796 /** | 2062 /** |
1797 * Source code for the application that handled this request. There can be | 2063 * Source code for the application that handled this request. There can be |
1798 * more than one source reference per deployed application if source code is | 2064 * more than one source reference per deployed application if source code is |
1799 * distributed among multiple repositories. | 2065 * distributed among multiple repositories. |
1800 */ | 2066 */ |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2068 return _json; | 2334 return _json; |
2069 } | 2335 } |
2070 } | 2336 } |
2071 | 2337 |
2072 /** | 2338 /** |
2073 * A reference to a particular snapshot of the source tree used to build and | 2339 * A reference to a particular snapshot of the source tree used to build and |
2074 * deploy an application. | 2340 * deploy an application. |
2075 */ | 2341 */ |
2076 class SourceReference { | 2342 class SourceReference { |
2077 /** | 2343 /** |
2078 * Optional. A URI string identifying the repository. Example: | 2344 * Optional. A URI string identifying the repository. |
2079 * "https://github.com/GoogleCloudPlatform/kubernetes.git" | 2345 * Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" |
2080 */ | 2346 */ |
2081 core.String repository; | 2347 core.String repository; |
2082 /** | 2348 /** |
2083 * The canonical and persistent identifier of the deployed revision. Example | 2349 * The canonical and persistent identifier of the deployed revision. |
2084 * (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" | 2350 * Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" |
2085 */ | 2351 */ |
2086 core.String revisionId; | 2352 core.String revisionId; |
2087 | 2353 |
2088 SourceReference(); | 2354 SourceReference(); |
2089 | 2355 |
2090 SourceReference.fromJson(core.Map _json) { | 2356 SourceReference.fromJson(core.Map _json) { |
2091 if (_json.containsKey("repository")) { | 2357 if (_json.containsKey("repository")) { |
2092 repository = _json["repository"]; | 2358 repository = _json["repository"]; |
2093 } | 2359 } |
2094 if (_json.containsKey("revisionId")) { | 2360 if (_json.containsKey("revisionId")) { |
2095 revisionId = _json["revisionId"]; | 2361 revisionId = _json["revisionId"]; |
2096 } | 2362 } |
2097 } | 2363 } |
2098 | 2364 |
2099 core.Map toJson() { | 2365 core.Map toJson() { |
2100 var _json = new core.Map(); | 2366 var _json = new core.Map(); |
2101 if (repository != null) { | 2367 if (repository != null) { |
2102 _json["repository"] = repository; | 2368 _json["repository"] = repository; |
2103 } | 2369 } |
2104 if (revisionId != null) { | 2370 if (revisionId != null) { |
2105 _json["revisionId"] = revisionId; | 2371 _json["revisionId"] = revisionId; |
2106 } | 2372 } |
2107 return _json; | 2373 return _json; |
2108 } | 2374 } |
2109 } | 2375 } |
2110 | 2376 |
2111 /** | |
2112 * The `Status` type defines a logical error model that is suitable for | |
2113 * different programming environments, including REST APIs and RPC APIs. It is | |
2114 * used by [gRPC](https://github.com/grpc). The error model is designed to be: - | |
2115 * Simple to use and understand for most users - Flexible enough to meet | |
2116 * unexpected needs # Overview The `Status` message contains three pieces of | |
2117 * data: error code, error message, and error details. The error code should be | |
2118 * an enum value of google.rpc.Code, but it may accept additional error codes if | |
2119 * needed. The error message should be a developer-facing English message that | |
2120 * helps developers *understand* and *resolve* the error. If a localized | |
2121 * user-facing error message is needed, put the localized message in the error | |
2122 * details or localize it in the client. The optional error details may contain | |
2123 * arbitrary information about the error. There is a predefined set of error | |
2124 * detail types in the package `google.rpc` which can be used for common error | |
2125 * conditions. # Language mapping The `Status` message is the logical | |
2126 * representation of the error model, but it is not necessarily the actual wire | |
2127 * format. When the `Status` message is exposed in different client libraries | |
2128 * and different wire protocols, it can be mapped differently. For example, it | |
2129 * will likely be mapped to some exceptions in Java, but more likely mapped to | |
2130 * some error codes in C. # Other uses The error model and the `Status` message | |
2131 * can be used in a variety of environments, either with or without APIs, to | |
2132 * provide a consistent developer experience across different environments. | |
2133 * Example uses of this error model include: - Partial errors. If a service | |
2134 * needs to return partial errors to the client, it may embed the `Status` in | |
2135 * the normal response to indicate the partial errors. - Workflow errors. A | |
2136 * typical workflow has multiple steps. Each step may have a `Status` message | |
2137 * for error reporting purpose. - Batch operations. If a client uses batch | |
2138 * request and batch response, the `Status` message should be used directly | |
2139 * inside batch response, one for each error sub-response. - Asynchronous | |
2140 * operations. If an API call embeds asynchronous operation results in its | |
2141 * response, the status of those operations should be represented directly using | |
2142 * the `Status` message. - Logging. If some API errors are stored in logs, the | |
2143 * message `Status` could be used directly after any stripping needed for | |
2144 * security/privacy reasons. | |
2145 */ | |
2146 class Status { | |
2147 /** The status code, which should be an enum value of google.rpc.Code. */ | |
2148 core.int code; | |
2149 /** | |
2150 * A list of messages that carry the error details. There will be a common set | |
2151 * of message types for APIs to use. | |
2152 * | |
2153 * The values for Object must be JSON objects. It can consist of `num`, | |
2154 * `String`, `bool` and `null` as well as `Map` and `List` values. | |
2155 */ | |
2156 core.List<core.Map<core.String, core.Object>> details; | |
2157 /** | |
2158 * A developer-facing error message, which should be in English. Any | |
2159 * user-facing error message should be localized and sent in the | |
2160 * google.rpc.Status.details field, or localized by the client. | |
2161 */ | |
2162 core.String message; | |
2163 | |
2164 Status(); | |
2165 | |
2166 Status.fromJson(core.Map _json) { | |
2167 if (_json.containsKey("code")) { | |
2168 code = _json["code"]; | |
2169 } | |
2170 if (_json.containsKey("details")) { | |
2171 details = _json["details"]; | |
2172 } | |
2173 if (_json.containsKey("message")) { | |
2174 message = _json["message"]; | |
2175 } | |
2176 } | |
2177 | |
2178 core.Map toJson() { | |
2179 var _json = new core.Map(); | |
2180 if (code != null) { | |
2181 _json["code"] = code; | |
2182 } | |
2183 if (details != null) { | |
2184 _json["details"] = details; | |
2185 } | |
2186 if (message != null) { | |
2187 _json["message"] = message; | |
2188 } | |
2189 return _json; | |
2190 } | |
2191 } | |
2192 | |
2193 /** The parameters to WriteLogEntries. */ | 2377 /** The parameters to WriteLogEntries. */ |
2194 class WriteLogEntriesRequest { | 2378 class WriteLogEntriesRequest { |
2195 /** | 2379 /** |
2196 * Required. The log entries to write. The log entries must have values for | 2380 * Required. The log entries to write. Values supplied for the fields |
2197 * all required fields. | 2381 * `log_name`, `resource`, and `labels` in this `entries.write` request are |
| 2382 * added to those log entries that do not provide their own values for the |
| 2383 * fields. |
| 2384 * |
| 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. |
2198 */ | 2389 */ |
2199 core.List<LogEntry> entries; | 2390 core.List<LogEntry> entries; |
2200 /** | 2391 /** |
2201 * Optional. User-defined `key:value` items that are added to the `labels` | 2392 * Optional. Default labels that are added to the `labels` field of all log |
2202 * field of each log entry in `entries`, except when a log entry specifies its | 2393 * entries in `entries`. If a log entry already has a label with the same key |
2203 * own `key:value` item with the same key. Example: `{ "size": "large", | 2394 * as a label in this parameter, then the log entry's label is not changed. |
2204 * "color":"red" }` | 2395 * See LogEntry. |
2205 */ | 2396 */ |
2206 core.Map<core.String, core.String> labels; | 2397 core.Map<core.String, core.String> labels; |
2207 /** | 2398 /** |
2208 * Optional. A default log resource name for those log entries in `entries` | 2399 * Optional. A default log resource name that is assigned to all log entries |
2209 * that do not specify their own `logName`. Example: | 2400 * in `entries` that do not specify a value for `log_name`. Example: |
2210 * `"projects/my-project/logs/syslog"`. See LogEntry. | 2401 * `"projects/my-project/logs/syslog"`. See |
| 2402 * LogEntry. |
2211 */ | 2403 */ |
2212 core.String logName; | 2404 core.String logName; |
2213 /** | 2405 /** |
2214 * Optional. Whether valid entries should be written even if some other | 2406 * Optional. Whether valid entries should be written even if some other |
2215 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any | 2407 * entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any |
2216 * entry is not written, the response status will be the error associated with | 2408 * entry is not written, the response status will be the error associated |
2217 * one of the failed entries and include error details in the form of | 2409 * with one of the failed entries and include error details in the form of |
2218 * WriteLogEntriesPartialErrors. | 2410 * WriteLogEntriesPartialErrors. |
2219 */ | 2411 */ |
2220 core.bool partialSuccess; | 2412 core.bool partialSuccess; |
2221 /** | 2413 /** |
2222 * Optional. A default monitored resource for those log entries in `entries` | 2414 * Optional. A default monitored resource object that is assigned to all log |
2223 * that do not specify their own `resource`. | 2415 * entries in `entries` that do not specify a value for `resource`. Example: |
| 2416 * |
| 2417 * { "type": "gce_instance", |
| 2418 * "labels": { |
| 2419 * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} |
| 2420 * |
| 2421 * See LogEntry. |
2224 */ | 2422 */ |
2225 MonitoredResource resource; | 2423 MonitoredResource resource; |
2226 | 2424 |
2227 WriteLogEntriesRequest(); | 2425 WriteLogEntriesRequest(); |
2228 | 2426 |
2229 WriteLogEntriesRequest.fromJson(core.Map _json) { | 2427 WriteLogEntriesRequest.fromJson(core.Map _json) { |
2230 if (_json.containsKey("entries")) { | 2428 if (_json.containsKey("entries")) { |
2231 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to
List(); | 2429 entries = _json["entries"].map((value) => new LogEntry.fromJson(value)).to
List(); |
2232 } | 2430 } |
2233 if (_json.containsKey("labels")) { | 2431 if (_json.containsKey("labels")) { |
(...skipping 24 matching lines...) Expand all Loading... |
2258 if (partialSuccess != null) { | 2456 if (partialSuccess != null) { |
2259 _json["partialSuccess"] = partialSuccess; | 2457 _json["partialSuccess"] = partialSuccess; |
2260 } | 2458 } |
2261 if (resource != null) { | 2459 if (resource != null) { |
2262 _json["resource"] = (resource).toJson(); | 2460 _json["resource"] = (resource).toJson(); |
2263 } | 2461 } |
2264 return _json; | 2462 return _json; |
2265 } | 2463 } |
2266 } | 2464 } |
2267 | 2465 |
2268 /** Result returned from WriteLogEntries. empty */ | 2466 /** |
| 2467 * Result returned from WriteLogEntries. |
| 2468 * empty |
| 2469 */ |
2269 class WriteLogEntriesResponse { | 2470 class WriteLogEntriesResponse { |
2270 | 2471 |
2271 WriteLogEntriesResponse(); | 2472 WriteLogEntriesResponse(); |
2272 | 2473 |
2273 WriteLogEntriesResponse.fromJson(core.Map _json) { | 2474 WriteLogEntriesResponse.fromJson(core.Map _json) { |
2274 } | 2475 } |
2275 | 2476 |
2276 core.Map toJson() { | 2477 core.Map toJson() { |
2277 var _json = new core.Map(); | 2478 var _json = new core.Map(); |
2278 return _json; | 2479 return _json; |
2279 } | 2480 } |
2280 } | 2481 } |
OLD | NEW |