| 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.v2; | 3 library googleapis.cloudtrace.v2; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * Returns of a list of traces that match the specified filter conditions. | 113 * Returns of a list of traces that match the specified filter conditions. |
| 114 * | 114 * |
| 115 * Request parameters: | 115 * Request parameters: |
| 116 * | 116 * |
| 117 * [parent] - Required. The project where the trace data is stored. The format | 117 * [parent] - Required. The project where the trace data is stored. The format |
| 118 * is `projects/PROJECT_ID`. | 118 * is `projects/PROJECT_ID`. |
| 119 * Value must have pattern "^projects/[^/]+$". | 119 * Value must have pattern "^projects/[^/]+$". |
| 120 * | 120 * |
| 121 * [orderBy] - Optional. A single field used to sort the returned traces. | |
| 122 * Only the following field names can be used: | |
| 123 * | |
| 124 * * `trace_id`: the trace's ID field | |
| 125 * * `name`: the root span's resource name | |
| 126 * * `duration`: the difference between the root span's start time and end | |
| 127 * time | |
| 128 * * `start`: the start time of the root span | |
| 129 * | |
| 130 * Sorting is in ascending order unless `desc` is appended to the sort field | |
| 131 * name. | |
| 132 * Example: `"name desc"`). | |
| 133 * | |
| 134 * [filter] - Opional. Return only traces that match this | 121 * [filter] - Opional. Return only traces that match this |
| 135 * [trace filter](/trace/docs/trace-filters). Example: | 122 * [trace filter](/trace/docs/trace-filters). Example: |
| 136 * | 123 * |
| 137 * "label:/http/url root:/_ah/background my_label:17" | 124 * "label:/http/url root:/_ah/background my_label:17" |
| 138 * | 125 * |
| 139 * [endTime] - Optional. Do not return traces whose start time is later than | 126 * [endTime] - Optional. Do not return traces whose start time is later than |
| 140 * this time. | 127 * this time. |
| 141 * | 128 * |
| 142 * [startTime] - Optional. Do not return traces whose end time is earlier than | 129 * [startTime] - Optional. Do not return traces whose end time is earlier than |
| 143 * this time. | 130 * this time. |
| 144 * | 131 * |
| 145 * [pageToken] - Optional. If present, then retrieve the next batch of results | 132 * [pageToken] - Optional. If present, then retrieve the next batch of results |
| 146 * from the | 133 * from the |
| 147 * preceding call to this method. `page_token` must be the value of | 134 * preceding call to this method. `page_token` must be the value of |
| 148 * `next_page_token` from the previous response. The values of other method | 135 * `next_page_token` from the previous response. The values of other method |
| 149 * parameters should be identical to those in the previous call. | 136 * parameters should be identical to those in the previous call. |
| 150 * | 137 * |
| 151 * [pageSize] - Optional. The maximum number of results to return from this | 138 * [pageSize] - Optional. The maximum number of results to return from this |
| 152 * request. | 139 * request. |
| 153 * Non-positive values are ignored. The presence of `next_page_token` in the | 140 * Non-positive values are ignored. The presence of `next_page_token` in the |
| 154 * response indicates that more results might be available, even if fewer than | 141 * response indicates that more results might be available, even if fewer than |
| 155 * the maximum number of results is returned by this request. | 142 * the maximum number of results is returned by this request. |
| 156 * | 143 * |
| 144 * [orderBy] - Optional. A single field used to sort the returned traces. |
| 145 * Only the following field names can be used: |
| 146 * |
| 147 * * `trace_id`: the trace's ID field |
| 148 * * `name`: the root span's resource name |
| 149 * * `duration`: the difference between the root span's start time and end |
| 150 * time |
| 151 * * `start`: the start time of the root span |
| 152 * |
| 153 * Sorting is in ascending order unless `desc` is appended to the sort field |
| 154 * name. |
| 155 * Example: `"name desc"`). |
| 156 * |
| 157 * Completes with a [ListTracesResponse]. | 157 * Completes with a [ListTracesResponse]. |
| 158 * | 158 * |
| 159 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 159 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 160 * error. | 160 * error. |
| 161 * | 161 * |
| 162 * If the used [http.Client] completes with an error when making a REST call, | 162 * If the used [http.Client] completes with an error when making a REST call, |
| 163 * this method will complete with the same error. | 163 * this method will complete with the same error. |
| 164 */ | 164 */ |
| 165 async.Future<ListTracesResponse> list(core.String parent, {core.String orderBy
, core.String filter, core.String endTime, core.String startTime, core.String pa
geToken, core.int pageSize}) { | 165 async.Future<ListTracesResponse> list(core.String parent, {core.String filter,
core.String endTime, core.String startTime, core.String pageToken, core.int pag
eSize, core.String orderBy}) { |
| 166 var _url = null; | 166 var _url = null; |
| 167 var _queryParams = new core.Map(); | 167 var _queryParams = new core.Map(); |
| 168 var _uploadMedia = null; | 168 var _uploadMedia = null; |
| 169 var _uploadOptions = null; | 169 var _uploadOptions = null; |
| 170 var _downloadOptions = commons.DownloadOptions.Metadata; | 170 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 171 var _body = null; | 171 var _body = null; |
| 172 | 172 |
| 173 if (parent == null) { | 173 if (parent == null) { |
| 174 throw new core.ArgumentError("Parameter parent is required."); | 174 throw new core.ArgumentError("Parameter parent is required."); |
| 175 } | 175 } |
| 176 if (orderBy != null) { | |
| 177 _queryParams["orderBy"] = [orderBy]; | |
| 178 } | |
| 179 if (filter != null) { | 176 if (filter != null) { |
| 180 _queryParams["filter"] = [filter]; | 177 _queryParams["filter"] = [filter]; |
| 181 } | 178 } |
| 182 if (endTime != null) { | 179 if (endTime != null) { |
| 183 _queryParams["endTime"] = [endTime]; | 180 _queryParams["endTime"] = [endTime]; |
| 184 } | 181 } |
| 185 if (startTime != null) { | 182 if (startTime != null) { |
| 186 _queryParams["startTime"] = [startTime]; | 183 _queryParams["startTime"] = [startTime]; |
| 187 } | 184 } |
| 188 if (pageToken != null) { | 185 if (pageToken != null) { |
| 189 _queryParams["pageToken"] = [pageToken]; | 186 _queryParams["pageToken"] = [pageToken]; |
| 190 } | 187 } |
| 191 if (pageSize != null) { | 188 if (pageSize != null) { |
| 192 _queryParams["pageSize"] = ["${pageSize}"]; | 189 _queryParams["pageSize"] = ["${pageSize}"]; |
| 193 } | 190 } |
| 191 if (orderBy != null) { |
| 192 _queryParams["orderBy"] = [orderBy]; |
| 193 } |
| 194 | 194 |
| 195 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/traces'; | 195 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/traces'; |
| 196 | 196 |
| 197 var _response = _requester.request(_url, | 197 var _response = _requester.request(_url, |
| 198 "GET", | 198 "GET", |
| 199 body: _body, | 199 body: _body, |
| 200 queryParams: _queryParams, | 200 queryParams: _queryParams, |
| 201 uploadOptions: _uploadOptions, | 201 uploadOptions: _uploadOptions, |
| 202 uploadMedia: _uploadMedia, | 202 uploadMedia: _uploadMedia, |
| 203 downloadOptions: _downloadOptions); | 203 downloadOptions: _downloadOptions); |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1312 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1313 if (truncatedByteCount != null) { | 1313 if (truncatedByteCount != null) { |
| 1314 _json["truncatedByteCount"] = truncatedByteCount; | 1314 _json["truncatedByteCount"] = truncatedByteCount; |
| 1315 } | 1315 } |
| 1316 if (value != null) { | 1316 if (value != null) { |
| 1317 _json["value"] = value; | 1317 _json["value"] = value; |
| 1318 } | 1318 } |
| 1319 return _json; | 1319 return _json; |
| 1320 } | 1320 } |
| 1321 } | 1321 } |
| OLD | NEW |