| 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 * |
| 159 * [filter] - An optional filter against labels for the request. | 173 * [filter] - An optional filter against labels for the request. |
| 160 * | 174 * |
| 161 * By default, searches use prefix matching. To specify exact match, prepend | 175 * By default, searches use prefix matching. To specify exact match, prepend |
| 162 * a plus symbol (`+`) to the search term. | 176 * a plus symbol (`+`) to the search term. |
| 163 * Multiple terms are ANDed. Syntax: | 177 * Multiple terms are ANDed. Syntax: |
| 164 * | 178 * |
| 165 * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root | 179 * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root |
| 166 * span starts with `NAME_PREFIX`. | 180 * span starts with `NAME_PREFIX`. |
| 167 * * `+root:NAME` or `+NAME`: Return traces where any root span's name is | 181 * * `+root:NAME` or `+NAME`: Return traces where any root span's name is |
| 168 * exactly `NAME`. | 182 * exactly `NAME`. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 184 * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair | 198 * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair |
| 185 * exactly matching the specified text. Both a key and a value must be | 199 * exactly matching the specified text. Both a key and a value must be |
| 186 * specified. | 200 * specified. |
| 187 * * `method:VALUE`: Equivalent to `/http/method:VALUE`. | 201 * * `method:VALUE`: Equivalent to `/http/method:VALUE`. |
| 188 * * `url:VALUE`: Equivalent to `/http/url:VALUE`. | 202 * * `url:VALUE`: Equivalent to `/http/url:VALUE`. |
| 189 * | 203 * |
| 190 * [endTime] - End of the time interval (inclusive) during which the trace | 204 * [endTime] - End of the time interval (inclusive) during which the trace |
| 191 * data was | 205 * data was |
| 192 * collected from the application. | 206 * collected from the application. |
| 193 * | 207 * |
| 194 * [startTime] - Start of the time interval (inclusive) during which the trace | |
| 195 * data was | |
| 196 * collected from the application. | |
| 197 * | |
| 198 * [pageToken] - Token identifying the page of results to return. If provided, | 208 * [pageToken] - Token identifying the page of results to return. If provided, |
| 199 * use the | 209 * use the |
| 200 * value of the `next_page_token` field from a previous request. Optional. | 210 * value of the `next_page_token` field from a previous request. Optional. |
| 201 * | 211 * |
| 212 * [startTime] - Start of the time interval (inclusive) during which the trace |
| 213 * data was |
| 214 * collected from the application. |
| 215 * |
| 202 * [pageSize] - Maximum number of traces to return. If not specified or <= 0, | 216 * [pageSize] - Maximum number of traces to return. If not specified or <= 0, |
| 203 * the | 217 * the |
| 204 * implementation selects a reasonable value. The implementation may | 218 * implementation selects a reasonable value. The implementation may |
| 205 * return fewer traces than the requested page size. Optional. | 219 * return fewer traces than the requested page size. Optional. |
| 206 * | 220 * |
| 207 * [view] - Type of data returned for traces in the list. Optional. Default is | 221 * [view] - Type of data returned for traces in the list. Optional. Default is |
| 208 * `MINIMAL`. | 222 * `MINIMAL`. |
| 209 * Possible string values are: | 223 * Possible string values are: |
| 210 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. | 224 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. |
| 211 * - "MINIMAL" : A MINIMAL. | 225 * - "MINIMAL" : A MINIMAL. |
| 212 * - "ROOTSPAN" : A ROOTSPAN. | 226 * - "ROOTSPAN" : A ROOTSPAN. |
| 213 * - "COMPLETE" : A COMPLETE. | 227 * - "COMPLETE" : A COMPLETE. |
| 214 * | 228 * |
| 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 filt
er, core.String endTime, core.String startTime, core.String pageToken, core.int
pageSize, core.String view, core.String orderBy}) { | 237 async.Future<ListTracesResponse> list(core.String projectId, {core.String orde
rBy, core.String filter, core.String endTime, core.String pageToken, core.String
startTime, core.int pageSize, core.String view}) { |
| 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 } |
| 248 if (filter != null) { | 251 if (filter != null) { |
| 249 _queryParams["filter"] = [filter]; | 252 _queryParams["filter"] = [filter]; |
| 250 } | 253 } |
| 251 if (endTime != null) { | 254 if (endTime != null) { |
| 252 _queryParams["endTime"] = [endTime]; | 255 _queryParams["endTime"] = [endTime]; |
| 253 } | 256 } |
| 257 if (pageToken != null) { |
| 258 _queryParams["pageToken"] = [pageToken]; |
| 259 } |
| 254 if (startTime != null) { | 260 if (startTime != null) { |
| 255 _queryParams["startTime"] = [startTime]; | 261 _queryParams["startTime"] = [startTime]; |
| 256 } | 262 } |
| 257 if (pageToken != null) { | |
| 258 _queryParams["pageToken"] = [pageToken]; | |
| 259 } | |
| 260 if (pageSize != null) { | 263 if (pageSize != null) { |
| 261 _queryParams["pageSize"] = ["${pageSize}"]; | 264 _queryParams["pageSize"] = ["${pageSize}"]; |
| 262 } | 265 } |
| 263 if (view != null) { | 266 if (view != null) { |
| 264 _queryParams["view"] = [view]; | 267 _queryParams["view"] = [view]; |
| 265 } | 268 } |
| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 | 534 |
| 535 core.Map<core.String, core.Object> toJson() { | 535 core.Map<core.String, core.Object> toJson() { |
| 536 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 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 |