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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 * (for example, `name desc`). | 169 * (for example, `name desc`). |
170 * | 170 * |
171 * Only one sort field is permitted. | 171 * Only one sort field is permitted. |
172 * | 172 * |
173 * [filter] - An optional filter for the request. | 173 * [filter] - An optional filter for the request. |
174 * | 174 * |
175 * [endTime] - Start of the time interval (inclusive) during which the trace | 175 * [endTime] - Start of the time interval (inclusive) during which the trace |
176 * data was | 176 * data was |
177 * collected from the application. | 177 * collected from the application. |
178 * | 178 * |
179 * [startTime] - End of the time interval (inclusive) during which the trace | |
180 * data was | |
181 * collected from the application. | |
182 * | |
183 * [pageToken] - Token identifying the page of results to return. If provided, | 179 * [pageToken] - Token identifying the page of results to return. If provided, |
184 * use the | 180 * use the |
185 * value of the `next_page_token` field from a previous request. Optional. | 181 * value of the `next_page_token` field from a previous request. Optional. |
186 * | 182 * |
| 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, | 187 * [pageSize] - Maximum number of traces to return. If not specified or <= 0, |
188 * the | 188 * the |
189 * implementation selects a reasonable value. The implementation may | 189 * implementation selects a reasonable value. The implementation may |
190 * return fewer traces than the requested page size. Optional. | 190 * return fewer traces than the requested page size. Optional. |
191 * | 191 * |
192 * [view] - Type of data returned for traces in the list. Optional. Default is | 192 * [view] - Type of data returned for traces in the list. Optional. Default is |
193 * `MINIMAL`. | 193 * `MINIMAL`. |
194 * Possible string values are: | 194 * Possible string values are: |
195 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. | 195 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. |
196 * - "MINIMAL" : A MINIMAL. | 196 * - "MINIMAL" : A MINIMAL. |
197 * - "ROOTSPAN" : A ROOTSPAN. | 197 * - "ROOTSPAN" : A ROOTSPAN. |
198 * - "COMPLETE" : A COMPLETE. | 198 * - "COMPLETE" : A COMPLETE. |
199 * | 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 startTime, core.String
pageToken, core.int pageSize, core.String view}) { | 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}) { |
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) { | 219 if (orderBy != null) { |
220 _queryParams["orderBy"] = [orderBy]; | 220 _queryParams["orderBy"] = [orderBy]; |
221 } | 221 } |
222 if (filter != null) { | 222 if (filter != null) { |
223 _queryParams["filter"] = [filter]; | 223 _queryParams["filter"] = [filter]; |
224 } | 224 } |
225 if (endTime != null) { | 225 if (endTime != null) { |
226 _queryParams["endTime"] = [endTime]; | 226 _queryParams["endTime"] = [endTime]; |
227 } | 227 } |
| 228 if (pageToken != null) { |
| 229 _queryParams["pageToken"] = [pageToken]; |
| 230 } |
228 if (startTime != null) { | 231 if (startTime != null) { |
229 _queryParams["startTime"] = [startTime]; | 232 _queryParams["startTime"] = [startTime]; |
230 } | 233 } |
231 if (pageToken != null) { | |
232 _queryParams["pageToken"] = [pageToken]; | |
233 } | |
234 if (pageSize != null) { | 234 if (pageSize != null) { |
235 _queryParams["pageSize"] = ["${pageSize}"]; | 235 _queryParams["pageSize"] = ["${pageSize}"]; |
236 } | 236 } |
237 if (view != null) { | 237 if (view != null) { |
238 _queryParams["view"] = [view]; | 238 _queryParams["view"] = [view]; |
239 } | 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, |
(...skipping 229 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 |