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; |
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/v2'; | 15 const core.String USER_AGENT = 'dart-api-client cloudtrace/v2'; |
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 |
52 | |
53 class ProjectsTracesResourceApi { | 54 class ProjectsTracesResourceApi { |
54 final commons.ApiRequester _requester; | 55 final commons.ApiRequester _requester; |
55 | 56 |
56 ProjectsTracesSpansResourceApi get spans => new ProjectsTracesSpansResourceApi
(_requester); | 57 ProjectsTracesSpansResourceApi get spans => |
| 58 new ProjectsTracesSpansResourceApi(_requester); |
57 | 59 |
58 ProjectsTracesResourceApi(commons.ApiRequester client) : | 60 ProjectsTracesResourceApi(commons.ApiRequester client) : _requester = client; |
59 _requester = client; | |
60 | 61 |
61 /** | 62 /// Sends new spans to Stackdriver Trace or updates existing traces. If the |
62 * Sends new spans to Stackdriver Trace or updates existing traces. If the | 63 /// name of a trace that you send matches that of an existing trace, new |
63 * name of a trace that you send matches that of an existing trace, new spans | 64 /// spans |
64 * are added to the existing trace. Attempt to update existing spans results | 65 /// are added to the existing trace. Attempt to update existing spans results |
65 * undefined behavior. If the name does not match, a new trace is created | 66 /// undefined behavior. If the name does not match, a new trace is created |
66 * with given set of spans. | 67 /// with given set of spans. |
67 * | 68 /// |
68 * [request] - The metadata request object. | 69 /// [request] - The metadata request object. |
69 * | 70 /// |
70 * Request parameters: | 71 /// Request parameters: |
71 * | 72 /// |
72 * [name] - Required. Name of the project where the spans belong. The format | 73 /// [name] - Required. Name of the project where the spans belong. The format |
73 * is | 74 /// is |
74 * `projects/PROJECT_ID`. | 75 /// `projects/PROJECT_ID`. |
75 * Value must have pattern "^projects/[^/]+$". | 76 /// Value must have pattern "^projects/[^/]+$". |
76 * | 77 /// |
77 * Completes with a [Empty]. | 78 /// Completes with a [Empty]. |
78 * | 79 /// |
79 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 80 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
80 * error. | 81 /// an error. |
81 * | 82 /// |
82 * If the used [http.Client] completes with an error when making a REST call, | 83 /// If the used [http.Client] completes with an error when making a REST |
83 * this method will complete with the same error. | 84 /// call, this method will complete with the same error. |
84 */ | 85 async.Future<Empty> batchWrite( |
85 async.Future<Empty> batchWrite(BatchWriteSpansRequest request, core.String nam
e) { | 86 BatchWriteSpansRequest request, core.String name) { |
86 var _url = null; | 87 var _url = null; |
87 var _queryParams = new core.Map(); | 88 var _queryParams = new core.Map(); |
88 var _uploadMedia = null; | 89 var _uploadMedia = null; |
89 var _uploadOptions = null; | 90 var _uploadOptions = null; |
90 var _downloadOptions = commons.DownloadOptions.Metadata; | 91 var _downloadOptions = commons.DownloadOptions.Metadata; |
91 var _body = null; | 92 var _body = null; |
92 | 93 |
93 if (request != null) { | 94 if (request != null) { |
94 _body = convert.JSON.encode((request).toJson()); | 95 _body = convert.JSON.encode((request).toJson()); |
95 } | 96 } |
96 if (name == null) { | 97 if (name == null) { |
97 throw new core.ArgumentError("Parameter name is required."); | 98 throw new core.ArgumentError("Parameter name is required."); |
98 } | 99 } |
99 | 100 |
100 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name') + '/traces:bat
chWrite'; | 101 _url = 'v2/' + |
| 102 commons.Escaper.ecapeVariableReserved('$name') + |
| 103 '/traces:batchWrite'; |
101 | 104 |
102 var _response = _requester.request(_url, | 105 var _response = _requester.request(_url, "POST", |
103 "POST", | 106 body: _body, |
104 body: _body, | 107 queryParams: _queryParams, |
105 queryParams: _queryParams, | 108 uploadOptions: _uploadOptions, |
106 uploadOptions: _uploadOptions, | 109 uploadMedia: _uploadMedia, |
107 uploadMedia: _uploadMedia, | 110 downloadOptions: _downloadOptions); |
108 downloadOptions: _downloadOptions); | |
109 return _response.then((data) => new Empty.fromJson(data)); | 111 return _response.then((data) => new Empty.fromJson(data)); |
110 } | 112 } |
111 | 113 |
112 /** | 114 /// 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. | 115 /// |
114 * | 116 /// Request parameters: |
115 * Request parameters: | 117 /// |
116 * | 118 /// [parent] - Required. The project where the trace data is stored. The |
117 * [parent] - Required. The project where the trace data is stored. The format | 119 /// format |
118 * is `projects/PROJECT_ID`. | 120 /// is `projects/PROJECT_ID`. |
119 * Value must have pattern "^projects/[^/]+$". | 121 /// Value must have pattern "^projects/[^/]+$". |
120 * | 122 /// |
121 * [filter] - Opional. Return only traces that match this | 123 /// [orderBy] - Optional. A single field used to sort the returned traces. |
122 * [trace filter](/trace/docs/trace-filters). Example: | 124 /// Only the following field names can be used: |
123 * | 125 /// |
124 * "label:/http/url root:/_ah/background my_label:17" | 126 /// * `trace_id`: the trace's ID field |
125 * | 127 /// * `name`: the root span's resource name |
126 * [endTime] - Optional. Do not return traces whose start time is later than | 128 /// * `duration`: the difference between the root span's start time and end |
127 * this time. | 129 /// time |
128 * | 130 /// * `start`: the start time of the root span |
129 * [startTime] - Optional. Do not return traces whose end time is earlier than | 131 /// |
130 * this time. | 132 /// Sorting is in ascending order unless `desc` is appended to the sort field |
131 * | 133 /// name. |
132 * [pageToken] - Optional. If present, then retrieve the next batch of results | 134 /// Example: `"name desc"`). |
133 * from the | 135 /// |
134 * preceding call to this method. `page_token` must be the value of | 136 /// [filter] - Opional. Return only traces that match this |
135 * `next_page_token` from the previous response. The values of other method | 137 /// [trace filter](/trace/docs/trace-filters). Example: |
136 * parameters should be identical to those in the previous call. | 138 /// |
137 * | 139 /// "label:/http/url root:/_ah/background my_label:17" |
138 * [pageSize] - Optional. The maximum number of results to return from this | 140 /// |
139 * request. | 141 /// [endTime] - Optional. Do not return traces whose start time is later than |
140 * Non-positive values are ignored. The presence of `next_page_token` in the | 142 /// this time. |
141 * response indicates that more results might be available, even if fewer than | 143 /// |
142 * the maximum number of results is returned by this request. | 144 /// [pageToken] - Optional. If present, then retrieve the next batch of |
143 * | 145 /// results from the |
144 * [orderBy] - Optional. A single field used to sort the returned traces. | 146 /// preceding call to this method. `page_token` must be the value of |
145 * Only the following field names can be used: | 147 /// `next_page_token` from the previous response. The values of other method |
146 * | 148 /// parameters should be identical to those in the previous call. |
147 * * `trace_id`: the trace's ID field | 149 /// |
148 * * `name`: the root span's resource name | 150 /// [startTime] - Optional. Do not return traces whose end time is earlier |
149 * * `duration`: the difference between the root span's start time and end | 151 /// than this time. |
150 * time | 152 /// |
151 * * `start`: the start time of the root span | 153 /// [pageSize] - Optional. The maximum number of results to return from this |
152 * | 154 /// request. |
153 * Sorting is in ascending order unless `desc` is appended to the sort field | 155 /// Non-positive values are ignored. The presence of `next_page_token` in the |
154 * name. | 156 /// response indicates that more results might be available, even if fewer |
155 * Example: `"name desc"`). | 157 /// than |
156 * | 158 /// the maximum number of results is returned by this request. |
157 * Completes with a [ListTracesResponse]. | 159 /// |
158 * | 160 /// Completes with a [ListTracesResponse]. |
159 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 161 /// |
160 * error. | 162 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
161 * | 163 /// an error. |
162 * If the used [http.Client] completes with an error when making a REST call, | 164 /// |
163 * this method will complete with the same error. | 165 /// If the used [http.Client] completes with an error when making a REST |
164 */ | 166 /// call, this method will complete with the same error. |
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}) { | 167 async.Future<ListTracesResponse> list(core.String parent, |
| 168 {core.String orderBy, |
| 169 core.String filter, |
| 170 core.String endTime, |
| 171 core.String pageToken, |
| 172 core.String startTime, |
| 173 core.int pageSize}) { |
166 var _url = null; | 174 var _url = null; |
167 var _queryParams = new core.Map(); | 175 var _queryParams = new core.Map(); |
168 var _uploadMedia = null; | 176 var _uploadMedia = null; |
169 var _uploadOptions = null; | 177 var _uploadOptions = null; |
170 var _downloadOptions = commons.DownloadOptions.Metadata; | 178 var _downloadOptions = commons.DownloadOptions.Metadata; |
171 var _body = null; | 179 var _body = null; |
172 | 180 |
173 if (parent == null) { | 181 if (parent == null) { |
174 throw new core.ArgumentError("Parameter parent is required."); | 182 throw new core.ArgumentError("Parameter parent is required."); |
175 } | 183 } |
| 184 if (orderBy != null) { |
| 185 _queryParams["orderBy"] = [orderBy]; |
| 186 } |
176 if (filter != null) { | 187 if (filter != null) { |
177 _queryParams["filter"] = [filter]; | 188 _queryParams["filter"] = [filter]; |
178 } | 189 } |
179 if (endTime != null) { | 190 if (endTime != null) { |
180 _queryParams["endTime"] = [endTime]; | 191 _queryParams["endTime"] = [endTime]; |
181 } | 192 } |
| 193 if (pageToken != null) { |
| 194 _queryParams["pageToken"] = [pageToken]; |
| 195 } |
182 if (startTime != null) { | 196 if (startTime != null) { |
183 _queryParams["startTime"] = [startTime]; | 197 _queryParams["startTime"] = [startTime]; |
184 } | 198 } |
185 if (pageToken != null) { | |
186 _queryParams["pageToken"] = [pageToken]; | |
187 } | |
188 if (pageSize != null) { | 199 if (pageSize != null) { |
189 _queryParams["pageSize"] = ["${pageSize}"]; | 200 _queryParams["pageSize"] = ["${pageSize}"]; |
190 } | 201 } |
191 if (orderBy != null) { | |
192 _queryParams["orderBy"] = [orderBy]; | |
193 } | |
194 | 202 |
195 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/traces'; | 203 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + '/traces'; |
196 | 204 |
197 var _response = _requester.request(_url, | 205 var _response = _requester.request(_url, "GET", |
198 "GET", | 206 body: _body, |
199 body: _body, | 207 queryParams: _queryParams, |
200 queryParams: _queryParams, | 208 uploadOptions: _uploadOptions, |
201 uploadOptions: _uploadOptions, | 209 uploadMedia: _uploadMedia, |
202 uploadMedia: _uploadMedia, | 210 downloadOptions: _downloadOptions); |
203 downloadOptions: _downloadOptions); | |
204 return _response.then((data) => new ListTracesResponse.fromJson(data)); | 211 return _response.then((data) => new ListTracesResponse.fromJson(data)); |
205 } | 212 } |
206 | 213 |
207 /** | 214 /// Returns a list of spans within a trace. |
208 * Returns a list of spans within a trace. | 215 /// |
209 * | 216 /// Request parameters: |
210 * Request parameters: | 217 /// |
211 * | 218 /// [parent] - Required: The resource name of the trace containing the spans |
212 * [parent] - Required: The resource name of the trace containing the spans to | 219 /// to list. |
213 * list. | 220 /// The format is `projects/PROJECT_ID/traces/TRACE_ID`. |
214 * The format is `projects/PROJECT_ID/traces/TRACE_ID`. | 221 /// Value must have pattern "^projects/[^/]+/traces/[^/]+$". |
215 * Value must have pattern "^projects/[^/]+/traces/[^/]+$". | 222 /// |
216 * | 223 /// [pageToken] - Optional. If present, then retrieve the next batch of |
217 * [pageToken] - Optional. If present, then retrieve the next batch of results | 224 /// results from the |
218 * from the | 225 /// preceding call to this method. `page_token` must be the value of |
219 * preceding call to this method. `page_token` must be the value of | 226 /// `next_page_token` from the previous response. The values of other method |
220 * `next_page_token` from the previous response. The values of other method | 227 /// parameters should be identical to those in the previous call. |
221 * parameters should be identical to those in the previous call. | 228 /// |
222 * | 229 /// Completes with a [ListSpansResponse]. |
223 * Completes with a [ListSpansResponse]. | 230 /// |
224 * | 231 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
225 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 232 /// an error. |
226 * error. | 233 /// |
227 * | 234 /// If the used [http.Client] completes with an error when making a REST |
228 * If the used [http.Client] completes with an error when making a REST call, | 235 /// call, this method will complete with the same error. |
229 * this method will complete with the same error. | 236 async.Future<ListSpansResponse> listSpans(core.String parent, |
230 */ | 237 {core.String pageToken}) { |
231 async.Future<ListSpansResponse> listSpans(core.String parent, {core.String pag
eToken}) { | |
232 var _url = null; | 238 var _url = null; |
233 var _queryParams = new core.Map(); | 239 var _queryParams = new core.Map(); |
234 var _uploadMedia = null; | 240 var _uploadMedia = null; |
235 var _uploadOptions = null; | 241 var _uploadOptions = null; |
236 var _downloadOptions = commons.DownloadOptions.Metadata; | 242 var _downloadOptions = commons.DownloadOptions.Metadata; |
237 var _body = null; | 243 var _body = null; |
238 | 244 |
239 if (parent == null) { | 245 if (parent == null) { |
240 throw new core.ArgumentError("Parameter parent is required."); | 246 throw new core.ArgumentError("Parameter parent is required."); |
241 } | 247 } |
242 if (pageToken != null) { | 248 if (pageToken != null) { |
243 _queryParams["pageToken"] = [pageToken]; | 249 _queryParams["pageToken"] = [pageToken]; |
244 } | 250 } |
245 | 251 |
246 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + ':listSpan
s'; | 252 _url = |
| 253 'v2/' + commons.Escaper.ecapeVariableReserved('$parent') + ':listSpans'; |
247 | 254 |
248 var _response = _requester.request(_url, | 255 var _response = _requester.request(_url, "GET", |
249 "GET", | 256 body: _body, |
250 body: _body, | 257 queryParams: _queryParams, |
251 queryParams: _queryParams, | 258 uploadOptions: _uploadOptions, |
252 uploadOptions: _uploadOptions, | 259 uploadMedia: _uploadMedia, |
253 uploadMedia: _uploadMedia, | 260 downloadOptions: _downloadOptions); |
254 downloadOptions: _downloadOptions); | |
255 return _response.then((data) => new ListSpansResponse.fromJson(data)); | 261 return _response.then((data) => new ListSpansResponse.fromJson(data)); |
256 } | 262 } |
257 | |
258 } | 263 } |
259 | 264 |
260 | |
261 class ProjectsTracesSpansResourceApi { | 265 class ProjectsTracesSpansResourceApi { |
262 final commons.ApiRequester _requester; | 266 final commons.ApiRequester _requester; |
263 | 267 |
264 ProjectsTracesSpansResourceApi(commons.ApiRequester client) : | 268 ProjectsTracesSpansResourceApi(commons.ApiRequester client) |
265 _requester = client; | 269 : _requester = client; |
266 | 270 |
267 /** | 271 /// Creates a new Span. |
268 * Creates a new Span. | 272 /// |
269 * | 273 /// [request] - The metadata request object. |
270 * [request] - The metadata request object. | 274 /// |
271 * | 275 /// Request parameters: |
272 * Request parameters: | 276 /// |
273 * | 277 /// [name] - The resource name of the span in the following format: |
274 * [name] - The resource name of the span in the following format: | 278 /// |
275 * | 279 /// projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique |
276 * projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier | 280 /// identifier for a trace within a project. |
277 * for a trace within a project. | 281 /// [SPAN_ID] is a unique identifier for a span within a trace, |
278 * [SPAN_ID] is a unique identifier for a span within a trace, | 282 /// assigned when the span is created. |
279 * assigned when the span is created. | 283 /// Value must have pattern "^projects/[^/]+/traces/[^/]+/spans/[^/]+$". |
280 * Value must have pattern "^projects/[^/]+/traces/[^/]+/spans/[^/]+$". | 284 /// |
281 * | 285 /// Completes with a [Span]. |
282 * Completes with a [Span]. | 286 /// |
283 * | 287 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
284 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 288 /// an error. |
285 * error. | 289 /// |
286 * | 290 /// If the used [http.Client] completes with an error when making a REST |
287 * If the used [http.Client] completes with an error when making a REST call, | 291 /// call, this method will complete with the same error. |
288 * this method will complete with the same error. | |
289 */ | |
290 async.Future<Span> create(Span request, core.String name) { | 292 async.Future<Span> create(Span request, core.String name) { |
291 var _url = null; | 293 var _url = null; |
292 var _queryParams = new core.Map(); | 294 var _queryParams = new core.Map(); |
293 var _uploadMedia = null; | 295 var _uploadMedia = null; |
294 var _uploadOptions = null; | 296 var _uploadOptions = null; |
295 var _downloadOptions = commons.DownloadOptions.Metadata; | 297 var _downloadOptions = commons.DownloadOptions.Metadata; |
296 var _body = null; | 298 var _body = null; |
297 | 299 |
298 if (request != null) { | 300 if (request != null) { |
299 _body = convert.JSON.encode((request).toJson()); | 301 _body = convert.JSON.encode((request).toJson()); |
300 } | 302 } |
301 if (name == null) { | 303 if (name == null) { |
302 throw new core.ArgumentError("Parameter name is required."); | 304 throw new core.ArgumentError("Parameter name is required."); |
303 } | 305 } |
304 | 306 |
305 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); | 307 _url = 'v2/' + commons.Escaper.ecapeVariableReserved('$name'); |
306 | 308 |
307 var _response = _requester.request(_url, | 309 var _response = _requester.request(_url, "PUT", |
308 "PUT", | 310 body: _body, |
309 body: _body, | 311 queryParams: _queryParams, |
310 queryParams: _queryParams, | 312 uploadOptions: _uploadOptions, |
311 uploadOptions: _uploadOptions, | 313 uploadMedia: _uploadMedia, |
312 uploadMedia: _uploadMedia, | 314 downloadOptions: _downloadOptions); |
313 downloadOptions: _downloadOptions); | |
314 return _response.then((data) => new Span.fromJson(data)); | 315 return _response.then((data) => new Span.fromJson(data)); |
315 } | 316 } |
316 | |
317 } | 317 } |
318 | 318 |
| 319 /// Text annotation with a set of attributes. |
| 320 class Annotation { |
| 321 /// A set of attributes on the annotation. There is a limit of 4 attributes |
| 322 /// per Annotation. |
| 323 Attributes attributes; |
319 | 324 |
320 | 325 /// A user-supplied message describing the event. The maximum length for |
321 /** Text annotation with a set of attributes. */ | 326 /// the description is 256 bytes. |
322 class Annotation { | |
323 /** | |
324 * A set of attributes on the annotation. There is a limit of 4 attributes | |
325 * per Annotation. | |
326 */ | |
327 Attributes attributes; | |
328 /** | |
329 * A user-supplied message describing the event. The maximum length for | |
330 * the description is 256 bytes. | |
331 */ | |
332 TruncatableString description; | 327 TruncatableString description; |
333 | 328 |
334 Annotation(); | 329 Annotation(); |
335 | 330 |
336 Annotation.fromJson(core.Map _json) { | 331 Annotation.fromJson(core.Map _json) { |
337 if (_json.containsKey("attributes")) { | 332 if (_json.containsKey("attributes")) { |
338 attributes = new Attributes.fromJson(_json["attributes"]); | 333 attributes = new Attributes.fromJson(_json["attributes"]); |
339 } | 334 } |
340 if (_json.containsKey("description")) { | 335 if (_json.containsKey("description")) { |
341 description = new TruncatableString.fromJson(_json["description"]); | 336 description = new TruncatableString.fromJson(_json["description"]); |
342 } | 337 } |
343 } | 338 } |
344 | 339 |
345 core.Map<core.String, core.Object> toJson() { | 340 core.Map<core.String, core.Object> toJson() { |
346 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 341 final core.Map<core.String, core.Object> _json = |
| 342 new core.Map<core.String, core.Object>(); |
347 if (attributes != null) { | 343 if (attributes != null) { |
348 _json["attributes"] = (attributes).toJson(); | 344 _json["attributes"] = (attributes).toJson(); |
349 } | 345 } |
350 if (description != null) { | 346 if (description != null) { |
351 _json["description"] = (description).toJson(); | 347 _json["description"] = (description).toJson(); |
352 } | 348 } |
353 return _json; | 349 return _json; |
354 } | 350 } |
355 } | 351 } |
356 | 352 |
357 /** The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. */ | 353 /// The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. |
358 class AttributeValue { | 354 class AttributeValue { |
359 /** A Boolean value represented by `true` or `false`. */ | 355 /// A Boolean value represented by `true` or `false`. |
360 core.bool boolValue; | 356 core.bool boolValue; |
361 /** A 64-bit signed integer. */ | 357 |
| 358 /// A 64-bit signed integer. |
362 core.String intValue; | 359 core.String intValue; |
363 /** A string up to 256 bytes long. */ | 360 |
| 361 /// A string up to 256 bytes long. |
364 TruncatableString stringValue; | 362 TruncatableString stringValue; |
365 | 363 |
366 AttributeValue(); | 364 AttributeValue(); |
367 | 365 |
368 AttributeValue.fromJson(core.Map _json) { | 366 AttributeValue.fromJson(core.Map _json) { |
369 if (_json.containsKey("boolValue")) { | 367 if (_json.containsKey("boolValue")) { |
370 boolValue = _json["boolValue"]; | 368 boolValue = _json["boolValue"]; |
371 } | 369 } |
372 if (_json.containsKey("intValue")) { | 370 if (_json.containsKey("intValue")) { |
373 intValue = _json["intValue"]; | 371 intValue = _json["intValue"]; |
374 } | 372 } |
375 if (_json.containsKey("stringValue")) { | 373 if (_json.containsKey("stringValue")) { |
376 stringValue = new TruncatableString.fromJson(_json["stringValue"]); | 374 stringValue = new TruncatableString.fromJson(_json["stringValue"]); |
377 } | 375 } |
378 } | 376 } |
379 | 377 |
380 core.Map<core.String, core.Object> toJson() { | 378 core.Map<core.String, core.Object> toJson() { |
381 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 379 final core.Map<core.String, core.Object> _json = |
| 380 new core.Map<core.String, core.Object>(); |
382 if (boolValue != null) { | 381 if (boolValue != null) { |
383 _json["boolValue"] = boolValue; | 382 _json["boolValue"] = boolValue; |
384 } | 383 } |
385 if (intValue != null) { | 384 if (intValue != null) { |
386 _json["intValue"] = intValue; | 385 _json["intValue"] = intValue; |
387 } | 386 } |
388 if (stringValue != null) { | 387 if (stringValue != null) { |
389 _json["stringValue"] = (stringValue).toJson(); | 388 _json["stringValue"] = (stringValue).toJson(); |
390 } | 389 } |
391 return _json; | 390 return _json; |
392 } | 391 } |
393 } | 392 } |
394 | 393 |
395 /** A set of attributes, each in the format `[KEY]:[VALUE]`. */ | 394 /// A set of attributes, each in the format `[KEY]:[VALUE]`. |
396 class Attributes { | 395 class Attributes { |
397 /** | 396 /// The set of attributes. Each attribute's key can be up to 128 bytes |
398 * The set of attributes. Each attribute's key can be up to 128 bytes | 397 /// long. The value can be a string up to 256 bytes, an integer, or the |
399 * long. The value can be a string up to 256 bytes, an integer, or the | 398 /// Boolean values `true` and `false`. For example: |
400 * Boolean values `true` and `false`. For example: | 399 /// |
401 * | 400 /// "/instance_id": "my-instance" |
402 * "/instance_id": "my-instance" | 401 /// "/http/user_agent": "" |
403 * "/http/user_agent": "" | 402 /// "/http/request_bytes": 300 |
404 * "/http/request_bytes": 300 | 403 /// "abc.com/myattribute": true |
405 * "abc.com/myattribute": true | |
406 */ | |
407 core.Map<core.String, AttributeValue> attributeMap; | 404 core.Map<core.String, AttributeValue> attributeMap; |
408 /** | 405 |
409 * The number of attributes that were discarded. Attributes can be discarded | 406 /// The number of attributes that were discarded. Attributes can be discarded |
410 * because their keys are too long or because there are too many attributes. | 407 /// because their keys are too long or because there are too many attributes. |
411 * If this value is 0 then all attributes are valid. | 408 /// If this value is 0 then all attributes are valid. |
412 */ | |
413 core.int droppedAttributesCount; | 409 core.int droppedAttributesCount; |
414 | 410 |
415 Attributes(); | 411 Attributes(); |
416 | 412 |
417 Attributes.fromJson(core.Map _json) { | 413 Attributes.fromJson(core.Map _json) { |
418 if (_json.containsKey("attributeMap")) { | 414 if (_json.containsKey("attributeMap")) { |
419 attributeMap = commons.mapMap<core.Map<core.String, core.Object>, Attribut
eValue>(_json["attributeMap"], (core.Map<core.String, core.Object> item) => new
AttributeValue.fromJson(item)); | 415 attributeMap = |
| 416 commons.mapMap<core.Map<core.String, core.Object>, AttributeValue>( |
| 417 _json["attributeMap"], |
| 418 (core.Map<core.String, core.Object> item) => |
| 419 new AttributeValue.fromJson(item)); |
420 } | 420 } |
421 if (_json.containsKey("droppedAttributesCount")) { | 421 if (_json.containsKey("droppedAttributesCount")) { |
422 droppedAttributesCount = _json["droppedAttributesCount"]; | 422 droppedAttributesCount = _json["droppedAttributesCount"]; |
423 } | 423 } |
424 } | 424 } |
425 | 425 |
426 core.Map<core.String, core.Object> toJson() { | 426 core.Map<core.String, core.Object> toJson() { |
427 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 427 final core.Map<core.String, core.Object> _json = |
| 428 new core.Map<core.String, core.Object>(); |
428 if (attributeMap != null) { | 429 if (attributeMap != null) { |
429 _json["attributeMap"] = commons.mapMap<AttributeValue, core.Map<core.Strin
g, core.Object>>(attributeMap, (AttributeValue item) => (item).toJson()); | 430 _json["attributeMap"] = |
| 431 commons.mapMap<AttributeValue, core.Map<core.String, core.Object>>( |
| 432 attributeMap, (AttributeValue item) => (item).toJson()); |
430 } | 433 } |
431 if (droppedAttributesCount != null) { | 434 if (droppedAttributesCount != null) { |
432 _json["droppedAttributesCount"] = droppedAttributesCount; | 435 _json["droppedAttributesCount"] = droppedAttributesCount; |
433 } | 436 } |
434 return _json; | 437 return _json; |
435 } | 438 } |
436 } | 439 } |
437 | 440 |
438 /** The request message for the `BatchWriteSpans` method. */ | 441 /// The request message for the `BatchWriteSpans` method. |
439 class BatchWriteSpansRequest { | 442 class BatchWriteSpansRequest { |
440 /** A collection of spans. */ | 443 /// A collection of spans. |
441 core.List<Span> spans; | 444 core.List<Span> spans; |
442 | 445 |
443 BatchWriteSpansRequest(); | 446 BatchWriteSpansRequest(); |
444 | 447 |
445 BatchWriteSpansRequest.fromJson(core.Map _json) { | 448 BatchWriteSpansRequest.fromJson(core.Map _json) { |
446 if (_json.containsKey("spans")) { | 449 if (_json.containsKey("spans")) { |
447 spans = _json["spans"].map((value) => new Span.fromJson(value)).toList(); | 450 spans = _json["spans"].map((value) => new Span.fromJson(value)).toList(); |
448 } | 451 } |
449 } | 452 } |
450 | 453 |
451 core.Map<core.String, core.Object> toJson() { | 454 core.Map<core.String, core.Object> toJson() { |
452 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 455 final core.Map<core.String, core.Object> _json = |
| 456 new core.Map<core.String, core.Object>(); |
453 if (spans != null) { | 457 if (spans != null) { |
454 _json["spans"] = spans.map((value) => (value).toJson()).toList(); | 458 _json["spans"] = spans.map((value) => (value).toJson()).toList(); |
455 } | 459 } |
456 return _json; | 460 return _json; |
457 } | 461 } |
458 } | 462 } |
459 | 463 |
460 /** | 464 /// A generic empty message that you can re-use to avoid defining duplicated |
461 * A generic empty message that you can re-use to avoid defining duplicated | 465 /// empty messages in your APIs. A typical example is to use it as the request |
462 * empty messages in your APIs. A typical example is to use it as the request | 466 /// or the response type of an API method. For instance: |
463 * or the response type of an API method. For instance: | 467 /// |
464 * | 468 /// service Foo { |
465 * service Foo { | 469 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
466 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 470 /// } |
467 * } | 471 /// |
468 * | 472 /// The JSON representation for `Empty` is empty JSON object `{}`. |
469 * The JSON representation for `Empty` is empty JSON object `{}`. | |
470 */ | |
471 class Empty { | 473 class Empty { |
472 | |
473 Empty(); | 474 Empty(); |
474 | 475 |
475 Empty.fromJson(core.Map _json) { | 476 Empty.fromJson(core.Map _json) {} |
476 } | |
477 | 477 |
478 core.Map<core.String, core.Object> toJson() { | 478 core.Map<core.String, core.Object> toJson() { |
479 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 479 final core.Map<core.String, core.Object> _json = |
| 480 new core.Map<core.String, core.Object>(); |
480 return _json; | 481 return _json; |
481 } | 482 } |
482 } | 483 } |
483 | 484 |
484 /** | 485 /// A pointer from the current span to another span in the same trace or in a |
485 * A pointer from the current span to another span in the same trace or in a | 486 /// different trace. For example, this can be used in batching operations, |
486 * different trace. For example, this can be used in batching operations, | 487 /// where a single batch handler processes multiple requests from different |
487 * where a single batch handler processes multiple requests from different | 488 /// traces or when the handler receives a request from a different project. |
488 * traces or when the handler receives a request from a different project. | |
489 */ | |
490 class Link { | 489 class Link { |
491 /** | 490 /// A set of attributes on the link. There is a limit of 32 attributes per |
492 * A set of attributes on the link. There is a limit of 32 attributes per | 491 /// link. |
493 * link. | |
494 */ | |
495 Attributes attributes; | 492 Attributes attributes; |
496 /** `SPAN_ID` identifies a span within a trace. */ | 493 |
| 494 /// `SPAN_ID` identifies a span within a trace. |
497 core.String spanId; | 495 core.String spanId; |
498 /** `TRACE_ID` identifies a trace within a project. */ | 496 |
| 497 /// `TRACE_ID` identifies a trace within a project. |
499 core.String traceId; | 498 core.String traceId; |
500 /** | 499 |
501 * The relationship of the current span relative to the linked span. | 500 /// The relationship of the current span relative to the linked span. |
502 * Possible string values are: | 501 /// Possible string values are: |
503 * - "TYPE_UNSPECIFIED" : The relationship of the two spans is unknown. | 502 /// - "TYPE_UNSPECIFIED" : The relationship of the two spans is unknown. |
504 * - "CHILD_LINKED_SPAN" : The linked span is a child of the current span. | 503 /// - "CHILD_LINKED_SPAN" : The linked span is a child of the current span. |
505 * - "PARENT_LINKED_SPAN" : The linked span is a parent of the current span. | 504 /// - "PARENT_LINKED_SPAN" : The linked span is a parent of the current span. |
506 */ | |
507 core.String type; | 505 core.String type; |
508 | 506 |
509 Link(); | 507 Link(); |
510 | 508 |
511 Link.fromJson(core.Map _json) { | 509 Link.fromJson(core.Map _json) { |
512 if (_json.containsKey("attributes")) { | 510 if (_json.containsKey("attributes")) { |
513 attributes = new Attributes.fromJson(_json["attributes"]); | 511 attributes = new Attributes.fromJson(_json["attributes"]); |
514 } | 512 } |
515 if (_json.containsKey("spanId")) { | 513 if (_json.containsKey("spanId")) { |
516 spanId = _json["spanId"]; | 514 spanId = _json["spanId"]; |
517 } | 515 } |
518 if (_json.containsKey("traceId")) { | 516 if (_json.containsKey("traceId")) { |
519 traceId = _json["traceId"]; | 517 traceId = _json["traceId"]; |
520 } | 518 } |
521 if (_json.containsKey("type")) { | 519 if (_json.containsKey("type")) { |
522 type = _json["type"]; | 520 type = _json["type"]; |
523 } | 521 } |
524 } | 522 } |
525 | 523 |
526 core.Map<core.String, core.Object> toJson() { | 524 core.Map<core.String, core.Object> toJson() { |
527 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 525 final core.Map<core.String, core.Object> _json = |
| 526 new core.Map<core.String, core.Object>(); |
528 if (attributes != null) { | 527 if (attributes != null) { |
529 _json["attributes"] = (attributes).toJson(); | 528 _json["attributes"] = (attributes).toJson(); |
530 } | 529 } |
531 if (spanId != null) { | 530 if (spanId != null) { |
532 _json["spanId"] = spanId; | 531 _json["spanId"] = spanId; |
533 } | 532 } |
534 if (traceId != null) { | 533 if (traceId != null) { |
535 _json["traceId"] = traceId; | 534 _json["traceId"] = traceId; |
536 } | 535 } |
537 if (type != null) { | 536 if (type != null) { |
538 _json["type"] = type; | 537 _json["type"] = type; |
539 } | 538 } |
540 return _json; | 539 return _json; |
541 } | 540 } |
542 } | 541 } |
543 | 542 |
544 /** | 543 /// A collection of links, which are references from this span to a span |
545 * A collection of links, which are references from this span to a span | 544 /// in the same or different trace. |
546 * in the same or different trace. | |
547 */ | |
548 class Links { | 545 class Links { |
549 /** | 546 /// The number of dropped links after the maximum size was enforced. If |
550 * The number of dropped links after the maximum size was enforced. If | 547 /// this value is 0, then no links were dropped. |
551 * this value is 0, then no links were dropped. | |
552 */ | |
553 core.int droppedLinksCount; | 548 core.int droppedLinksCount; |
554 /** A collection of links. */ | 549 |
| 550 /// A collection of links. |
555 core.List<Link> link; | 551 core.List<Link> link; |
556 | 552 |
557 Links(); | 553 Links(); |
558 | 554 |
559 Links.fromJson(core.Map _json) { | 555 Links.fromJson(core.Map _json) { |
560 if (_json.containsKey("droppedLinksCount")) { | 556 if (_json.containsKey("droppedLinksCount")) { |
561 droppedLinksCount = _json["droppedLinksCount"]; | 557 droppedLinksCount = _json["droppedLinksCount"]; |
562 } | 558 } |
563 if (_json.containsKey("link")) { | 559 if (_json.containsKey("link")) { |
564 link = _json["link"].map((value) => new Link.fromJson(value)).toList(); | 560 link = _json["link"].map((value) => new Link.fromJson(value)).toList(); |
565 } | 561 } |
566 } | 562 } |
567 | 563 |
568 core.Map<core.String, core.Object> toJson() { | 564 core.Map<core.String, core.Object> toJson() { |
569 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 565 final core.Map<core.String, core.Object> _json = |
| 566 new core.Map<core.String, core.Object>(); |
570 if (droppedLinksCount != null) { | 567 if (droppedLinksCount != null) { |
571 _json["droppedLinksCount"] = droppedLinksCount; | 568 _json["droppedLinksCount"] = droppedLinksCount; |
572 } | 569 } |
573 if (link != null) { | 570 if (link != null) { |
574 _json["link"] = link.map((value) => (value).toJson()).toList(); | 571 _json["link"] = link.map((value) => (value).toJson()).toList(); |
575 } | 572 } |
576 return _json; | 573 return _json; |
577 } | 574 } |
578 } | 575 } |
579 | 576 |
580 /** The response message for the `ListSpans` method. */ | 577 /// The response message for the `ListSpans` method. |
581 class ListSpansResponse { | 578 class ListSpansResponse { |
582 /** | 579 /// If defined, indicates that there might be more spans that match the |
583 * If defined, indicates that there might be more spans that match the | 580 /// request. Pass this as the value of `pageToken` in a subsequent request to |
584 * request. Pass this as the value of `pageToken` in a subsequent request to | 581 /// retrieve additional spans. |
585 * retrieve additional spans. | |
586 */ | |
587 core.String nextPageToken; | 582 core.String nextPageToken; |
588 /** The requested spans, if there are any in the specified trace. */ | 583 |
| 584 /// The requested spans, if there are any in the specified trace. |
589 core.List<Span> spans; | 585 core.List<Span> spans; |
590 | 586 |
591 ListSpansResponse(); | 587 ListSpansResponse(); |
592 | 588 |
593 ListSpansResponse.fromJson(core.Map _json) { | 589 ListSpansResponse.fromJson(core.Map _json) { |
594 if (_json.containsKey("nextPageToken")) { | 590 if (_json.containsKey("nextPageToken")) { |
595 nextPageToken = _json["nextPageToken"]; | 591 nextPageToken = _json["nextPageToken"]; |
596 } | 592 } |
597 if (_json.containsKey("spans")) { | 593 if (_json.containsKey("spans")) { |
598 spans = _json["spans"].map((value) => new Span.fromJson(value)).toList(); | 594 spans = _json["spans"].map((value) => new Span.fromJson(value)).toList(); |
599 } | 595 } |
600 } | 596 } |
601 | 597 |
602 core.Map<core.String, core.Object> toJson() { | 598 core.Map<core.String, core.Object> toJson() { |
603 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 599 final core.Map<core.String, core.Object> _json = |
| 600 new core.Map<core.String, core.Object>(); |
604 if (nextPageToken != null) { | 601 if (nextPageToken != null) { |
605 _json["nextPageToken"] = nextPageToken; | 602 _json["nextPageToken"] = nextPageToken; |
606 } | 603 } |
607 if (spans != null) { | 604 if (spans != null) { |
608 _json["spans"] = spans.map((value) => (value).toJson()).toList(); | 605 _json["spans"] = spans.map((value) => (value).toJson()).toList(); |
609 } | 606 } |
610 return _json; | 607 return _json; |
611 } | 608 } |
612 } | 609 } |
613 | 610 |
614 /** The response message for the `ListTraces` method. */ | 611 /// The response message for the `ListTraces` method. |
615 class ListTracesResponse { | 612 class ListTracesResponse { |
616 /** | 613 /// If there might be more results than those appearing in this response, |
617 * If there might be more results than those appearing in this response, then | 614 /// then |
618 * `next_page_token` is included. To get the next set of results, call this | 615 /// `next_page_token` is included. To get the next set of results, call this |
619 * method again using the value of `next_page_token` as `page_token`. | 616 /// method again using the value of `next_page_token` as `page_token`. |
620 */ | |
621 core.String nextPageToken; | 617 core.String nextPageToken; |
622 /** List of trace records returned. */ | 618 |
| 619 /// List of trace records returned. |
623 core.List<Trace> traces; | 620 core.List<Trace> traces; |
624 | 621 |
625 ListTracesResponse(); | 622 ListTracesResponse(); |
626 | 623 |
627 ListTracesResponse.fromJson(core.Map _json) { | 624 ListTracesResponse.fromJson(core.Map _json) { |
628 if (_json.containsKey("nextPageToken")) { | 625 if (_json.containsKey("nextPageToken")) { |
629 nextPageToken = _json["nextPageToken"]; | 626 nextPageToken = _json["nextPageToken"]; |
630 } | 627 } |
631 if (_json.containsKey("traces")) { | 628 if (_json.containsKey("traces")) { |
632 traces = _json["traces"].map((value) => new Trace.fromJson(value)).toList(
); | 629 traces = |
| 630 _json["traces"].map((value) => new Trace.fromJson(value)).toList(); |
633 } | 631 } |
634 } | 632 } |
635 | 633 |
636 core.Map<core.String, core.Object> toJson() { | 634 core.Map<core.String, core.Object> toJson() { |
637 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 635 final core.Map<core.String, core.Object> _json = |
| 636 new core.Map<core.String, core.Object>(); |
638 if (nextPageToken != null) { | 637 if (nextPageToken != null) { |
639 _json["nextPageToken"] = nextPageToken; | 638 _json["nextPageToken"] = nextPageToken; |
640 } | 639 } |
641 if (traces != null) { | 640 if (traces != null) { |
642 _json["traces"] = traces.map((value) => (value).toJson()).toList(); | 641 _json["traces"] = traces.map((value) => (value).toJson()).toList(); |
643 } | 642 } |
644 return _json; | 643 return _json; |
645 } | 644 } |
646 } | 645 } |
647 | 646 |
648 /** Binary module. */ | 647 /// Binary module. |
649 class Module { | 648 class Module { |
650 /** | 649 /// A unique identifier for the module, usually a hash of its |
651 * A unique identifier for the module, usually a hash of its | 650 /// contents (up to 128 bytes). |
652 * contents (up to 128 bytes). | |
653 */ | |
654 TruncatableString buildId; | 651 TruncatableString buildId; |
655 /** | 652 |
656 * For example: main binary, kernel modules, and dynamic libraries | 653 /// For example: main binary, kernel modules, and dynamic libraries |
657 * such as libc.so, sharedlib.so (up to 256 bytes). | 654 /// such as libc.so, sharedlib.so (up to 256 bytes). |
658 */ | |
659 TruncatableString module; | 655 TruncatableString module; |
660 | 656 |
661 Module(); | 657 Module(); |
662 | 658 |
663 Module.fromJson(core.Map _json) { | 659 Module.fromJson(core.Map _json) { |
664 if (_json.containsKey("buildId")) { | 660 if (_json.containsKey("buildId")) { |
665 buildId = new TruncatableString.fromJson(_json["buildId"]); | 661 buildId = new TruncatableString.fromJson(_json["buildId"]); |
666 } | 662 } |
667 if (_json.containsKey("module")) { | 663 if (_json.containsKey("module")) { |
668 module = new TruncatableString.fromJson(_json["module"]); | 664 module = new TruncatableString.fromJson(_json["module"]); |
669 } | 665 } |
670 } | 666 } |
671 | 667 |
672 core.Map<core.String, core.Object> toJson() { | 668 core.Map<core.String, core.Object> toJson() { |
673 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 669 final core.Map<core.String, core.Object> _json = |
| 670 new core.Map<core.String, core.Object>(); |
674 if (buildId != null) { | 671 if (buildId != null) { |
675 _json["buildId"] = (buildId).toJson(); | 672 _json["buildId"] = (buildId).toJson(); |
676 } | 673 } |
677 if (module != null) { | 674 if (module != null) { |
678 _json["module"] = (module).toJson(); | 675 _json["module"] = (module).toJson(); |
679 } | 676 } |
680 return _json; | 677 return _json; |
681 } | 678 } |
682 } | 679 } |
683 | 680 |
684 /** An event describing an RPC message sent or received on the network. */ | 681 /// An event describing an RPC message sent or received on the network. |
685 class NetworkEvent { | 682 class NetworkEvent { |
686 /** An identifier for the message, which must be unique in this span. */ | 683 /// The number of compressed bytes sent or received. |
| 684 core.String compressedMessageSize; |
| 685 |
| 686 /// An identifier for the message, which must be unique in this span. |
687 core.String messageId; | 687 core.String messageId; |
688 /** The number of bytes sent or received. */ | 688 |
689 core.String messageSize; | 689 /// For sent messages, this is the time at which the first bit was sent. |
690 /** | 690 /// For received messages, this is the time at which the last bit was |
691 * For sent messages, this is the time at which the first bit was sent. | 691 /// received. |
692 * For received messages, this is the time at which the last bit was | |
693 * received. | |
694 */ | |
695 core.String time; | 692 core.String time; |
696 /** | 693 |
697 * Type of NetworkEvent. Indicates whether the RPC message was sent or | 694 /// Type of NetworkEvent. Indicates whether the RPC message was sent or |
698 * received. | 695 /// received. |
699 * Possible string values are: | 696 /// Possible string values are: |
700 * - "TYPE_UNSPECIFIED" : Unknown event type. | 697 /// - "TYPE_UNSPECIFIED" : Unknown event type. |
701 * - "SENT" : Indicates a sent RPC message. | 698 /// - "SENT" : Indicates a sent RPC message. |
702 * - "RECV" : Indicates a received RPC message. | 699 /// - "RECV" : Indicates a received RPC message. |
703 */ | |
704 core.String type; | 700 core.String type; |
705 | 701 |
| 702 /// The number of uncompressed bytes sent or received. |
| 703 core.String uncompressedMessageSize; |
| 704 |
706 NetworkEvent(); | 705 NetworkEvent(); |
707 | 706 |
708 NetworkEvent.fromJson(core.Map _json) { | 707 NetworkEvent.fromJson(core.Map _json) { |
| 708 if (_json.containsKey("compressedMessageSize")) { |
| 709 compressedMessageSize = _json["compressedMessageSize"]; |
| 710 } |
709 if (_json.containsKey("messageId")) { | 711 if (_json.containsKey("messageId")) { |
710 messageId = _json["messageId"]; | 712 messageId = _json["messageId"]; |
711 } | 713 } |
712 if (_json.containsKey("messageSize")) { | |
713 messageSize = _json["messageSize"]; | |
714 } | |
715 if (_json.containsKey("time")) { | 714 if (_json.containsKey("time")) { |
716 time = _json["time"]; | 715 time = _json["time"]; |
717 } | 716 } |
718 if (_json.containsKey("type")) { | 717 if (_json.containsKey("type")) { |
719 type = _json["type"]; | 718 type = _json["type"]; |
720 } | 719 } |
| 720 if (_json.containsKey("uncompressedMessageSize")) { |
| 721 uncompressedMessageSize = _json["uncompressedMessageSize"]; |
| 722 } |
721 } | 723 } |
722 | 724 |
723 core.Map<core.String, core.Object> toJson() { | 725 core.Map<core.String, core.Object> toJson() { |
724 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 726 final core.Map<core.String, core.Object> _json = |
| 727 new core.Map<core.String, core.Object>(); |
| 728 if (compressedMessageSize != null) { |
| 729 _json["compressedMessageSize"] = compressedMessageSize; |
| 730 } |
725 if (messageId != null) { | 731 if (messageId != null) { |
726 _json["messageId"] = messageId; | 732 _json["messageId"] = messageId; |
727 } | 733 } |
728 if (messageSize != null) { | |
729 _json["messageSize"] = messageSize; | |
730 } | |
731 if (time != null) { | 734 if (time != null) { |
732 _json["time"] = time; | 735 _json["time"] = time; |
733 } | 736 } |
734 if (type != null) { | 737 if (type != null) { |
735 _json["type"] = type; | 738 _json["type"] = type; |
736 } | 739 } |
| 740 if (uncompressedMessageSize != null) { |
| 741 _json["uncompressedMessageSize"] = uncompressedMessageSize; |
| 742 } |
737 return _json; | 743 return _json; |
738 } | 744 } |
739 } | 745 } |
740 | 746 |
741 /** | 747 /// A span represents a single operation within a trace. Spans can be |
742 * A span represents a single operation within a trace. Spans can be | 748 /// nested to form a trace tree. Often, a trace contains a root span |
743 * nested to form a trace tree. Often, a trace contains a root span | 749 /// that describes the end-to-end latency, and one or more subspans for |
744 * that describes the end-to-end latency, and one or more subspans for | 750 /// its sub-operations. A trace can also contain multiple root spans, |
745 * its sub-operations. A trace can also contain multiple root spans, | 751 /// or none at all. Spans do not need to be contiguous—there may be |
746 * or none at all. Spans do not need to be contiguous—there may be | 752 /// gaps or overlaps between spans in a trace. |
747 * gaps or overlaps between spans in a trace. | |
748 */ | |
749 class Span { | 753 class Span { |
750 /** | 754 /// A set of attributes on the span. There is a limit of 32 attributes per |
751 * A set of attributes on the span. There is a limit of 32 attributes per | 755 /// span. |
752 * span. | |
753 */ | |
754 Attributes attributes; | 756 Attributes attributes; |
755 /** | 757 |
756 * An optional number of child spans that were generated while this span | 758 /// An optional number of child spans that were generated while this span |
757 * was active. If set, allows implementation to detect missing child spans. | 759 /// was active. If set, allows implementation to detect missing child spans. |
758 */ | |
759 core.int childSpanCount; | 760 core.int childSpanCount; |
760 /** | 761 |
761 * A description of the span's operation (up to 128 bytes). | 762 /// A description of the span's operation (up to 128 bytes). |
762 * Stackdriver Trace displays the description in the | 763 /// Stackdriver Trace displays the description in the |
763 * {% dynamic print site_values.console_name %}. | 764 /// {% dynamic print site_values.console_name %}. |
764 * For example, the display name can be a qualified method name or a file name | 765 /// For example, the display name can be a qualified method name or a file |
765 * and a line number where the operation is called. A best practice is to use | 766 /// name |
766 * the same display name within an application and at the same call point. | 767 /// and a line number where the operation is called. A best practice is to |
767 * This makes it easier to correlate spans in different traces. | 768 /// use |
768 */ | 769 /// the same display name within an application and at the same call point. |
| 770 /// This makes it easier to correlate spans in different traces. |
769 TruncatableString displayName; | 771 TruncatableString displayName; |
770 /** | 772 |
771 * The end time of the span. On the client side, this is the time kept by | 773 /// The end time of the span. On the client side, this is the time kept by |
772 * the local machine where the span execution ends. On the server side, this | 774 /// the local machine where the span execution ends. On the server side, this |
773 * is the time when the server application handler stops running. | 775 /// is the time when the server application handler stops running. |
774 */ | |
775 core.String endTime; | 776 core.String endTime; |
776 /** A maximum of 128 links are allowed per Span. */ | 777 |
| 778 /// A maximum of 128 links are allowed per Span. |
777 Links links; | 779 Links links; |
778 /** | 780 |
779 * The resource name of the span in the following format: | 781 /// The resource name of the span in the following format: |
780 * | 782 /// |
781 * projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier | 783 /// projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique |
782 * for a trace within a project. | 784 /// identifier for a trace within a project. |
783 * [SPAN_ID] is a unique identifier for a span within a trace, | 785 /// [SPAN_ID] is a unique identifier for a span within a trace, |
784 * assigned when the span is created. | 786 /// assigned when the span is created. |
785 */ | |
786 core.String name; | 787 core.String name; |
787 /** | 788 |
788 * The [SPAN_ID] of this span's parent span. If this is a root span, | 789 /// The [SPAN_ID] of this span's parent span. If this is a root span, |
789 * then this field must be empty. | 790 /// then this field must be empty. |
790 */ | |
791 core.String parentSpanId; | 791 core.String parentSpanId; |
792 /** | 792 |
793 * A highly recommended but not required flag that identifies when a trace | 793 /// A highly recommended but not required flag that identifies when a trace |
794 * crosses a process boundary. True when the parent_span belongs to the | 794 /// crosses a process boundary. True when the parent_span belongs to the |
795 * same process as the current span. | 795 /// same process as the current span. |
796 */ | |
797 core.bool sameProcessAsParentSpan; | 796 core.bool sameProcessAsParentSpan; |
798 /** The [SPAN_ID] portion of the span's resource name. */ | 797 |
| 798 /// The [SPAN_ID] portion of the span's resource name. |
799 core.String spanId; | 799 core.String spanId; |
800 /** Stack trace captured at the start of the span. */ | 800 |
| 801 /// Stack trace captured at the start of the span. |
801 StackTrace stackTrace; | 802 StackTrace stackTrace; |
802 /** | 803 |
803 * The start time of the span. On the client side, this is the time kept by | 804 /// The start time of the span. On the client side, this is the time kept by |
804 * the local machine where the span execution starts. On the server side, this | 805 /// the local machine where the span execution starts. On the server side, |
805 * is the time when the server's application handler starts running. | 806 /// this |
806 */ | 807 /// is the time when the server's application handler starts running. |
807 core.String startTime; | 808 core.String startTime; |
808 /** An optional final status for this span. */ | 809 |
| 810 /// An optional final status for this span. |
809 Status status; | 811 Status status; |
810 /** | 812 |
811 * The included time events. There can be up to 32 annotations and 128 network | 813 /// The included time events. There can be up to 32 annotations and 128 |
812 * events per span. | 814 /// network |
813 */ | 815 /// events per span. |
814 TimeEvents timeEvents; | 816 TimeEvents timeEvents; |
815 | 817 |
816 Span(); | 818 Span(); |
817 | 819 |
818 Span.fromJson(core.Map _json) { | 820 Span.fromJson(core.Map _json) { |
819 if (_json.containsKey("attributes")) { | 821 if (_json.containsKey("attributes")) { |
820 attributes = new Attributes.fromJson(_json["attributes"]); | 822 attributes = new Attributes.fromJson(_json["attributes"]); |
821 } | 823 } |
822 if (_json.containsKey("childSpanCount")) { | 824 if (_json.containsKey("childSpanCount")) { |
823 childSpanCount = _json["childSpanCount"]; | 825 childSpanCount = _json["childSpanCount"]; |
(...skipping 27 matching lines...) Expand all Loading... |
851 } | 853 } |
852 if (_json.containsKey("status")) { | 854 if (_json.containsKey("status")) { |
853 status = new Status.fromJson(_json["status"]); | 855 status = new Status.fromJson(_json["status"]); |
854 } | 856 } |
855 if (_json.containsKey("timeEvents")) { | 857 if (_json.containsKey("timeEvents")) { |
856 timeEvents = new TimeEvents.fromJson(_json["timeEvents"]); | 858 timeEvents = new TimeEvents.fromJson(_json["timeEvents"]); |
857 } | 859 } |
858 } | 860 } |
859 | 861 |
860 core.Map<core.String, core.Object> toJson() { | 862 core.Map<core.String, core.Object> toJson() { |
861 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 863 final core.Map<core.String, core.Object> _json = |
| 864 new core.Map<core.String, core.Object>(); |
862 if (attributes != null) { | 865 if (attributes != null) { |
863 _json["attributes"] = (attributes).toJson(); | 866 _json["attributes"] = (attributes).toJson(); |
864 } | 867 } |
865 if (childSpanCount != null) { | 868 if (childSpanCount != null) { |
866 _json["childSpanCount"] = childSpanCount; | 869 _json["childSpanCount"] = childSpanCount; |
867 } | 870 } |
868 if (displayName != null) { | 871 if (displayName != null) { |
869 _json["displayName"] = (displayName).toJson(); | 872 _json["displayName"] = (displayName).toJson(); |
870 } | 873 } |
871 if (endTime != null) { | 874 if (endTime != null) { |
(...skipping 23 matching lines...) Expand all Loading... |
895 if (status != null) { | 898 if (status != null) { |
896 _json["status"] = (status).toJson(); | 899 _json["status"] = (status).toJson(); |
897 } | 900 } |
898 if (timeEvents != null) { | 901 if (timeEvents != null) { |
899 _json["timeEvents"] = (timeEvents).toJson(); | 902 _json["timeEvents"] = (timeEvents).toJson(); |
900 } | 903 } |
901 return _json; | 904 return _json; |
902 } | 905 } |
903 } | 906 } |
904 | 907 |
905 /** Represents a single stack frame in a stack trace. */ | 908 /// Represents a single stack frame in a stack trace. |
906 class StackFrame { | 909 class StackFrame { |
907 /** | 910 /// The column number where the function call appears, if available. |
908 * The column number where the function call appears, if available. | 911 /// This is important in JavaScript because of its anonymous functions. |
909 * This is important in JavaScript because of its anonymous functions. | |
910 */ | |
911 core.String columnNumber; | 912 core.String columnNumber; |
912 /** | 913 |
913 * The name of the source file where the function call appears (up to 256 | 914 /// The name of the source file where the function call appears (up to 256 |
914 * bytes). | 915 /// bytes). |
915 */ | |
916 TruncatableString fileName; | 916 TruncatableString fileName; |
917 /** | 917 |
918 * The fully-qualified name that uniquely identifies the function or | 918 /// The fully-qualified name that uniquely identifies the function or |
919 * method that is active in this frame (up to 1024 bytes). | 919 /// method that is active in this frame (up to 1024 bytes). |
920 */ | |
921 TruncatableString functionName; | 920 TruncatableString functionName; |
922 /** The line number in `file_name` where the function call appears. */ | 921 |
| 922 /// The line number in `file_name` where the function call appears. |
923 core.String lineNumber; | 923 core.String lineNumber; |
924 /** The binary module from where the code was loaded. */ | 924 |
| 925 /// The binary module from where the code was loaded. |
925 Module loadModule; | 926 Module loadModule; |
926 /** | 927 |
927 * An un-mangled function name, if `function_name` is | 928 /// An un-mangled function name, if `function_name` is |
928 * [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can | 929 /// [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can |
929 * be fully-qualified (up to 1024 bytes). | 930 /// be fully-qualified (up to 1024 bytes). |
930 */ | |
931 TruncatableString originalFunctionName; | 931 TruncatableString originalFunctionName; |
932 /** The version of the deployed source code (up to 128 bytes). */ | 932 |
| 933 /// The version of the deployed source code (up to 128 bytes). |
933 TruncatableString sourceVersion; | 934 TruncatableString sourceVersion; |
934 | 935 |
935 StackFrame(); | 936 StackFrame(); |
936 | 937 |
937 StackFrame.fromJson(core.Map _json) { | 938 StackFrame.fromJson(core.Map _json) { |
938 if (_json.containsKey("columnNumber")) { | 939 if (_json.containsKey("columnNumber")) { |
939 columnNumber = _json["columnNumber"]; | 940 columnNumber = _json["columnNumber"]; |
940 } | 941 } |
941 if (_json.containsKey("fileName")) { | 942 if (_json.containsKey("fileName")) { |
942 fileName = new TruncatableString.fromJson(_json["fileName"]); | 943 fileName = new TruncatableString.fromJson(_json["fileName"]); |
943 } | 944 } |
944 if (_json.containsKey("functionName")) { | 945 if (_json.containsKey("functionName")) { |
945 functionName = new TruncatableString.fromJson(_json["functionName"]); | 946 functionName = new TruncatableString.fromJson(_json["functionName"]); |
946 } | 947 } |
947 if (_json.containsKey("lineNumber")) { | 948 if (_json.containsKey("lineNumber")) { |
948 lineNumber = _json["lineNumber"]; | 949 lineNumber = _json["lineNumber"]; |
949 } | 950 } |
950 if (_json.containsKey("loadModule")) { | 951 if (_json.containsKey("loadModule")) { |
951 loadModule = new Module.fromJson(_json["loadModule"]); | 952 loadModule = new Module.fromJson(_json["loadModule"]); |
952 } | 953 } |
953 if (_json.containsKey("originalFunctionName")) { | 954 if (_json.containsKey("originalFunctionName")) { |
954 originalFunctionName = new TruncatableString.fromJson(_json["originalFunct
ionName"]); | 955 originalFunctionName = |
| 956 new TruncatableString.fromJson(_json["originalFunctionName"]); |
955 } | 957 } |
956 if (_json.containsKey("sourceVersion")) { | 958 if (_json.containsKey("sourceVersion")) { |
957 sourceVersion = new TruncatableString.fromJson(_json["sourceVersion"]); | 959 sourceVersion = new TruncatableString.fromJson(_json["sourceVersion"]); |
958 } | 960 } |
959 } | 961 } |
960 | 962 |
961 core.Map<core.String, core.Object> toJson() { | 963 core.Map<core.String, core.Object> toJson() { |
962 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 964 final core.Map<core.String, core.Object> _json = |
| 965 new core.Map<core.String, core.Object>(); |
963 if (columnNumber != null) { | 966 if (columnNumber != null) { |
964 _json["columnNumber"] = columnNumber; | 967 _json["columnNumber"] = columnNumber; |
965 } | 968 } |
966 if (fileName != null) { | 969 if (fileName != null) { |
967 _json["fileName"] = (fileName).toJson(); | 970 _json["fileName"] = (fileName).toJson(); |
968 } | 971 } |
969 if (functionName != null) { | 972 if (functionName != null) { |
970 _json["functionName"] = (functionName).toJson(); | 973 _json["functionName"] = (functionName).toJson(); |
971 } | 974 } |
972 if (lineNumber != null) { | 975 if (lineNumber != null) { |
973 _json["lineNumber"] = lineNumber; | 976 _json["lineNumber"] = lineNumber; |
974 } | 977 } |
975 if (loadModule != null) { | 978 if (loadModule != null) { |
976 _json["loadModule"] = (loadModule).toJson(); | 979 _json["loadModule"] = (loadModule).toJson(); |
977 } | 980 } |
978 if (originalFunctionName != null) { | 981 if (originalFunctionName != null) { |
979 _json["originalFunctionName"] = (originalFunctionName).toJson(); | 982 _json["originalFunctionName"] = (originalFunctionName).toJson(); |
980 } | 983 } |
981 if (sourceVersion != null) { | 984 if (sourceVersion != null) { |
982 _json["sourceVersion"] = (sourceVersion).toJson(); | 985 _json["sourceVersion"] = (sourceVersion).toJson(); |
983 } | 986 } |
984 return _json; | 987 return _json; |
985 } | 988 } |
986 } | 989 } |
987 | 990 |
988 /** A collection of stack frames, which can be truncated. */ | 991 /// A collection of stack frames, which can be truncated. |
989 class StackFrames { | 992 class StackFrames { |
990 /** | 993 /// The number of stack frames that were dropped because there |
991 * The number of stack frames that were dropped because there | 994 /// were too many stack frames. |
992 * were too many stack frames. | 995 /// If this value is 0, then no stack frames were dropped. |
993 * If this value is 0, then no stack frames were dropped. | |
994 */ | |
995 core.int droppedFramesCount; | 996 core.int droppedFramesCount; |
996 /** Stack frames in this call stack. */ | 997 |
| 998 /// Stack frames in this call stack. |
997 core.List<StackFrame> frame; | 999 core.List<StackFrame> frame; |
998 | 1000 |
999 StackFrames(); | 1001 StackFrames(); |
1000 | 1002 |
1001 StackFrames.fromJson(core.Map _json) { | 1003 StackFrames.fromJson(core.Map _json) { |
1002 if (_json.containsKey("droppedFramesCount")) { | 1004 if (_json.containsKey("droppedFramesCount")) { |
1003 droppedFramesCount = _json["droppedFramesCount"]; | 1005 droppedFramesCount = _json["droppedFramesCount"]; |
1004 } | 1006 } |
1005 if (_json.containsKey("frame")) { | 1007 if (_json.containsKey("frame")) { |
1006 frame = _json["frame"].map((value) => new StackFrame.fromJson(value)).toLi
st(); | 1008 frame = _json["frame"] |
| 1009 .map((value) => new StackFrame.fromJson(value)) |
| 1010 .toList(); |
1007 } | 1011 } |
1008 } | 1012 } |
1009 | 1013 |
1010 core.Map<core.String, core.Object> toJson() { | 1014 core.Map<core.String, core.Object> toJson() { |
1011 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1015 final core.Map<core.String, core.Object> _json = |
| 1016 new core.Map<core.String, core.Object>(); |
1012 if (droppedFramesCount != null) { | 1017 if (droppedFramesCount != null) { |
1013 _json["droppedFramesCount"] = droppedFramesCount; | 1018 _json["droppedFramesCount"] = droppedFramesCount; |
1014 } | 1019 } |
1015 if (frame != null) { | 1020 if (frame != null) { |
1016 _json["frame"] = frame.map((value) => (value).toJson()).toList(); | 1021 _json["frame"] = frame.map((value) => (value).toJson()).toList(); |
1017 } | 1022 } |
1018 return _json; | 1023 return _json; |
1019 } | 1024 } |
1020 } | 1025 } |
1021 | 1026 |
1022 /** A call stack appearing in a trace. */ | 1027 /// A call stack appearing in a trace. |
1023 class StackTrace { | 1028 class StackTrace { |
1024 /** Stack frames in this stack trace. A maximum of 128 frames are allowed. */ | 1029 /// Stack frames in this stack trace. A maximum of 128 frames are allowed. |
1025 StackFrames stackFrames; | 1030 StackFrames stackFrames; |
1026 /** | 1031 |
1027 * The hash ID is used to conserve network bandwidth for duplicate | 1032 /// The hash ID is used to conserve network bandwidth for duplicate |
1028 * stack traces within a single trace. | 1033 /// stack traces within a single trace. |
1029 * | 1034 /// |
1030 * Often multiple spans will have identical stack traces. | 1035 /// Often multiple spans will have identical stack traces. |
1031 * The first occurrence of a stack trace should contain both the | 1036 /// The first occurrence of a stack trace should contain both the |
1032 * `stackFrame` content and a value in `stackTraceHashId`. | 1037 /// `stackFrame` content and a value in `stackTraceHashId`. |
1033 * | 1038 /// |
1034 * Subsequent spans within the same request can refer | 1039 /// Subsequent spans within the same request can refer |
1035 * to that stack trace by only setting `stackTraceHashId`. | 1040 /// to that stack trace by only setting `stackTraceHashId`. |
1036 */ | |
1037 core.String stackTraceHashId; | 1041 core.String stackTraceHashId; |
1038 | 1042 |
1039 StackTrace(); | 1043 StackTrace(); |
1040 | 1044 |
1041 StackTrace.fromJson(core.Map _json) { | 1045 StackTrace.fromJson(core.Map _json) { |
1042 if (_json.containsKey("stackFrames")) { | 1046 if (_json.containsKey("stackFrames")) { |
1043 stackFrames = new StackFrames.fromJson(_json["stackFrames"]); | 1047 stackFrames = new StackFrames.fromJson(_json["stackFrames"]); |
1044 } | 1048 } |
1045 if (_json.containsKey("stackTraceHashId")) { | 1049 if (_json.containsKey("stackTraceHashId")) { |
1046 stackTraceHashId = _json["stackTraceHashId"]; | 1050 stackTraceHashId = _json["stackTraceHashId"]; |
1047 } | 1051 } |
1048 } | 1052 } |
1049 | 1053 |
1050 core.Map<core.String, core.Object> toJson() { | 1054 core.Map<core.String, core.Object> toJson() { |
1051 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1055 final core.Map<core.String, core.Object> _json = |
| 1056 new core.Map<core.String, core.Object>(); |
1052 if (stackFrames != null) { | 1057 if (stackFrames != null) { |
1053 _json["stackFrames"] = (stackFrames).toJson(); | 1058 _json["stackFrames"] = (stackFrames).toJson(); |
1054 } | 1059 } |
1055 if (stackTraceHashId != null) { | 1060 if (stackTraceHashId != null) { |
1056 _json["stackTraceHashId"] = stackTraceHashId; | 1061 _json["stackTraceHashId"] = stackTraceHashId; |
1057 } | 1062 } |
1058 return _json; | 1063 return _json; |
1059 } | 1064 } |
1060 } | 1065 } |
1061 | 1066 |
1062 /** | 1067 /// The `Status` type defines a logical error model that is suitable for |
1063 * The `Status` type defines a logical error model that is suitable for | 1068 /// different |
1064 * different | 1069 /// programming environments, including REST APIs and RPC APIs. It is used by |
1065 * programming environments, including REST APIs and RPC APIs. It is used by | 1070 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
1066 * [gRPC](https://github.com/grpc). The error model is designed to be: | 1071 /// |
1067 * | 1072 /// - Simple to use and understand for most users |
1068 * - Simple to use and understand for most users | 1073 /// - Flexible enough to meet unexpected needs |
1069 * - Flexible enough to meet unexpected needs | 1074 /// |
1070 * | 1075 /// # Overview |
1071 * # Overview | 1076 /// |
1072 * | 1077 /// The `Status` message contains three pieces of data: error code, error |
1073 * The `Status` message contains three pieces of data: error code, error | 1078 /// message, |
1074 * message, | 1079 /// and error details. The error code should be an enum value of |
1075 * and error details. The error code should be an enum value of | 1080 /// google.rpc.Code, but it may accept additional error codes if needed. The |
1076 * google.rpc.Code, but it may accept additional error codes if needed. The | 1081 /// error message should be a developer-facing English message that helps |
1077 * error message should be a developer-facing English message that helps | 1082 /// developers *understand* and *resolve* the error. If a localized user-facing |
1078 * developers *understand* and *resolve* the error. If a localized user-facing | 1083 /// error message is needed, put the localized message in the error details or |
1079 * error message is needed, put the localized message in the error details or | 1084 /// localize it in the client. The optional error details may contain arbitrary |
1080 * localize it in the client. The optional error details may contain arbitrary | 1085 /// information about the error. There is a predefined set of error detail |
1081 * information about the error. There is a predefined set of error detail types | 1086 /// types |
1082 * in the package `google.rpc` that can be used for common error conditions. | 1087 /// in the package `google.rpc` that can be used for common error conditions. |
1083 * | 1088 /// |
1084 * # Language mapping | 1089 /// # Language mapping |
1085 * | 1090 /// |
1086 * The `Status` message is the logical representation of the error model, but it | 1091 /// The `Status` message is the logical representation of the error model, but |
1087 * is not necessarily the actual wire format. When the `Status` message is | 1092 /// it |
1088 * exposed in different client libraries and different wire protocols, it can be | 1093 /// is not necessarily the actual wire format. When the `Status` message is |
1089 * mapped differently. For example, it will likely be mapped to some exceptions | 1094 /// exposed in different client libraries and different wire protocols, it can |
1090 * in Java, but more likely mapped to some error codes in C. | 1095 /// be |
1091 * | 1096 /// mapped differently. For example, it will likely be mapped to some |
1092 * # Other uses | 1097 /// exceptions |
1093 * | 1098 /// in Java, but more likely mapped to some error codes in C. |
1094 * The error model and the `Status` message can be used in a variety of | 1099 /// |
1095 * environments, either with or without APIs, to provide a | 1100 /// # Other uses |
1096 * consistent developer experience across different environments. | 1101 /// |
1097 * | 1102 /// The error model and the `Status` message can be used in a variety of |
1098 * Example uses of this error model include: | 1103 /// environments, either with or without APIs, to provide a |
1099 * | 1104 /// consistent developer experience across different environments. |
1100 * - Partial errors. If a service needs to return partial errors to the client, | 1105 /// |
1101 * it may embed the `Status` in the normal response to indicate the partial | 1106 /// Example uses of this error model include: |
1102 * errors. | 1107 /// |
1103 * | 1108 /// - Partial errors. If a service needs to return partial errors to the |
1104 * - Workflow errors. A typical workflow has multiple steps. Each step may | 1109 /// client, |
1105 * have a `Status` message for error reporting. | 1110 /// it may embed the `Status` in the normal response to indicate the partial |
1106 * | 1111 /// errors. |
1107 * - Batch operations. If a client uses batch request and batch response, the | 1112 /// |
1108 * `Status` message should be used directly inside batch response, one for | 1113 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
1109 * each error sub-response. | 1114 /// have a `Status` message for error reporting. |
1110 * | 1115 /// |
1111 * - Asynchronous operations. If an API call embeds asynchronous operation | 1116 /// - Batch operations. If a client uses batch request and batch response, the |
1112 * results in its response, the status of those operations should be | 1117 /// `Status` message should be used directly inside batch response, one for |
1113 * represented directly using the `Status` message. | 1118 /// each error sub-response. |
1114 * | 1119 /// |
1115 * - Logging. If some API errors are stored in logs, the message `Status` could | 1120 /// - Asynchronous operations. If an API call embeds asynchronous operation |
1116 * be used directly after any stripping needed for security/privacy reasons. | 1121 /// results in its response, the status of those operations should be |
1117 */ | 1122 /// represented directly using the `Status` message. |
| 1123 /// |
| 1124 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 1125 /// could |
| 1126 /// be used directly after any stripping needed for security/privacy reasons. |
1118 class Status { | 1127 class Status { |
1119 /** The status code, which should be an enum value of google.rpc.Code. */ | 1128 /// The status code, which should be an enum value of google.rpc.Code. |
1120 core.int code; | 1129 core.int code; |
1121 /** | 1130 |
1122 * A list of messages that carry the error details. There is a common set of | 1131 /// A list of messages that carry the error details. There is a common set |
1123 * message types for APIs to use. | 1132 /// of |
1124 * | 1133 /// message types for APIs to use. |
1125 * The values for Object must be JSON objects. It can consist of `num`, | 1134 /// |
1126 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1135 /// The values for Object must be JSON objects. It can consist of `num`, |
1127 */ | 1136 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1128 core.List<core.Map<core.String, core.Object>> details; | 1137 core.List<core.Map<core.String, core.Object>> details; |
1129 /** | 1138 |
1130 * A developer-facing error message, which should be in English. Any | 1139 /// A developer-facing error message, which should be in English. Any |
1131 * user-facing error message should be localized and sent in the | 1140 /// user-facing error message should be localized and sent in the |
1132 * google.rpc.Status.details field, or localized by the client. | 1141 /// google.rpc.Status.details field, or localized by the client. |
1133 */ | |
1134 core.String message; | 1142 core.String message; |
1135 | 1143 |
1136 Status(); | 1144 Status(); |
1137 | 1145 |
1138 Status.fromJson(core.Map _json) { | 1146 Status.fromJson(core.Map _json) { |
1139 if (_json.containsKey("code")) { | 1147 if (_json.containsKey("code")) { |
1140 code = _json["code"]; | 1148 code = _json["code"]; |
1141 } | 1149 } |
1142 if (_json.containsKey("details")) { | 1150 if (_json.containsKey("details")) { |
1143 details = _json["details"]; | 1151 details = _json["details"]; |
1144 } | 1152 } |
1145 if (_json.containsKey("message")) { | 1153 if (_json.containsKey("message")) { |
1146 message = _json["message"]; | 1154 message = _json["message"]; |
1147 } | 1155 } |
1148 } | 1156 } |
1149 | 1157 |
1150 core.Map<core.String, core.Object> toJson() { | 1158 core.Map<core.String, core.Object> toJson() { |
1151 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1159 final core.Map<core.String, core.Object> _json = |
| 1160 new core.Map<core.String, core.Object>(); |
1152 if (code != null) { | 1161 if (code != null) { |
1153 _json["code"] = code; | 1162 _json["code"] = code; |
1154 } | 1163 } |
1155 if (details != null) { | 1164 if (details != null) { |
1156 _json["details"] = details; | 1165 _json["details"] = details; |
1157 } | 1166 } |
1158 if (message != null) { | 1167 if (message != null) { |
1159 _json["message"] = message; | 1168 _json["message"] = message; |
1160 } | 1169 } |
1161 return _json; | 1170 return _json; |
1162 } | 1171 } |
1163 } | 1172 } |
1164 | 1173 |
1165 /** A time-stamped annotation or network event in the Span. */ | 1174 /// A time-stamped annotation or network event in the Span. |
1166 class TimeEvent { | 1175 class TimeEvent { |
1167 /** One or more key:value pairs. */ | 1176 /// One or more key:value pairs. |
1168 Annotation annotation; | 1177 Annotation annotation; |
1169 /** An event describing an RPC message sent/received on the network. */ | 1178 |
| 1179 /// An event describing an RPC message sent/received on the network. |
1170 NetworkEvent networkEvent; | 1180 NetworkEvent networkEvent; |
1171 /** The timestamp indicating the time the event occurred. */ | 1181 |
| 1182 /// The timestamp indicating the time the event occurred. |
1172 core.String time; | 1183 core.String time; |
1173 | 1184 |
1174 TimeEvent(); | 1185 TimeEvent(); |
1175 | 1186 |
1176 TimeEvent.fromJson(core.Map _json) { | 1187 TimeEvent.fromJson(core.Map _json) { |
1177 if (_json.containsKey("annotation")) { | 1188 if (_json.containsKey("annotation")) { |
1178 annotation = new Annotation.fromJson(_json["annotation"]); | 1189 annotation = new Annotation.fromJson(_json["annotation"]); |
1179 } | 1190 } |
1180 if (_json.containsKey("networkEvent")) { | 1191 if (_json.containsKey("networkEvent")) { |
1181 networkEvent = new NetworkEvent.fromJson(_json["networkEvent"]); | 1192 networkEvent = new NetworkEvent.fromJson(_json["networkEvent"]); |
1182 } | 1193 } |
1183 if (_json.containsKey("time")) { | 1194 if (_json.containsKey("time")) { |
1184 time = _json["time"]; | 1195 time = _json["time"]; |
1185 } | 1196 } |
1186 } | 1197 } |
1187 | 1198 |
1188 core.Map<core.String, core.Object> toJson() { | 1199 core.Map<core.String, core.Object> toJson() { |
1189 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1200 final core.Map<core.String, core.Object> _json = |
| 1201 new core.Map<core.String, core.Object>(); |
1190 if (annotation != null) { | 1202 if (annotation != null) { |
1191 _json["annotation"] = (annotation).toJson(); | 1203 _json["annotation"] = (annotation).toJson(); |
1192 } | 1204 } |
1193 if (networkEvent != null) { | 1205 if (networkEvent != null) { |
1194 _json["networkEvent"] = (networkEvent).toJson(); | 1206 _json["networkEvent"] = (networkEvent).toJson(); |
1195 } | 1207 } |
1196 if (time != null) { | 1208 if (time != null) { |
1197 _json["time"] = time; | 1209 _json["time"] = time; |
1198 } | 1210 } |
1199 return _json; | 1211 return _json; |
1200 } | 1212 } |
1201 } | 1213 } |
1202 | 1214 |
1203 /** | 1215 /// A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation |
1204 * A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation | 1216 /// on the span, consisting of either user-supplied key:value pairs, or |
1205 * on the span, consisting of either user-supplied key:value pairs, or | 1217 /// details of an RPC message sent/received on the network. |
1206 * details of an RPC message sent/received on the network. | |
1207 */ | |
1208 class TimeEvents { | 1218 class TimeEvents { |
1209 /** | 1219 /// The number of dropped annotations in all the included time events. |
1210 * The number of dropped annotations in all the included time events. | 1220 /// If the value is 0, then no annotations were dropped. |
1211 * If the value is 0, then no annotations were dropped. | |
1212 */ | |
1213 core.int droppedAnnotationsCount; | 1221 core.int droppedAnnotationsCount; |
1214 /** | 1222 |
1215 * The number of dropped network events in all the included time events. | 1223 /// The number of dropped network events in all the included time events. |
1216 * If the value is 0, then no network events were dropped. | 1224 /// If the value is 0, then no network events were dropped. |
1217 */ | |
1218 core.int droppedNetworkEventsCount; | 1225 core.int droppedNetworkEventsCount; |
1219 /** A collection of `TimeEvent`s. */ | 1226 |
| 1227 /// A collection of `TimeEvent`s. |
1220 core.List<TimeEvent> timeEvent; | 1228 core.List<TimeEvent> timeEvent; |
1221 | 1229 |
1222 TimeEvents(); | 1230 TimeEvents(); |
1223 | 1231 |
1224 TimeEvents.fromJson(core.Map _json) { | 1232 TimeEvents.fromJson(core.Map _json) { |
1225 if (_json.containsKey("droppedAnnotationsCount")) { | 1233 if (_json.containsKey("droppedAnnotationsCount")) { |
1226 droppedAnnotationsCount = _json["droppedAnnotationsCount"]; | 1234 droppedAnnotationsCount = _json["droppedAnnotationsCount"]; |
1227 } | 1235 } |
1228 if (_json.containsKey("droppedNetworkEventsCount")) { | 1236 if (_json.containsKey("droppedNetworkEventsCount")) { |
1229 droppedNetworkEventsCount = _json["droppedNetworkEventsCount"]; | 1237 droppedNetworkEventsCount = _json["droppedNetworkEventsCount"]; |
1230 } | 1238 } |
1231 if (_json.containsKey("timeEvent")) { | 1239 if (_json.containsKey("timeEvent")) { |
1232 timeEvent = _json["timeEvent"].map((value) => new TimeEvent.fromJson(value
)).toList(); | 1240 timeEvent = _json["timeEvent"] |
| 1241 .map((value) => new TimeEvent.fromJson(value)) |
| 1242 .toList(); |
1233 } | 1243 } |
1234 } | 1244 } |
1235 | 1245 |
1236 core.Map<core.String, core.Object> toJson() { | 1246 core.Map<core.String, core.Object> toJson() { |
1237 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1247 final core.Map<core.String, core.Object> _json = |
| 1248 new core.Map<core.String, core.Object>(); |
1238 if (droppedAnnotationsCount != null) { | 1249 if (droppedAnnotationsCount != null) { |
1239 _json["droppedAnnotationsCount"] = droppedAnnotationsCount; | 1250 _json["droppedAnnotationsCount"] = droppedAnnotationsCount; |
1240 } | 1251 } |
1241 if (droppedNetworkEventsCount != null) { | 1252 if (droppedNetworkEventsCount != null) { |
1242 _json["droppedNetworkEventsCount"] = droppedNetworkEventsCount; | 1253 _json["droppedNetworkEventsCount"] = droppedNetworkEventsCount; |
1243 } | 1254 } |
1244 if (timeEvent != null) { | 1255 if (timeEvent != null) { |
1245 _json["timeEvent"] = timeEvent.map((value) => (value).toJson()).toList(); | 1256 _json["timeEvent"] = timeEvent.map((value) => (value).toJson()).toList(); |
1246 } | 1257 } |
1247 return _json; | 1258 return _json; |
1248 } | 1259 } |
1249 } | 1260 } |
1250 | 1261 |
1251 /** | 1262 /// A trace describes how long it takes for an application to perform some |
1252 * A trace describes how long it takes for an application to perform some | 1263 /// operations. It consists of a set of spans, each representing |
1253 * operations. It consists of a set of spans, each representing | 1264 /// an operation and including time information and operation details. |
1254 * an operation and including time information and operation details. | |
1255 */ | |
1256 class Trace { | 1265 class Trace { |
1257 /** | 1266 /// The resource name of the trace in the following format: |
1258 * The resource name of the trace in the following format: | 1267 /// |
1259 * | 1268 /// projects/[PROJECT_ID]/traces/TRACE_ID is a unique identifier for a trace |
1260 * projects/[PROJECT_ID]/traces/TRACE_ID is a unique identifier for a trace | 1269 /// within a project. |
1261 * within a project. | 1270 /// The ID is assigned when the trace is created. |
1262 * The ID is assigned when the trace is created. | |
1263 */ | |
1264 core.String name; | 1271 core.String name; |
1265 | 1272 |
1266 Trace(); | 1273 Trace(); |
1267 | 1274 |
1268 Trace.fromJson(core.Map _json) { | 1275 Trace.fromJson(core.Map _json) { |
1269 if (_json.containsKey("name")) { | 1276 if (_json.containsKey("name")) { |
1270 name = _json["name"]; | 1277 name = _json["name"]; |
1271 } | 1278 } |
1272 } | 1279 } |
1273 | 1280 |
1274 core.Map<core.String, core.Object> toJson() { | 1281 core.Map<core.String, core.Object> toJson() { |
1275 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1282 final core.Map<core.String, core.Object> _json = |
| 1283 new core.Map<core.String, core.Object>(); |
1276 if (name != null) { | 1284 if (name != null) { |
1277 _json["name"] = name; | 1285 _json["name"] = name; |
1278 } | 1286 } |
1279 return _json; | 1287 return _json; |
1280 } | 1288 } |
1281 } | 1289 } |
1282 | 1290 |
1283 /** Represents a string that might be shortened to a specified length. */ | 1291 /// Represents a string that might be shortened to a specified length. |
1284 class TruncatableString { | 1292 class TruncatableString { |
1285 /** | 1293 /// The number of bytes removed from the original string. If this |
1286 * The number of bytes removed from the original string. If this | 1294 /// value is 0, then the string was not shortened. |
1287 * value is 0, then the string was not shortened. | |
1288 */ | |
1289 core.int truncatedByteCount; | 1295 core.int truncatedByteCount; |
1290 /** | 1296 |
1291 * The shortened string. For example, if the original string was 500 | 1297 /// The shortened string. For example, if the original string was 500 |
1292 * bytes long and the limit of the string was 128 bytes, then this | 1298 /// bytes long and the limit of the string was 128 bytes, then this |
1293 * value contains the first 128 bytes of the 500-byte string. Note that | 1299 /// value contains the first 128 bytes of the 500-byte string. Note that |
1294 * truncation always happens on the character boundary, to ensure that | 1300 /// truncation always happens on the character boundary, to ensure that |
1295 * truncated string is still valid UTF8. In case of multi-byte characters, | 1301 /// truncated string is still valid UTF8. In case of multi-byte characters, |
1296 * size of truncated string can be less than truncation limit. | 1302 /// size of truncated string can be less than truncation limit. |
1297 */ | |
1298 core.String value; | 1303 core.String value; |
1299 | 1304 |
1300 TruncatableString(); | 1305 TruncatableString(); |
1301 | 1306 |
1302 TruncatableString.fromJson(core.Map _json) { | 1307 TruncatableString.fromJson(core.Map _json) { |
1303 if (_json.containsKey("truncatedByteCount")) { | 1308 if (_json.containsKey("truncatedByteCount")) { |
1304 truncatedByteCount = _json["truncatedByteCount"]; | 1309 truncatedByteCount = _json["truncatedByteCount"]; |
1305 } | 1310 } |
1306 if (_json.containsKey("value")) { | 1311 if (_json.containsKey("value")) { |
1307 value = _json["value"]; | 1312 value = _json["value"]; |
1308 } | 1313 } |
1309 } | 1314 } |
1310 | 1315 |
1311 core.Map<core.String, core.Object> toJson() { | 1316 core.Map<core.String, core.Object> toJson() { |
1312 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1317 final core.Map<core.String, core.Object> _json = |
| 1318 new core.Map<core.String, core.Object>(); |
1313 if (truncatedByteCount != null) { | 1319 if (truncatedByteCount != null) { |
1314 _json["truncatedByteCount"] = truncatedByteCount; | 1320 _json["truncatedByteCount"] = truncatedByteCount; |
1315 } | 1321 } |
1316 if (value != null) { | 1322 if (value != null) { |
1317 _json["value"] = value; | 1323 _json["value"] = value; |
1318 } | 1324 } |
1319 return _json; | 1325 return _json; |
1320 } | 1326 } |
1321 } | 1327 } |
OLD | NEW |