| 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.cloudtrace.v1; | 3 library googleapis.cloudtrace.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return _response.then((data) => new Trace.fromJson(data)); | 149 return _response.then((data) => new Trace.fromJson(data)); |
| 150 } | 150 } |
| 151 | 151 |
| 152 /** | 152 /** |
| 153 * Returns of a list of traces that match the specified filter conditions. | 153 * Returns of a list of traces that match the specified filter conditions. |
| 154 * | 154 * |
| 155 * Request parameters: | 155 * Request parameters: |
| 156 * | 156 * |
| 157 * [projectId] - ID of the Cloud project where the trace data is stored. | 157 * [projectId] - ID of the Cloud project where the trace data is stored. |
| 158 * | 158 * |
| 159 * [orderBy] - Field used to sort the returned traces. Optional. | |
| 160 * Can be one of the following: | |
| 161 * | |
| 162 * * `trace_id` | |
| 163 * * `name` (`name` field of root span in the trace) | |
| 164 * * `duration` (difference between `end_time` and `start_time` fields of | |
| 165 * the root span) | |
| 166 * * `start` (`start_time` field of the root span) | |
| 167 * | |
| 168 * Descending order can be specified by appending `desc` to the sort field | |
| 169 * (for example, `name desc`). | |
| 170 * | |
| 171 * Only one sort field is permitted. | |
| 172 * | |
| 173 * [filter] - An optional filter against labels for the request. | 159 * [filter] - An optional filter against labels for the request. |
| 174 * | 160 * |
| 175 * By default, searches use prefix matching. To specify exact match, prepend | 161 * By default, searches use prefix matching. To specify exact match, prepend |
| 176 * a plus symbol (`+`) to the search term. | 162 * a plus symbol (`+`) to the search term. |
| 177 * Multiple terms are ANDed. Syntax: | 163 * Multiple terms are ANDed. Syntax: |
| 178 * | 164 * |
| 179 * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root | 165 * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root |
| 180 * span starts with `NAME_PREFIX`. | 166 * span starts with `NAME_PREFIX`. |
| 181 * * `+root:NAME` or `+NAME`: Return traces where any root span's name is | 167 * * `+root:NAME` or `+NAME`: Return traces where any root span's name is |
| 182 * exactly `NAME`. | 168 * exactly `NAME`. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 * return fewer traces than the requested page size. Optional. | 205 * return fewer traces than the requested page size. Optional. |
| 220 * | 206 * |
| 221 * [view] - Type of data returned for traces in the list. Optional. Default is | 207 * [view] - Type of data returned for traces in the list. Optional. Default is |
| 222 * `MINIMAL`. | 208 * `MINIMAL`. |
| 223 * Possible string values are: | 209 * Possible string values are: |
| 224 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. | 210 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. |
| 225 * - "MINIMAL" : A MINIMAL. | 211 * - "MINIMAL" : A MINIMAL. |
| 226 * - "ROOTSPAN" : A ROOTSPAN. | 212 * - "ROOTSPAN" : A ROOTSPAN. |
| 227 * - "COMPLETE" : A COMPLETE. | 213 * - "COMPLETE" : A COMPLETE. |
| 228 * | 214 * |
| 215 * [orderBy] - Field used to sort the returned traces. Optional. |
| 216 * Can be one of the following: |
| 217 * |
| 218 * * `trace_id` |
| 219 * * `name` (`name` field of root span in the trace) |
| 220 * * `duration` (difference between `end_time` and `start_time` fields of |
| 221 * the root span) |
| 222 * * `start` (`start_time` field of the root span) |
| 223 * |
| 224 * Descending order can be specified by appending `desc` to the sort field |
| 225 * (for example, `name desc`). |
| 226 * |
| 227 * Only one sort field is permitted. |
| 228 * |
| 229 * Completes with a [ListTracesResponse]. | 229 * Completes with a [ListTracesResponse]. |
| 230 * | 230 * |
| 231 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 231 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 232 * error. | 232 * error. |
| 233 * | 233 * |
| 234 * If the used [http.Client] completes with an error when making a REST call, | 234 * If the used [http.Client] completes with an error when making a REST call, |
| 235 * this method will complete with the same error. | 235 * this method will complete with the same error. |
| 236 */ | 236 */ |
| 237 async.Future<ListTracesResponse> list(core.String projectId, {core.String orde
rBy, core.String filter, core.String endTime, core.String startTime, core.String
pageToken, core.int pageSize, core.String view}) { | 237 async.Future<ListTracesResponse> list(core.String projectId, {core.String filt
er, core.String endTime, core.String startTime, core.String pageToken, core.int
pageSize, core.String view, core.String orderBy}) { |
| 238 var _url = null; | 238 var _url = null; |
| 239 var _queryParams = new core.Map(); | 239 var _queryParams = new core.Map(); |
| 240 var _uploadMedia = null; | 240 var _uploadMedia = null; |
| 241 var _uploadOptions = null; | 241 var _uploadOptions = null; |
| 242 var _downloadOptions = commons.DownloadOptions.Metadata; | 242 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 243 var _body = null; | 243 var _body = null; |
| 244 | 244 |
| 245 if (projectId == null) { | 245 if (projectId == null) { |
| 246 throw new core.ArgumentError("Parameter projectId is required."); | 246 throw new core.ArgumentError("Parameter projectId is required."); |
| 247 } | 247 } |
| 248 if (orderBy != null) { | |
| 249 _queryParams["orderBy"] = [orderBy]; | |
| 250 } | |
| 251 if (filter != null) { | 248 if (filter != null) { |
| 252 _queryParams["filter"] = [filter]; | 249 _queryParams["filter"] = [filter]; |
| 253 } | 250 } |
| 254 if (endTime != null) { | 251 if (endTime != null) { |
| 255 _queryParams["endTime"] = [endTime]; | 252 _queryParams["endTime"] = [endTime]; |
| 256 } | 253 } |
| 257 if (startTime != null) { | 254 if (startTime != null) { |
| 258 _queryParams["startTime"] = [startTime]; | 255 _queryParams["startTime"] = [startTime]; |
| 259 } | 256 } |
| 260 if (pageToken != null) { | 257 if (pageToken != null) { |
| 261 _queryParams["pageToken"] = [pageToken]; | 258 _queryParams["pageToken"] = [pageToken]; |
| 262 } | 259 } |
| 263 if (pageSize != null) { | 260 if (pageSize != null) { |
| 264 _queryParams["pageSize"] = ["${pageSize}"]; | 261 _queryParams["pageSize"] = ["${pageSize}"]; |
| 265 } | 262 } |
| 266 if (view != null) { | 263 if (view != null) { |
| 267 _queryParams["view"] = [view]; | 264 _queryParams["view"] = [view]; |
| 268 } | 265 } |
| 266 if (orderBy != null) { |
| 267 _queryParams["orderBy"] = [orderBy]; |
| 268 } |
| 269 | 269 |
| 270 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac
es'; | 270 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac
es'; |
| 271 | 271 |
| 272 var _response = _requester.request(_url, | 272 var _response = _requester.request(_url, |
| 273 "GET", | 273 "GET", |
| 274 body: _body, | 274 body: _body, |
| 275 queryParams: _queryParams, | 275 queryParams: _queryParams, |
| 276 uploadOptions: _uploadOptions, | 276 uploadOptions: _uploadOptions, |
| 277 uploadMedia: _uploadMedia, | 277 uploadMedia: _uploadMedia, |
| 278 downloadOptions: _downloadOptions); | 278 downloadOptions: _downloadOptions); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 294 * | 294 * |
| 295 * The JSON representation for `Empty` is empty JSON object `{}`. | 295 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 296 */ | 296 */ |
| 297 class Empty { | 297 class Empty { |
| 298 | 298 |
| 299 Empty(); | 299 Empty(); |
| 300 | 300 |
| 301 Empty.fromJson(core.Map _json) { | 301 Empty.fromJson(core.Map _json) { |
| 302 } | 302 } |
| 303 | 303 |
| 304 core.Map toJson() { | 304 core.Map<core.String, core.Object> toJson() { |
| 305 var _json = new core.Map(); | 305 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 306 return _json; | 306 return _json; |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 /** The response message for the `ListTraces` method. */ | 310 /** The response message for the `ListTraces` method. */ |
| 311 class ListTracesResponse { | 311 class ListTracesResponse { |
| 312 /** | 312 /** |
| 313 * If defined, indicates that there are more traces that match the request | 313 * If defined, indicates that there are more traces that match the request |
| 314 * and that this value should be passed to the next request to continue | 314 * and that this value should be passed to the next request to continue |
| 315 * retrieving additional traces. | 315 * retrieving additional traces. |
| 316 */ | 316 */ |
| 317 core.String nextPageToken; | 317 core.String nextPageToken; |
| 318 /** List of trace records returned. */ | 318 /** List of trace records returned. */ |
| 319 core.List<Trace> traces; | 319 core.List<Trace> traces; |
| 320 | 320 |
| 321 ListTracesResponse(); | 321 ListTracesResponse(); |
| 322 | 322 |
| 323 ListTracesResponse.fromJson(core.Map _json) { | 323 ListTracesResponse.fromJson(core.Map _json) { |
| 324 if (_json.containsKey("nextPageToken")) { | 324 if (_json.containsKey("nextPageToken")) { |
| 325 nextPageToken = _json["nextPageToken"]; | 325 nextPageToken = _json["nextPageToken"]; |
| 326 } | 326 } |
| 327 if (_json.containsKey("traces")) { | 327 if (_json.containsKey("traces")) { |
| 328 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList(
); | 328 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList(
); |
| 329 } | 329 } |
| 330 } | 330 } |
| 331 | 331 |
| 332 core.Map toJson() { | 332 core.Map<core.String, core.Object> toJson() { |
| 333 var _json = new core.Map(); | 333 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 334 if (nextPageToken != null) { | 334 if (nextPageToken != null) { |
| 335 _json["nextPageToken"] = nextPageToken; | 335 _json["nextPageToken"] = nextPageToken; |
| 336 } | 336 } |
| 337 if (traces != null) { | 337 if (traces != null) { |
| 338 _json["traces"] = traces.map((value) => (value).toJson()).toList(); | 338 _json["traces"] = traces.map((value) => (value).toJson()).toList(); |
| 339 } | 339 } |
| 340 return _json; | 340 return _json; |
| 341 } | 341 } |
| 342 } | 342 } |
| 343 | 343 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 364 projectId = _json["projectId"]; | 364 projectId = _json["projectId"]; |
| 365 } | 365 } |
| 366 if (_json.containsKey("spans")) { | 366 if (_json.containsKey("spans")) { |
| 367 spans = _json["spans"].map((value) => new TraceSpan.fromJson(value)).toLis
t(); | 367 spans = _json["spans"].map((value) => new TraceSpan.fromJson(value)).toLis
t(); |
| 368 } | 368 } |
| 369 if (_json.containsKey("traceId")) { | 369 if (_json.containsKey("traceId")) { |
| 370 traceId = _json["traceId"]; | 370 traceId = _json["traceId"]; |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 core.Map toJson() { | 374 core.Map<core.String, core.Object> toJson() { |
| 375 var _json = new core.Map(); | 375 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 376 if (projectId != null) { | 376 if (projectId != null) { |
| 377 _json["projectId"] = projectId; | 377 _json["projectId"] = projectId; |
| 378 } | 378 } |
| 379 if (spans != null) { | 379 if (spans != null) { |
| 380 _json["spans"] = spans.map((value) => (value).toJson()).toList(); | 380 _json["spans"] = spans.map((value) => (value).toJson()).toList(); |
| 381 } | 381 } |
| 382 if (traceId != null) { | 382 if (traceId != null) { |
| 383 _json["traceId"] = traceId; | 383 _json["traceId"] = traceId; |
| 384 } | 384 } |
| 385 return _json; | 385 return _json; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 parentSpanId = _json["parentSpanId"]; | 485 parentSpanId = _json["parentSpanId"]; |
| 486 } | 486 } |
| 487 if (_json.containsKey("spanId")) { | 487 if (_json.containsKey("spanId")) { |
| 488 spanId = _json["spanId"]; | 488 spanId = _json["spanId"]; |
| 489 } | 489 } |
| 490 if (_json.containsKey("startTime")) { | 490 if (_json.containsKey("startTime")) { |
| 491 startTime = _json["startTime"]; | 491 startTime = _json["startTime"]; |
| 492 } | 492 } |
| 493 } | 493 } |
| 494 | 494 |
| 495 core.Map toJson() { | 495 core.Map<core.String, core.Object> toJson() { |
| 496 var _json = new core.Map(); | 496 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 497 if (endTime != null) { | 497 if (endTime != null) { |
| 498 _json["endTime"] = endTime; | 498 _json["endTime"] = endTime; |
| 499 } | 499 } |
| 500 if (kind != null) { | 500 if (kind != null) { |
| 501 _json["kind"] = kind; | 501 _json["kind"] = kind; |
| 502 } | 502 } |
| 503 if (labels != null) { | 503 if (labels != null) { |
| 504 _json["labels"] = labels; | 504 _json["labels"] = labels; |
| 505 } | 505 } |
| 506 if (name != null) { | 506 if (name != null) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 525 core.List<Trace> traces; | 525 core.List<Trace> traces; |
| 526 | 526 |
| 527 Traces(); | 527 Traces(); |
| 528 | 528 |
| 529 Traces.fromJson(core.Map _json) { | 529 Traces.fromJson(core.Map _json) { |
| 530 if (_json.containsKey("traces")) { | 530 if (_json.containsKey("traces")) { |
| 531 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList(
); | 531 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList(
); |
| 532 } | 532 } |
| 533 } | 533 } |
| 534 | 534 |
| 535 core.Map toJson() { | 535 core.Map<core.String, core.Object> toJson() { |
| 536 var _json = new core.Map(); | 536 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 537 if (traces != null) { | 537 if (traces != null) { |
| 538 _json["traces"] = traces.map((value) => (value).toJson()).toList(); | 538 _json["traces"] = traces.map((value) => (value).toJson()).toList(); |
| 539 } | 539 } |
| 540 return _json; | 540 return _json; |
| 541 } | 541 } |
| 542 } | 542 } |
| OLD | NEW |