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 for the request. | 159 * [filter] - An optional filter for the request. |
174 * | 160 * |
175 * [endTime] - Start of the time interval (inclusive) during which the trace | 161 * [endTime] - Start of the time interval (inclusive) during which the trace |
176 * data was | 162 * data was |
177 * collected from the application. | 163 * collected from the application. |
178 * | 164 * |
| 165 * [startTime] - End of the time interval (inclusive) during which the trace |
| 166 * data was |
| 167 * collected from the application. |
| 168 * |
179 * [pageToken] - Token identifying the page of results to return. If provided, | 169 * [pageToken] - Token identifying the page of results to return. If provided, |
180 * use the | 170 * use the |
181 * value of the `next_page_token` field from a previous request. Optional. | 171 * value of the `next_page_token` field from a previous request. Optional. |
182 * | 172 * |
183 * [startTime] - End of the time interval (inclusive) during which the trace | |
184 * data was | |
185 * collected from the application. | |
186 * | |
187 * [pageSize] - Maximum number of traces to return. If not specified or <= 0, | 173 * [pageSize] - Maximum number of traces to return. If not specified or <= 0, |
188 * the | 174 * the |
189 * implementation selects a reasonable value. The implementation may | 175 * implementation selects a reasonable value. The implementation may |
190 * return fewer traces than the requested page size. Optional. | 176 * return fewer traces than the requested page size. Optional. |
191 * | 177 * |
192 * [view] - Type of data returned for traces in the list. Optional. Default is | 178 * [view] - Type of data returned for traces in the list. Optional. Default is |
193 * `MINIMAL`. | 179 * `MINIMAL`. |
194 * Possible string values are: | 180 * Possible string values are: |
195 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. | 181 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. |
196 * - "MINIMAL" : A MINIMAL. | 182 * - "MINIMAL" : A MINIMAL. |
197 * - "ROOTSPAN" : A ROOTSPAN. | 183 * - "ROOTSPAN" : A ROOTSPAN. |
198 * - "COMPLETE" : A COMPLETE. | 184 * - "COMPLETE" : A COMPLETE. |
199 * | 185 * |
| 186 * [orderBy] - Field used to sort the returned traces. Optional. |
| 187 * Can be one of the following: |
| 188 * |
| 189 * * `trace_id` |
| 190 * * `name` (`name` field of root span in the trace) |
| 191 * * `duration` (difference between `end_time` and `start_time` fields of |
| 192 * the root span) |
| 193 * * `start` (`start_time` field of the root span) |
| 194 * |
| 195 * Descending order can be specified by appending `desc` to the sort field |
| 196 * (for example, `name desc`). |
| 197 * |
| 198 * Only one sort field is permitted. |
| 199 * |
200 * Completes with a [ListTracesResponse]. | 200 * Completes with a [ListTracesResponse]. |
201 * | 201 * |
202 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 202 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
203 * error. | 203 * error. |
204 * | 204 * |
205 * If the used [http.Client] completes with an error when making a REST call, | 205 * If the used [http.Client] completes with an error when making a REST call, |
206 * this method will complete with the same error. | 206 * this method will complete with the same error. |
207 */ | 207 */ |
208 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}) { | 208 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}) { |
209 var _url = null; | 209 var _url = null; |
210 var _queryParams = new core.Map(); | 210 var _queryParams = new core.Map(); |
211 var _uploadMedia = null; | 211 var _uploadMedia = null; |
212 var _uploadOptions = null; | 212 var _uploadOptions = null; |
213 var _downloadOptions = commons.DownloadOptions.Metadata; | 213 var _downloadOptions = commons.DownloadOptions.Metadata; |
214 var _body = null; | 214 var _body = null; |
215 | 215 |
216 if (projectId == null) { | 216 if (projectId == null) { |
217 throw new core.ArgumentError("Parameter projectId is required."); | 217 throw new core.ArgumentError("Parameter projectId is required."); |
218 } | 218 } |
219 if (orderBy != null) { | |
220 _queryParams["orderBy"] = [orderBy]; | |
221 } | |
222 if (filter != null) { | 219 if (filter != null) { |
223 _queryParams["filter"] = [filter]; | 220 _queryParams["filter"] = [filter]; |
224 } | 221 } |
225 if (endTime != null) { | 222 if (endTime != null) { |
226 _queryParams["endTime"] = [endTime]; | 223 _queryParams["endTime"] = [endTime]; |
227 } | 224 } |
| 225 if (startTime != null) { |
| 226 _queryParams["startTime"] = [startTime]; |
| 227 } |
228 if (pageToken != null) { | 228 if (pageToken != null) { |
229 _queryParams["pageToken"] = [pageToken]; | 229 _queryParams["pageToken"] = [pageToken]; |
230 } | 230 } |
231 if (startTime != null) { | |
232 _queryParams["startTime"] = [startTime]; | |
233 } | |
234 if (pageSize != null) { | 231 if (pageSize != null) { |
235 _queryParams["pageSize"] = ["${pageSize}"]; | 232 _queryParams["pageSize"] = ["${pageSize}"]; |
236 } | 233 } |
237 if (view != null) { | 234 if (view != null) { |
238 _queryParams["view"] = [view]; | 235 _queryParams["view"] = [view]; |
239 } | 236 } |
| 237 if (orderBy != null) { |
| 238 _queryParams["orderBy"] = [orderBy]; |
| 239 } |
240 | 240 |
241 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac
es'; | 241 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac
es'; |
242 | 242 |
243 var _response = _requester.request(_url, | 243 var _response = _requester.request(_url, |
244 "GET", | 244 "GET", |
245 body: _body, | 245 body: _body, |
246 queryParams: _queryParams, | 246 queryParams: _queryParams, |
247 uploadOptions: _uploadOptions, | 247 uploadOptions: _uploadOptions, |
248 uploadMedia: _uploadMedia, | 248 uploadMedia: _uploadMedia, |
249 downloadOptions: _downloadOptions); | 249 downloadOptions: _downloadOptions); |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 473 } |
474 | 474 |
475 core.Map toJson() { | 475 core.Map toJson() { |
476 var _json = new core.Map(); | 476 var _json = new core.Map(); |
477 if (traces != null) { | 477 if (traces != null) { |
478 _json["traces"] = traces.map((value) => (value).toJson()).toList(); | 478 _json["traces"] = traces.map((value) => (value).toJson()).toList(); |
479 } | 479 } |
480 return _json; | 480 return _json; |
481 } | 481 } |
482 } | 482 } |
OLD | NEW |