Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: generated/googleapis/lib/cloudtrace/v1.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client cloudtrace/v1'; 15 const core.String USER_AGENT = 'dart-api-client cloudtrace/v1';
16 16
17 /** 17 /// Send and retrieve trace data from Stackdriver Trace. Data is generated and
18 * Send and retrieve trace data from Stackdriver Trace. Data is generated and 18 /// available by default for all App Engine applications. Data from other
19 * available by default for all App Engine applications. Data from other 19 /// applications can be written to Stackdriver Trace for display, reporting,
20 * applications can be written to Stackdriver Trace for display, reporting, and 20 /// and analysis.
21 * analysis.
22 */
23 class CloudtraceApi { 21 class CloudtraceApi {
24 /** View and manage your data across Google Cloud Platform services */ 22 /// View and manage your data across Google Cloud Platform services
25 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 23 static const CloudPlatformScope =
24 "https://www.googleapis.com/auth/cloud-platform";
26 25
27 /** Write Trace data for a project or application */ 26 /// Write Trace data for a project or application
28 static const TraceAppendScope = "https://www.googleapis.com/auth/trace.append" ; 27 static const TraceAppendScope =
28 "https://www.googleapis.com/auth/trace.append";
29 29
30 /** Read Trace data for a project or application */ 30 /// Read Trace data for a project or application
31 static const TraceReadonlyScope = "https://www.googleapis.com/auth/trace.reado nly"; 31 static const TraceReadonlyScope =
32 32 "https://www.googleapis.com/auth/trace.readonly";
33 33
34 final commons.ApiRequester _requester; 34 final commons.ApiRequester _requester;
35 35
36 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 36 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
37 37
38 CloudtraceApi(http.Client client, {core.String rootUrl: "https://cloudtrace.go ogleapis.com/", core.String servicePath: ""}) : 38 CloudtraceApi(http.Client client,
39 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 39 {core.String rootUrl: "https://cloudtrace.googleapis.com/",
40 core.String servicePath: ""})
41 : _requester =
42 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
40 } 43 }
41 44
42
43 class ProjectsResourceApi { 45 class ProjectsResourceApi {
44 final commons.ApiRequester _requester; 46 final commons.ApiRequester _requester;
45 47
46 ProjectsTracesResourceApi get traces => new ProjectsTracesResourceApi(_request er); 48 ProjectsTracesResourceApi get traces =>
49 new ProjectsTracesResourceApi(_requester);
47 50
48 ProjectsResourceApi(commons.ApiRequester client) : 51 ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
49 _requester = client;
50 52
51 /** 53 /// Sends new traces to Stackdriver Trace or updates existing traces. If the
52 * Sends new traces to Stackdriver Trace or updates existing traces. If the ID 54 /// ID
53 * of a trace that you send matches that of an existing trace, any fields 55 /// of a trace that you send matches that of an existing trace, any fields
54 * in the existing trace and its spans are overwritten by the provided values, 56 /// in the existing trace and its spans are overwritten by the provided
55 * and any new fields provided are merged with the existing trace data. If the 57 /// values,
56 * ID does not match, a new trace is created. 58 /// and any new fields provided are merged with the existing trace data. If
57 * 59 /// the
58 * [request] - The metadata request object. 60 /// ID does not match, a new trace is created.
59 * 61 ///
60 * Request parameters: 62 /// [request] - The metadata request object.
61 * 63 ///
62 * [projectId] - ID of the Cloud project where the trace data is stored. 64 /// Request parameters:
63 * 65 ///
64 * Completes with a [Empty]. 66 /// [projectId] - ID of the Cloud project where the trace data is stored.
65 * 67 ///
66 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 68 /// Completes with a [Empty].
67 * error. 69 ///
68 * 70 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
69 * If the used [http.Client] completes with an error when making a REST call, 71 /// an error.
70 * this method will complete with the same error. 72 ///
71 */ 73 /// If the used [http.Client] completes with an error when making a REST
74 /// call, this method will complete with the same error.
72 async.Future<Empty> patchTraces(Traces request, core.String projectId) { 75 async.Future<Empty> patchTraces(Traces request, core.String projectId) {
73 var _url = null; 76 var _url = null;
74 var _queryParams = new core.Map(); 77 var _queryParams = new core.Map();
75 var _uploadMedia = null; 78 var _uploadMedia = null;
76 var _uploadOptions = null; 79 var _uploadOptions = null;
77 var _downloadOptions = commons.DownloadOptions.Metadata; 80 var _downloadOptions = commons.DownloadOptions.Metadata;
78 var _body = null; 81 var _body = null;
79 82
80 if (request != null) { 83 if (request != null) {
81 _body = convert.JSON.encode((request).toJson()); 84 _body = convert.JSON.encode((request).toJson());
82 } 85 }
83 if (projectId == null) { 86 if (projectId == null) {
84 throw new core.ArgumentError("Parameter projectId is required."); 87 throw new core.ArgumentError("Parameter projectId is required.");
85 } 88 }
86 89
87 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac es'; 90 _url = 'v1/projects/' +
91 commons.Escaper.ecapeVariable('$projectId') +
92 '/traces';
88 93
89 var _response = _requester.request(_url, 94 var _response = _requester.request(_url, "PATCH",
90 "PATCH", 95 body: _body,
91 body: _body, 96 queryParams: _queryParams,
92 queryParams: _queryParams, 97 uploadOptions: _uploadOptions,
93 uploadOptions: _uploadOptions, 98 uploadMedia: _uploadMedia,
94 uploadMedia: _uploadMedia, 99 downloadOptions: _downloadOptions);
95 downloadOptions: _downloadOptions);
96 return _response.then((data) => new Empty.fromJson(data)); 100 return _response.then((data) => new Empty.fromJson(data));
97 } 101 }
98
99 } 102 }
100 103
101
102 class ProjectsTracesResourceApi { 104 class ProjectsTracesResourceApi {
103 final commons.ApiRequester _requester; 105 final commons.ApiRequester _requester;
104 106
105 ProjectsTracesResourceApi(commons.ApiRequester client) : 107 ProjectsTracesResourceApi(commons.ApiRequester client) : _requester = client;
106 _requester = client;
107 108
108 /** 109 /// Gets a single trace by its ID.
109 * Gets a single trace by its ID. 110 ///
110 * 111 /// Request parameters:
111 * Request parameters: 112 ///
112 * 113 /// [projectId] - ID of the Cloud project where the trace data is stored.
113 * [projectId] - ID of the Cloud project where the trace data is stored. 114 ///
114 * 115 /// [traceId] - ID of the trace to return.
115 * [traceId] - ID of the trace to return. 116 ///
116 * 117 /// Completes with a [Trace].
117 * Completes with a [Trace]. 118 ///
118 * 119 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
119 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 120 /// an error.
120 * error. 121 ///
121 * 122 /// If the used [http.Client] completes with an error when making a REST
122 * If the used [http.Client] completes with an error when making a REST call, 123 /// call, this method will complete with the same error.
123 * this method will complete with the same error.
124 */
125 async.Future<Trace> get(core.String projectId, core.String traceId) { 124 async.Future<Trace> get(core.String projectId, core.String traceId) {
126 var _url = null; 125 var _url = null;
127 var _queryParams = new core.Map(); 126 var _queryParams = new core.Map();
128 var _uploadMedia = null; 127 var _uploadMedia = null;
129 var _uploadOptions = null; 128 var _uploadOptions = null;
130 var _downloadOptions = commons.DownloadOptions.Metadata; 129 var _downloadOptions = commons.DownloadOptions.Metadata;
131 var _body = null; 130 var _body = null;
132 131
133 if (projectId == null) { 132 if (projectId == null) {
134 throw new core.ArgumentError("Parameter projectId is required."); 133 throw new core.ArgumentError("Parameter projectId is required.");
135 } 134 }
136 if (traceId == null) { 135 if (traceId == null) {
137 throw new core.ArgumentError("Parameter traceId is required."); 136 throw new core.ArgumentError("Parameter traceId is required.");
138 } 137 }
139 138
140 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac es/' + commons.Escaper.ecapeVariable('$traceId'); 139 _url = 'v1/projects/' +
140 commons.Escaper.ecapeVariable('$projectId') +
141 '/traces/' +
142 commons.Escaper.ecapeVariable('$traceId');
141 143
142 var _response = _requester.request(_url, 144 var _response = _requester.request(_url, "GET",
143 "GET", 145 body: _body,
144 body: _body, 146 queryParams: _queryParams,
145 queryParams: _queryParams, 147 uploadOptions: _uploadOptions,
146 uploadOptions: _uploadOptions, 148 uploadMedia: _uploadMedia,
147 uploadMedia: _uploadMedia, 149 downloadOptions: _downloadOptions);
148 downloadOptions: _downloadOptions);
149 return _response.then((data) => new Trace.fromJson(data)); 150 return _response.then((data) => new Trace.fromJson(data));
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 /// [filter] - An optional filter against labels for the request.
159 * [filter] - An optional filter against labels for the request. 160 ///
160 * 161 /// By default, searches use prefix matching. To specify exact match, prepend
161 * By default, searches use prefix matching. To specify exact match, prepend 162 /// a plus symbol (`+`) to the search term.
162 * a plus symbol (`+`) to the search term. 163 /// Multiple terms are ANDed. Syntax:
163 * Multiple terms are ANDed. Syntax: 164 ///
164 * 165 /// * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root
165 * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root 166 /// span starts with `NAME_PREFIX`.
166 * span starts with `NAME_PREFIX`. 167 /// * `+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 168 /// exactly `NAME`.
168 * exactly `NAME`. 169 /// * `span:NAME_PREFIX`: Return traces where any span starts with
169 * * `span:NAME_PREFIX`: Return traces where any span starts with 170 /// `NAME_PREFIX`.
170 * `NAME_PREFIX`. 171 /// * `+span:NAME`: Return traces where any span's name is exactly
171 * * `+span:NAME`: Return traces where any span's name is exactly 172 /// `NAME`.
172 * `NAME`. 173 /// * `latency:DURATION`: Return traces whose overall latency is
173 * * `latency:DURATION`: Return traces whose overall latency is 174 /// greater or equal to than `DURATION`. Accepted units are nanoseconds
174 * greater or equal to than `DURATION`. Accepted units are nanoseconds 175 /// (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For
175 * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For 176 /// example, `latency:24ms` returns traces whose overall latency
176 * example, `latency:24ms` returns traces whose overall latency 177 /// is greater than or equal to 24 milliseconds.
177 * is greater than or equal to 24 milliseconds. 178 /// * `label:LABEL_KEY`: Return all traces containing the specified
178 * * `label:LABEL_KEY`: Return all traces containing the specified 179 /// label key (exact match, case-sensitive) regardless of the key:value
179 * label key (exact match, case-sensitive) regardless of the key:value 180 /// pair's value (including empty values).
180 * pair's value (including empty values). 181 /// * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified
181 * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified 182 /// label key (exact match, case-sensitive) whose value starts with
182 * label key (exact match, case-sensitive) whose value starts with 183 /// `VALUE_PREFIX`. Both a key and a value must be specified.
183 * `VALUE_PREFIX`. Both a key and a value must be specified. 184 /// * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair
184 * * `+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
185 * exactly matching the specified text. Both a key and a value must be 186 /// specified.
186 * specified. 187 /// * `method:VALUE`: Equivalent to `/http/method:VALUE`.
187 * * `method:VALUE`: Equivalent to `/http/method:VALUE`. 188 /// * `url:VALUE`: Equivalent to `/http/url:VALUE`.
188 * * `url:VALUE`: Equivalent to `/http/url:VALUE`. 189 ///
189 * 190 /// [endTime] - End of the time interval (inclusive) during which the trace
190 * [endTime] - End of the time interval (inclusive) during which the trace 191 /// data was
191 * data was 192 /// collected from the application.
192 * collected from the application. 193 ///
193 * 194 /// [startTime] - Start of the time interval (inclusive) during which the
194 * [pageToken] - Token identifying the page of results to return. If provided, 195 /// trace data was
195 * use the 196 /// collected from the application.
196 * value of the `next_page_token` field from a previous request. Optional. 197 ///
197 * 198 /// [pageToken] - Token identifying the page of results to return. If
198 * [startTime] - Start of the time interval (inclusive) during which the trace 199 /// provided, use the
199 * data was 200 /// value of the `next_page_token` field from a previous request. Optional.
200 * collected from the application. 201 ///
201 * 202 /// [pageSize] - Maximum number of traces to return. If not specified or <=
202 * [pageSize] - Maximum number of traces to return. If not specified or <= 0, 203 /// 0, the
203 * the 204 /// implementation selects a reasonable value. The implementation may
204 * implementation selects a reasonable value. The implementation may 205 /// return fewer traces than the requested page size. Optional.
205 * return fewer traces than the requested page size. Optional. 206 ///
206 * 207 /// [view] - Type of data returned for traces in the list. Optional. Default
207 * [view] - Type of data returned for traces in the list. Optional. Default is 208 /// is
208 * `MINIMAL`. 209 /// `MINIMAL`.
209 * Possible string values are: 210 /// Possible string values are:
210 * - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED. 211 /// - "VIEW_TYPE_UNSPECIFIED" : A VIEW_TYPE_UNSPECIFIED.
211 * - "MINIMAL" : A MINIMAL. 212 /// - "MINIMAL" : A MINIMAL.
212 * - "ROOTSPAN" : A ROOTSPAN. 213 /// - "ROOTSPAN" : A ROOTSPAN.
213 * - "COMPLETE" : A COMPLETE. 214 /// - "COMPLETE" : A COMPLETE.
214 * 215 ///
215 * [orderBy] - Field used to sort the returned traces. Optional. 216 /// [orderBy] - Field used to sort the returned traces. Optional.
216 * Can be one of the following: 217 /// Can be one of the following:
217 * 218 ///
218 * * `trace_id` 219 /// * `trace_id`
219 * * `name` (`name` field of root span in the trace) 220 /// * `name` (`name` field of root span in the trace)
220 * * `duration` (difference between `end_time` and `start_time` fields of 221 /// * `duration` (difference between `end_time` and `start_time` fields of
221 * the root span) 222 /// the root span)
222 * * `start` (`start_time` field of the root span) 223 /// * `start` (`start_time` field of the root span)
223 * 224 ///
224 * Descending order can be specified by appending `desc` to the sort field 225 /// Descending order can be specified by appending `desc` to the sort field
225 * (for example, `name desc`). 226 /// (for example, `name desc`).
226 * 227 ///
227 * Only one sort field is permitted. 228 /// Only one sort field is permitted.
228 * 229 ///
229 * Completes with a [ListTracesResponse]. 230 /// Completes with a [ListTracesResponse].
230 * 231 ///
231 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 232 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
232 * error. 233 /// an error.
233 * 234 ///
234 * If the used [http.Client] completes with an error when making a REST call, 235 /// If the used [http.Client] completes with an error when making a REST
235 * this method will complete with the same error. 236 /// call, this method will complete with the same error.
236 */ 237 async.Future<ListTracesResponse> list(core.String projectId,
237 async.Future<ListTracesResponse> list(core.String projectId, {core.String filt er, core.String endTime, core.String pageToken, core.String startTime, core.int pageSize, core.String view, core.String orderBy}) { 238 {core.String filter,
239 core.String endTime,
240 core.String startTime,
241 core.String pageToken,
242 core.int pageSize,
243 core.String view,
244 core.String orderBy}) {
238 var _url = null; 245 var _url = null;
239 var _queryParams = new core.Map(); 246 var _queryParams = new core.Map();
240 var _uploadMedia = null; 247 var _uploadMedia = null;
241 var _uploadOptions = null; 248 var _uploadOptions = null;
242 var _downloadOptions = commons.DownloadOptions.Metadata; 249 var _downloadOptions = commons.DownloadOptions.Metadata;
243 var _body = null; 250 var _body = null;
244 251
245 if (projectId == null) { 252 if (projectId == null) {
246 throw new core.ArgumentError("Parameter projectId is required."); 253 throw new core.ArgumentError("Parameter projectId is required.");
247 } 254 }
248 if (filter != null) { 255 if (filter != null) {
249 _queryParams["filter"] = [filter]; 256 _queryParams["filter"] = [filter];
250 } 257 }
251 if (endTime != null) { 258 if (endTime != null) {
252 _queryParams["endTime"] = [endTime]; 259 _queryParams["endTime"] = [endTime];
253 } 260 }
261 if (startTime != null) {
262 _queryParams["startTime"] = [startTime];
263 }
254 if (pageToken != null) { 264 if (pageToken != null) {
255 _queryParams["pageToken"] = [pageToken]; 265 _queryParams["pageToken"] = [pageToken];
256 } 266 }
257 if (startTime != null) {
258 _queryParams["startTime"] = [startTime];
259 }
260 if (pageSize != null) { 267 if (pageSize != null) {
261 _queryParams["pageSize"] = ["${pageSize}"]; 268 _queryParams["pageSize"] = ["${pageSize}"];
262 } 269 }
263 if (view != null) { 270 if (view != null) {
264 _queryParams["view"] = [view]; 271 _queryParams["view"] = [view];
265 } 272 }
266 if (orderBy != null) { 273 if (orderBy != null) {
267 _queryParams["orderBy"] = [orderBy]; 274 _queryParams["orderBy"] = [orderBy];
268 } 275 }
269 276
270 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trac es'; 277 _url = 'v1/projects/' +
278 commons.Escaper.ecapeVariable('$projectId') +
279 '/traces';
271 280
272 var _response = _requester.request(_url, 281 var _response = _requester.request(_url, "GET",
273 "GET", 282 body: _body,
274 body: _body, 283 queryParams: _queryParams,
275 queryParams: _queryParams, 284 uploadOptions: _uploadOptions,
276 uploadOptions: _uploadOptions, 285 uploadMedia: _uploadMedia,
277 uploadMedia: _uploadMedia, 286 downloadOptions: _downloadOptions);
278 downloadOptions: _downloadOptions);
279 return _response.then((data) => new ListTracesResponse.fromJson(data)); 287 return _response.then((data) => new ListTracesResponse.fromJson(data));
280 } 288 }
281
282 } 289 }
283 290
284 291 /// A generic empty message that you can re-use to avoid defining duplicated
285 292 /// empty messages in your APIs. A typical example is to use it as the request
286 /** 293 /// or the response type of an API method. For instance:
287 * A generic empty message that you can re-use to avoid defining duplicated 294 ///
288 * empty messages in your APIs. A typical example is to use it as the request 295 /// service Foo {
289 * or the response type of an API method. For instance: 296 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
290 * 297 /// }
291 * service Foo { 298 ///
292 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 299 /// The JSON representation for `Empty` is empty JSON object `{}`.
293 * }
294 *
295 * The JSON representation for `Empty` is empty JSON object `{}`.
296 */
297 class Empty { 300 class Empty {
298
299 Empty(); 301 Empty();
300 302
301 Empty.fromJson(core.Map _json) { 303 Empty.fromJson(core.Map _json) {}
302 }
303 304
304 core.Map<core.String, core.Object> toJson() { 305 core.Map<core.String, core.Object> toJson() {
305 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 306 final core.Map<core.String, core.Object> _json =
307 new core.Map<core.String, core.Object>();
306 return _json; 308 return _json;
307 } 309 }
308 } 310 }
309 311
310 /** The response message for the `ListTraces` method. */ 312 /// The response message for the `ListTraces` method.
311 class ListTracesResponse { 313 class ListTracesResponse {
312 /** 314 /// 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 315 /// 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 316 /// retrieving additional traces.
315 * retrieving additional traces.
316 */
317 core.String nextPageToken; 317 core.String nextPageToken;
318 /** List of trace records returned. */ 318
319 /// List of trace records returned.
319 core.List<Trace> traces; 320 core.List<Trace> traces;
320 321
321 ListTracesResponse(); 322 ListTracesResponse();
322 323
323 ListTracesResponse.fromJson(core.Map _json) { 324 ListTracesResponse.fromJson(core.Map _json) {
324 if (_json.containsKey("nextPageToken")) { 325 if (_json.containsKey("nextPageToken")) {
325 nextPageToken = _json["nextPageToken"]; 326 nextPageToken = _json["nextPageToken"];
326 } 327 }
327 if (_json.containsKey("traces")) { 328 if (_json.containsKey("traces")) {
328 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList( ); 329 traces =
330 _json["traces"].map((value) => new Trace.fromJson(value)).toList();
329 } 331 }
330 } 332 }
331 333
332 core.Map<core.String, core.Object> toJson() { 334 core.Map<core.String, core.Object> toJson() {
333 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 335 final core.Map<core.String, core.Object> _json =
336 new core.Map<core.String, core.Object>();
334 if (nextPageToken != null) { 337 if (nextPageToken != null) {
335 _json["nextPageToken"] = nextPageToken; 338 _json["nextPageToken"] = nextPageToken;
336 } 339 }
337 if (traces != null) { 340 if (traces != null) {
338 _json["traces"] = traces.map((value) => (value).toJson()).toList(); 341 _json["traces"] = traces.map((value) => (value).toJson()).toList();
339 } 342 }
340 return _json; 343 return _json;
341 } 344 }
342 } 345 }
343 346
344 /** 347 /// A trace describes how long it takes for an application to perform an
345 * A trace describes how long it takes for an application to perform an 348 /// operation. It consists of a set of spans, each of which represent a single
346 * operation. It consists of a set of spans, each of which represent a single 349 /// timed event within the operation.
347 * timed event within the operation.
348 */
349 class Trace { 350 class Trace {
350 /** Project ID of the Cloud project where the trace data is stored. */ 351 /// Project ID of the Cloud project where the trace data is stored.
351 core.String projectId; 352 core.String projectId;
352 /** Collection of spans in the trace. */ 353
354 /// Collection of spans in the trace.
353 core.List<TraceSpan> spans; 355 core.List<TraceSpan> spans;
354 /** 356
355 * Globally unique identifier for the trace. This identifier is a 128-bit 357 /// Globally unique identifier for the trace. This identifier is a 128-bit
356 * numeric value formatted as a 32-byte hex string. 358 /// numeric value formatted as a 32-byte hex string.
357 */
358 core.String traceId; 359 core.String traceId;
359 360
360 Trace(); 361 Trace();
361 362
362 Trace.fromJson(core.Map _json) { 363 Trace.fromJson(core.Map _json) {
363 if (_json.containsKey("projectId")) { 364 if (_json.containsKey("projectId")) {
364 projectId = _json["projectId"]; 365 projectId = _json["projectId"];
365 } 366 }
366 if (_json.containsKey("spans")) { 367 if (_json.containsKey("spans")) {
367 spans = _json["spans"].map((value) => new TraceSpan.fromJson(value)).toLis t(); 368 spans =
369 _json["spans"].map((value) => new TraceSpan.fromJson(value)).toList();
368 } 370 }
369 if (_json.containsKey("traceId")) { 371 if (_json.containsKey("traceId")) {
370 traceId = _json["traceId"]; 372 traceId = _json["traceId"];
371 } 373 }
372 } 374 }
373 375
374 core.Map<core.String, core.Object> toJson() { 376 core.Map<core.String, core.Object> toJson() {
375 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 377 final core.Map<core.String, core.Object> _json =
378 new core.Map<core.String, core.Object>();
376 if (projectId != null) { 379 if (projectId != null) {
377 _json["projectId"] = projectId; 380 _json["projectId"] = projectId;
378 } 381 }
379 if (spans != null) { 382 if (spans != null) {
380 _json["spans"] = spans.map((value) => (value).toJson()).toList(); 383 _json["spans"] = spans.map((value) => (value).toJson()).toList();
381 } 384 }
382 if (traceId != null) { 385 if (traceId != null) {
383 _json["traceId"] = traceId; 386 _json["traceId"] = traceId;
384 } 387 }
385 return _json; 388 return _json;
386 } 389 }
387 } 390 }
388 391
389 /** 392 /// A span represents a single timed event within a trace. Spans can be nested
390 * A span represents a single timed event within a trace. Spans can be nested 393 /// and form a trace tree. Often, a trace contains a root span that describes
391 * and form a trace tree. Often, a trace contains a root span that describes the 394 /// the
392 * end-to-end latency of an operation and, optionally, one or more subspans for 395 /// end-to-end latency of an operation and, optionally, one or more subspans
393 * its suboperations. Spans do not need to be contiguous. There may be gaps 396 /// for
394 * between spans in a trace. 397 /// its suboperations. Spans do not need to be contiguous. There may be gaps
395 */ 398 /// between spans in a trace.
396 class TraceSpan { 399 class TraceSpan {
397 /** End time of the span in nanoseconds from the UNIX epoch. */ 400 /// End time of the span in nanoseconds from the UNIX epoch.
398 core.String endTime; 401 core.String endTime;
399 /** 402
400 * Distinguishes between spans generated in a particular context. For example, 403 /// Distinguishes between spans generated in a particular context. For
401 * two spans with the same name may be distinguished using `RPC_CLIENT` 404 /// example,
402 * and `RPC_SERVER` to identify queueing latency associated with the span. 405 /// two spans with the same name may be distinguished using `RPC_CLIENT`
403 * Possible string values are: 406 /// and `RPC_SERVER` to identify queueing latency associated with the span.
404 * - "SPAN_KIND_UNSPECIFIED" : Unspecified. 407 /// Possible string values are:
405 * - "RPC_SERVER" : Indicates that the span covers server-side handling of an 408 /// - "SPAN_KIND_UNSPECIFIED" : Unspecified.
406 * RPC or other 409 /// - "RPC_SERVER" : Indicates that the span covers server-side handling of
407 * remote network request. 410 /// an RPC or other
408 * - "RPC_CLIENT" : Indicates that the span covers the client-side wrapper 411 /// remote network request.
409 * around an RPC or 412 /// - "RPC_CLIENT" : Indicates that the span covers the client-side wrapper
410 * other remote request. 413 /// around an RPC or
411 */ 414 /// other remote request.
412 core.String kind; 415 core.String kind;
413 /** 416
414 * Collection of labels associated with the span. Label keys must be less than 417 /// Collection of labels associated with the span. Label keys must be less
415 * 128 bytes. Label values must be less than 16 kilobytes (10MB for 418 /// than
416 * `/stacktrace` values). 419 /// 128 bytes. Label values must be less than 16 kilobytes (10MB for
417 * 420 /// `/stacktrace` values).
418 * Some predefined label keys exist, or you may create your own. When creating 421 ///
419 * your own, we recommend the following formats: 422 /// Some predefined label keys exist, or you may create your own. When
420 * 423 /// creating
421 * * `/category/product/key` for agents of well-known products (e.g. 424 /// your own, we recommend the following formats:
422 * `/db/mongodb/read_size`). 425 ///
423 * * `short_host/path/key` for domain-specific keys (e.g. 426 /// * `/category/product/key` for agents of well-known products (e.g.
424 * `foo.com/myproduct/bar`) 427 /// `/db/mongodb/read_size`).
425 * 428 /// * `short_host/path/key` for domain-specific keys (e.g.
426 * Predefined labels include: 429 /// `foo.com/myproduct/bar`)
427 * 430 ///
428 * * `/agent` 431 /// Predefined labels include:
429 * * `/component` 432 ///
430 * * `/error/message` 433 /// * `/agent`
431 * * `/error/name` 434 /// * `/component`
432 * * `/http/client_city` 435 /// * `/error/message`
433 * * `/http/client_country` 436 /// * `/error/name`
434 * * `/http/client_protocol` 437 /// * `/http/client_city`
435 * * `/http/client_region` 438 /// * `/http/client_country`
436 * * `/http/host` 439 /// * `/http/client_protocol`
437 * * `/http/method` 440 /// * `/http/client_region`
438 * * `/http/redirected_url` 441 /// * `/http/host`
439 * * `/http/request/size` 442 /// * `/http/method`
440 * * `/http/response/size` 443 /// * `/http/redirected_url`
441 * * `/http/status_code` 444 /// * `/http/request/size`
442 * * `/http/url` 445 /// * `/http/response/size`
443 * * `/http/user_agent` 446 /// * `/http/status_code`
444 * * `/pid` 447 /// * `/http/url`
445 * * `/stacktrace` 448 /// * `/http/user_agent`
446 * * `/tid` 449 /// * `/pid`
447 */ 450 /// * `/stacktrace`
451 /// * `/tid`
448 core.Map<core.String, core.String> labels; 452 core.Map<core.String, core.String> labels;
449 /** 453
450 * Name of the span. Must be less than 128 bytes. The span name is sanitized 454 /// Name of the span. Must be less than 128 bytes. The span name is sanitized
451 * and displayed in the Stackdriver Trace tool in the 455 /// and displayed in the Stackdriver Trace tool in the
452 * {% dynamic print site_values.console_name %}. 456 /// {% dynamic print site_values.console_name %}.
453 * The name may be a method name or some other per-call site name. 457 /// The name may be a method name or some other per-call site name.
454 * For the same executable and the same call point, a best practice is 458 /// For the same executable and the same call point, a best practice is
455 * to use a consistent name, which makes it easier to correlate 459 /// to use a consistent name, which makes it easier to correlate
456 * cross-trace spans. 460 /// cross-trace spans.
457 */
458 core.String name; 461 core.String name;
459 /** ID of the parent span, if any. Optional. */ 462
463 /// ID of the parent span, if any. Optional.
460 core.String parentSpanId; 464 core.String parentSpanId;
461 /** 465
462 * Identifier for the span. Must be a 64-bit integer other than 0 and 466 /// Identifier for the span. Must be a 64-bit integer other than 0 and
463 * unique within a trace. 467 /// unique within a trace.
464 */
465 core.String spanId; 468 core.String spanId;
466 /** Start time of the span in nanoseconds from the UNIX epoch. */ 469
470 /// Start time of the span in nanoseconds from the UNIX epoch.
467 core.String startTime; 471 core.String startTime;
468 472
469 TraceSpan(); 473 TraceSpan();
470 474
471 TraceSpan.fromJson(core.Map _json) { 475 TraceSpan.fromJson(core.Map _json) {
472 if (_json.containsKey("endTime")) { 476 if (_json.containsKey("endTime")) {
473 endTime = _json["endTime"]; 477 endTime = _json["endTime"];
474 } 478 }
475 if (_json.containsKey("kind")) { 479 if (_json.containsKey("kind")) {
476 kind = _json["kind"]; 480 kind = _json["kind"];
477 } 481 }
478 if (_json.containsKey("labels")) { 482 if (_json.containsKey("labels")) {
479 labels = _json["labels"]; 483 labels = _json["labels"];
480 } 484 }
481 if (_json.containsKey("name")) { 485 if (_json.containsKey("name")) {
482 name = _json["name"]; 486 name = _json["name"];
483 } 487 }
484 if (_json.containsKey("parentSpanId")) { 488 if (_json.containsKey("parentSpanId")) {
485 parentSpanId = _json["parentSpanId"]; 489 parentSpanId = _json["parentSpanId"];
486 } 490 }
487 if (_json.containsKey("spanId")) { 491 if (_json.containsKey("spanId")) {
488 spanId = _json["spanId"]; 492 spanId = _json["spanId"];
489 } 493 }
490 if (_json.containsKey("startTime")) { 494 if (_json.containsKey("startTime")) {
491 startTime = _json["startTime"]; 495 startTime = _json["startTime"];
492 } 496 }
493 } 497 }
494 498
495 core.Map<core.String, core.Object> toJson() { 499 core.Map<core.String, core.Object> toJson() {
496 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 500 final core.Map<core.String, core.Object> _json =
501 new core.Map<core.String, core.Object>();
497 if (endTime != null) { 502 if (endTime != null) {
498 _json["endTime"] = endTime; 503 _json["endTime"] = endTime;
499 } 504 }
500 if (kind != null) { 505 if (kind != null) {
501 _json["kind"] = kind; 506 _json["kind"] = kind;
502 } 507 }
503 if (labels != null) { 508 if (labels != null) {
504 _json["labels"] = labels; 509 _json["labels"] = labels;
505 } 510 }
506 if (name != null) { 511 if (name != null) {
507 _json["name"] = name; 512 _json["name"] = name;
508 } 513 }
509 if (parentSpanId != null) { 514 if (parentSpanId != null) {
510 _json["parentSpanId"] = parentSpanId; 515 _json["parentSpanId"] = parentSpanId;
511 } 516 }
512 if (spanId != null) { 517 if (spanId != null) {
513 _json["spanId"] = spanId; 518 _json["spanId"] = spanId;
514 } 519 }
515 if (startTime != null) { 520 if (startTime != null) {
516 _json["startTime"] = startTime; 521 _json["startTime"] = startTime;
517 } 522 }
518 return _json; 523 return _json;
519 } 524 }
520 } 525 }
521 526
522 /** List of new or updated traces. */ 527 /// List of new or updated traces.
523 class Traces { 528 class Traces {
524 /** List of traces. */ 529 /// List of traces.
525 core.List<Trace> traces; 530 core.List<Trace> traces;
526 531
527 Traces(); 532 Traces();
528 533
529 Traces.fromJson(core.Map _json) { 534 Traces.fromJson(core.Map _json) {
530 if (_json.containsKey("traces")) { 535 if (_json.containsKey("traces")) {
531 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList( ); 536 traces =
537 _json["traces"].map((value) => new Trace.fromJson(value)).toList();
532 } 538 }
533 } 539 }
534 540
535 core.Map<core.String, core.Object> toJson() { 541 core.Map<core.String, core.Object> toJson() {
536 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 542 final core.Map<core.String, core.Object> _json =
543 new core.Map<core.String, core.Object>();
537 if (traces != null) { 544 if (traces != null) {
538 _json["traces"] = traces.map((value) => (value).toJson()).toList(); 545 _json["traces"] = traces.map((value) => (value).toJson()).toList();
539 } 546 }
540 return _json; 547 return _json;
541 } 548 }
542 } 549 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/cloudresourcemanager/v2beta1.dart ('k') | generated/googleapis/lib/cloudtrace/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698