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.mirror.v1; | 3 library googleapis.mirror.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, Media, UploadOptions, | 13 show |
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, | 14 ApiRequestError, |
15 ByteRange; | 15 DetailedApiRequestError, |
| 16 Media, |
| 17 UploadOptions, |
| 18 ResumableUploadOptions, |
| 19 DownloadOptions, |
| 20 PartialDownloadOptions, |
| 21 ByteRange; |
16 | 22 |
17 const core.String USER_AGENT = 'dart-api-client mirror/v1'; | 23 const core.String USER_AGENT = 'dart-api-client mirror/v1'; |
18 | 24 |
19 /** Interacts with Glass users via the timeline. */ | 25 /// Interacts with Glass users via the timeline. |
20 class MirrorApi { | 26 class MirrorApi { |
21 /** View your location */ | 27 /// View your location |
22 static const GlassLocationScope = "https://www.googleapis.com/auth/glass.locat
ion"; | 28 static const GlassLocationScope = |
| 29 "https://www.googleapis.com/auth/glass.location"; |
23 | 30 |
24 /** View and manage your Glass timeline */ | 31 /// View and manage your Glass timeline |
25 static const GlassTimelineScope = "https://www.googleapis.com/auth/glass.timel
ine"; | 32 static const GlassTimelineScope = |
26 | 33 "https://www.googleapis.com/auth/glass.timeline"; |
27 | 34 |
28 final commons.ApiRequester _requester; | 35 final commons.ApiRequester _requester; |
29 | 36 |
30 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 37 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
31 ContactsResourceApi get contacts => new ContactsResourceApi(_requester); | 38 ContactsResourceApi get contacts => new ContactsResourceApi(_requester); |
32 LocationsResourceApi get locations => new LocationsResourceApi(_requester); | 39 LocationsResourceApi get locations => new LocationsResourceApi(_requester); |
33 SettingsResourceApi get settings => new SettingsResourceApi(_requester); | 40 SettingsResourceApi get settings => new SettingsResourceApi(_requester); |
34 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re
quester); | 41 SubscriptionsResourceApi get subscriptions => |
| 42 new SubscriptionsResourceApi(_requester); |
35 TimelineResourceApi get timeline => new TimelineResourceApi(_requester); | 43 TimelineResourceApi get timeline => new TimelineResourceApi(_requester); |
36 | 44 |
37 MirrorApi(http.Client client, {core.String rootUrl: "https://www.googleapis.co
m/", core.String servicePath: "mirror/v1/"}) : | 45 MirrorApi(http.Client client, |
38 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 46 {core.String rootUrl: "https://www.googleapis.com/", |
| 47 core.String servicePath: "mirror/v1/"}) |
| 48 : _requester = |
| 49 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
39 } | 50 } |
40 | 51 |
41 | |
42 class AccountsResourceApi { | 52 class AccountsResourceApi { |
43 final commons.ApiRequester _requester; | 53 final commons.ApiRequester _requester; |
44 | 54 |
45 AccountsResourceApi(commons.ApiRequester client) : | 55 AccountsResourceApi(commons.ApiRequester client) : _requester = client; |
46 _requester = client; | |
47 | 56 |
48 /** | 57 /// Inserts a new account for a user |
49 * Inserts a new account for a user | 58 /// |
50 * | 59 /// [request] - The metadata request object. |
51 * [request] - The metadata request object. | 60 /// |
52 * | 61 /// Request parameters: |
53 * Request parameters: | 62 /// |
54 * | 63 /// [userToken] - The ID for the user. |
55 * [userToken] - The ID for the user. | 64 /// |
56 * | 65 /// [accountType] - Account type to be passed to Android Account Manager. |
57 * [accountType] - Account type to be passed to Android Account Manager. | 66 /// |
58 * | 67 /// [accountName] - The name of the account to be passed to the Android |
59 * [accountName] - The name of the account to be passed to the Android Account | 68 /// Account Manager. |
60 * Manager. | 69 /// |
61 * | 70 /// Completes with a [Account]. |
62 * Completes with a [Account]. | 71 /// |
63 * | 72 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
64 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 73 /// an error. |
65 * error. | 74 /// |
66 * | 75 /// If the used [http.Client] completes with an error when making a REST |
67 * If the used [http.Client] completes with an error when making a REST call, | 76 /// call, this method will complete with the same error. |
68 * this method will complete with the same error. | 77 async.Future<Account> insert(Account request, core.String userToken, |
69 */ | 78 core.String accountType, core.String accountName) { |
70 async.Future<Account> insert(Account request, core.String userToken, core.Stri
ng accountType, core.String accountName) { | |
71 var _url = null; | 79 var _url = null; |
72 var _queryParams = new core.Map(); | 80 var _queryParams = new core.Map(); |
73 var _uploadMedia = null; | 81 var _uploadMedia = null; |
74 var _uploadOptions = null; | 82 var _uploadOptions = null; |
75 var _downloadOptions = commons.DownloadOptions.Metadata; | 83 var _downloadOptions = commons.DownloadOptions.Metadata; |
76 var _body = null; | 84 var _body = null; |
77 | 85 |
78 if (request != null) { | 86 if (request != null) { |
79 _body = convert.JSON.encode((request).toJson()); | 87 _body = convert.JSON.encode((request).toJson()); |
80 } | 88 } |
81 if (userToken == null) { | 89 if (userToken == null) { |
82 throw new core.ArgumentError("Parameter userToken is required."); | 90 throw new core.ArgumentError("Parameter userToken is required."); |
83 } | 91 } |
84 if (accountType == null) { | 92 if (accountType == null) { |
85 throw new core.ArgumentError("Parameter accountType is required."); | 93 throw new core.ArgumentError("Parameter accountType is required."); |
86 } | 94 } |
87 if (accountName == null) { | 95 if (accountName == null) { |
88 throw new core.ArgumentError("Parameter accountName is required."); | 96 throw new core.ArgumentError("Parameter accountName is required."); |
89 } | 97 } |
90 | 98 |
91 _url = 'accounts/' + commons.Escaper.ecapeVariable('$userToken') + '/' + com
mons.Escaper.ecapeVariable('$accountType') + '/' + commons.Escaper.ecapeVariable
('$accountName'); | 99 _url = 'accounts/' + |
| 100 commons.Escaper.ecapeVariable('$userToken') + |
| 101 '/' + |
| 102 commons.Escaper.ecapeVariable('$accountType') + |
| 103 '/' + |
| 104 commons.Escaper.ecapeVariable('$accountName'); |
92 | 105 |
93 var _response = _requester.request(_url, | 106 var _response = _requester.request(_url, "POST", |
94 "POST", | 107 body: _body, |
95 body: _body, | 108 queryParams: _queryParams, |
96 queryParams: _queryParams, | 109 uploadOptions: _uploadOptions, |
97 uploadOptions: _uploadOptions, | 110 uploadMedia: _uploadMedia, |
98 uploadMedia: _uploadMedia, | 111 downloadOptions: _downloadOptions); |
99 downloadOptions: _downloadOptions); | |
100 return _response.then((data) => new Account.fromJson(data)); | 112 return _response.then((data) => new Account.fromJson(data)); |
101 } | 113 } |
102 | |
103 } | 114 } |
104 | 115 |
105 | |
106 class ContactsResourceApi { | 116 class ContactsResourceApi { |
107 final commons.ApiRequester _requester; | 117 final commons.ApiRequester _requester; |
108 | 118 |
109 ContactsResourceApi(commons.ApiRequester client) : | 119 ContactsResourceApi(commons.ApiRequester client) : _requester = client; |
110 _requester = client; | |
111 | 120 |
112 /** | 121 /// Deletes a contact. |
113 * Deletes a contact. | 122 /// |
114 * | 123 /// Request parameters: |
115 * Request parameters: | 124 /// |
116 * | 125 /// [id] - The ID of the contact. |
117 * [id] - The ID of the contact. | 126 /// |
118 * | 127 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
119 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 128 /// an error. |
120 * error. | 129 /// |
121 * | 130 /// 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, | 131 /// call, this method will complete with the same error. |
123 * this method will complete with the same error. | |
124 */ | |
125 async.Future delete(core.String id) { | 132 async.Future delete(core.String id) { |
126 var _url = null; | 133 var _url = null; |
127 var _queryParams = new core.Map(); | 134 var _queryParams = new core.Map(); |
128 var _uploadMedia = null; | 135 var _uploadMedia = null; |
129 var _uploadOptions = null; | 136 var _uploadOptions = null; |
130 var _downloadOptions = commons.DownloadOptions.Metadata; | 137 var _downloadOptions = commons.DownloadOptions.Metadata; |
131 var _body = null; | 138 var _body = null; |
132 | 139 |
133 if (id == null) { | 140 if (id == null) { |
134 throw new core.ArgumentError("Parameter id is required."); | 141 throw new core.ArgumentError("Parameter id is required."); |
135 } | 142 } |
136 | 143 |
137 _downloadOptions = null; | 144 _downloadOptions = null; |
138 | 145 |
139 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); | 146 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); |
140 | 147 |
141 var _response = _requester.request(_url, | 148 var _response = _requester.request(_url, "DELETE", |
142 "DELETE", | 149 body: _body, |
143 body: _body, | 150 queryParams: _queryParams, |
144 queryParams: _queryParams, | 151 uploadOptions: _uploadOptions, |
145 uploadOptions: _uploadOptions, | 152 uploadMedia: _uploadMedia, |
146 uploadMedia: _uploadMedia, | 153 downloadOptions: _downloadOptions); |
147 downloadOptions: _downloadOptions); | |
148 return _response.then((data) => null); | 154 return _response.then((data) => null); |
149 } | 155 } |
150 | 156 |
151 /** | 157 /// Gets a single contact by ID. |
152 * Gets a single contact by ID. | 158 /// |
153 * | 159 /// Request parameters: |
154 * Request parameters: | 160 /// |
155 * | 161 /// [id] - The ID of the contact. |
156 * [id] - The ID of the contact. | 162 /// |
157 * | 163 /// Completes with a [Contact]. |
158 * Completes with a [Contact]. | 164 /// |
159 * | 165 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 166 /// an error. |
161 * error. | 167 /// |
162 * | 168 /// If the used [http.Client] completes with an error when making a REST |
163 * If the used [http.Client] completes with an error when making a REST call, | 169 /// call, this method will complete with the same error. |
164 * this method will complete with the same error. | |
165 */ | |
166 async.Future<Contact> get(core.String id) { | 170 async.Future<Contact> get(core.String id) { |
167 var _url = null; | 171 var _url = null; |
168 var _queryParams = new core.Map(); | 172 var _queryParams = new core.Map(); |
169 var _uploadMedia = null; | 173 var _uploadMedia = null; |
170 var _uploadOptions = null; | 174 var _uploadOptions = null; |
171 var _downloadOptions = commons.DownloadOptions.Metadata; | 175 var _downloadOptions = commons.DownloadOptions.Metadata; |
172 var _body = null; | 176 var _body = null; |
173 | 177 |
174 if (id == null) { | 178 if (id == null) { |
175 throw new core.ArgumentError("Parameter id is required."); | 179 throw new core.ArgumentError("Parameter id is required."); |
176 } | 180 } |
177 | 181 |
178 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); | 182 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); |
179 | 183 |
180 var _response = _requester.request(_url, | 184 var _response = _requester.request(_url, "GET", |
181 "GET", | 185 body: _body, |
182 body: _body, | 186 queryParams: _queryParams, |
183 queryParams: _queryParams, | 187 uploadOptions: _uploadOptions, |
184 uploadOptions: _uploadOptions, | 188 uploadMedia: _uploadMedia, |
185 uploadMedia: _uploadMedia, | 189 downloadOptions: _downloadOptions); |
186 downloadOptions: _downloadOptions); | |
187 return _response.then((data) => new Contact.fromJson(data)); | 190 return _response.then((data) => new Contact.fromJson(data)); |
188 } | 191 } |
189 | 192 |
190 /** | 193 /// Inserts a new contact. |
191 * Inserts a new contact. | 194 /// |
192 * | 195 /// [request] - The metadata request object. |
193 * [request] - The metadata request object. | 196 /// |
194 * | 197 /// Request parameters: |
195 * Request parameters: | 198 /// |
196 * | 199 /// Completes with a [Contact]. |
197 * Completes with a [Contact]. | 200 /// |
198 * | 201 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
199 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 202 /// an error. |
200 * error. | 203 /// |
201 * | 204 /// If the used [http.Client] completes with an error when making a REST |
202 * If the used [http.Client] completes with an error when making a REST call, | 205 /// call, this method will complete with the same error. |
203 * this method will complete with the same error. | |
204 */ | |
205 async.Future<Contact> insert(Contact request) { | 206 async.Future<Contact> insert(Contact request) { |
206 var _url = null; | 207 var _url = null; |
207 var _queryParams = new core.Map(); | 208 var _queryParams = new core.Map(); |
208 var _uploadMedia = null; | 209 var _uploadMedia = null; |
209 var _uploadOptions = null; | 210 var _uploadOptions = null; |
210 var _downloadOptions = commons.DownloadOptions.Metadata; | 211 var _downloadOptions = commons.DownloadOptions.Metadata; |
211 var _body = null; | 212 var _body = null; |
212 | 213 |
213 if (request != null) { | 214 if (request != null) { |
214 _body = convert.JSON.encode((request).toJson()); | 215 _body = convert.JSON.encode((request).toJson()); |
215 } | 216 } |
216 | 217 |
217 _url = 'contacts'; | 218 _url = 'contacts'; |
218 | 219 |
219 var _response = _requester.request(_url, | 220 var _response = _requester.request(_url, "POST", |
220 "POST", | 221 body: _body, |
221 body: _body, | 222 queryParams: _queryParams, |
222 queryParams: _queryParams, | 223 uploadOptions: _uploadOptions, |
223 uploadOptions: _uploadOptions, | 224 uploadMedia: _uploadMedia, |
224 uploadMedia: _uploadMedia, | 225 downloadOptions: _downloadOptions); |
225 downloadOptions: _downloadOptions); | |
226 return _response.then((data) => new Contact.fromJson(data)); | 226 return _response.then((data) => new Contact.fromJson(data)); |
227 } | 227 } |
228 | 228 |
229 /** | 229 /// Retrieves a list of contacts for the authenticated user. |
230 * Retrieves a list of contacts for the authenticated user. | 230 /// |
231 * | 231 /// Request parameters: |
232 * Request parameters: | 232 /// |
233 * | 233 /// Completes with a [ContactsListResponse]. |
234 * Completes with a [ContactsListResponse]. | 234 /// |
235 * | 235 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
236 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 236 /// an error. |
237 * error. | 237 /// |
238 * | 238 /// If the used [http.Client] completes with an error when making a REST |
239 * If the used [http.Client] completes with an error when making a REST call, | 239 /// call, this method will complete with the same error. |
240 * this method will complete with the same error. | |
241 */ | |
242 async.Future<ContactsListResponse> list() { | 240 async.Future<ContactsListResponse> list() { |
243 var _url = null; | 241 var _url = null; |
244 var _queryParams = new core.Map(); | 242 var _queryParams = new core.Map(); |
245 var _uploadMedia = null; | 243 var _uploadMedia = null; |
246 var _uploadOptions = null; | 244 var _uploadOptions = null; |
247 var _downloadOptions = commons.DownloadOptions.Metadata; | 245 var _downloadOptions = commons.DownloadOptions.Metadata; |
248 var _body = null; | 246 var _body = null; |
249 | 247 |
250 | |
251 _url = 'contacts'; | 248 _url = 'contacts'; |
252 | 249 |
253 var _response = _requester.request(_url, | 250 var _response = _requester.request(_url, "GET", |
254 "GET", | 251 body: _body, |
255 body: _body, | 252 queryParams: _queryParams, |
256 queryParams: _queryParams, | 253 uploadOptions: _uploadOptions, |
257 uploadOptions: _uploadOptions, | 254 uploadMedia: _uploadMedia, |
258 uploadMedia: _uploadMedia, | 255 downloadOptions: _downloadOptions); |
259 downloadOptions: _downloadOptions); | |
260 return _response.then((data) => new ContactsListResponse.fromJson(data)); | 256 return _response.then((data) => new ContactsListResponse.fromJson(data)); |
261 } | 257 } |
262 | 258 |
263 /** | 259 /// Updates a contact in place. This method supports patch semantics. |
264 * Updates a contact in place. This method supports patch semantics. | 260 /// |
265 * | 261 /// [request] - The metadata request object. |
266 * [request] - The metadata request object. | 262 /// |
267 * | 263 /// Request parameters: |
268 * Request parameters: | 264 /// |
269 * | 265 /// [id] - The ID of the contact. |
270 * [id] - The ID of the contact. | 266 /// |
271 * | 267 /// Completes with a [Contact]. |
272 * Completes with a [Contact]. | 268 /// |
273 * | 269 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 270 /// an error. |
275 * error. | 271 /// |
276 * | 272 /// If the used [http.Client] completes with an error when making a REST |
277 * If the used [http.Client] completes with an error when making a REST call, | 273 /// call, this method will complete with the same error. |
278 * this method will complete with the same error. | |
279 */ | |
280 async.Future<Contact> patch(Contact request, core.String id) { | 274 async.Future<Contact> patch(Contact request, core.String id) { |
281 var _url = null; | 275 var _url = null; |
282 var _queryParams = new core.Map(); | 276 var _queryParams = new core.Map(); |
283 var _uploadMedia = null; | 277 var _uploadMedia = null; |
284 var _uploadOptions = null; | 278 var _uploadOptions = null; |
285 var _downloadOptions = commons.DownloadOptions.Metadata; | 279 var _downloadOptions = commons.DownloadOptions.Metadata; |
286 var _body = null; | 280 var _body = null; |
287 | 281 |
288 if (request != null) { | 282 if (request != null) { |
289 _body = convert.JSON.encode((request).toJson()); | 283 _body = convert.JSON.encode((request).toJson()); |
290 } | 284 } |
291 if (id == null) { | 285 if (id == null) { |
292 throw new core.ArgumentError("Parameter id is required."); | 286 throw new core.ArgumentError("Parameter id is required."); |
293 } | 287 } |
294 | 288 |
295 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); | 289 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); |
296 | 290 |
297 var _response = _requester.request(_url, | 291 var _response = _requester.request(_url, "PATCH", |
298 "PATCH", | 292 body: _body, |
299 body: _body, | 293 queryParams: _queryParams, |
300 queryParams: _queryParams, | 294 uploadOptions: _uploadOptions, |
301 uploadOptions: _uploadOptions, | 295 uploadMedia: _uploadMedia, |
302 uploadMedia: _uploadMedia, | 296 downloadOptions: _downloadOptions); |
303 downloadOptions: _downloadOptions); | |
304 return _response.then((data) => new Contact.fromJson(data)); | 297 return _response.then((data) => new Contact.fromJson(data)); |
305 } | 298 } |
306 | 299 |
307 /** | 300 /// Updates a contact in place. |
308 * Updates a contact in place. | 301 /// |
309 * | 302 /// [request] - The metadata request object. |
310 * [request] - The metadata request object. | 303 /// |
311 * | 304 /// Request parameters: |
312 * Request parameters: | 305 /// |
313 * | 306 /// [id] - The ID of the contact. |
314 * [id] - The ID of the contact. | 307 /// |
315 * | 308 /// Completes with a [Contact]. |
316 * Completes with a [Contact]. | 309 /// |
317 * | 310 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
318 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 311 /// an error. |
319 * error. | 312 /// |
320 * | 313 /// If the used [http.Client] completes with an error when making a REST |
321 * If the used [http.Client] completes with an error when making a REST call, | 314 /// call, this method will complete with the same error. |
322 * this method will complete with the same error. | |
323 */ | |
324 async.Future<Contact> update(Contact request, core.String id) { | 315 async.Future<Contact> update(Contact request, core.String id) { |
325 var _url = null; | 316 var _url = null; |
326 var _queryParams = new core.Map(); | 317 var _queryParams = new core.Map(); |
327 var _uploadMedia = null; | 318 var _uploadMedia = null; |
328 var _uploadOptions = null; | 319 var _uploadOptions = null; |
329 var _downloadOptions = commons.DownloadOptions.Metadata; | 320 var _downloadOptions = commons.DownloadOptions.Metadata; |
330 var _body = null; | 321 var _body = null; |
331 | 322 |
332 if (request != null) { | 323 if (request != null) { |
333 _body = convert.JSON.encode((request).toJson()); | 324 _body = convert.JSON.encode((request).toJson()); |
334 } | 325 } |
335 if (id == null) { | 326 if (id == null) { |
336 throw new core.ArgumentError("Parameter id is required."); | 327 throw new core.ArgumentError("Parameter id is required."); |
337 } | 328 } |
338 | 329 |
339 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); | 330 _url = 'contacts/' + commons.Escaper.ecapeVariable('$id'); |
340 | 331 |
341 var _response = _requester.request(_url, | 332 var _response = _requester.request(_url, "PUT", |
342 "PUT", | 333 body: _body, |
343 body: _body, | 334 queryParams: _queryParams, |
344 queryParams: _queryParams, | 335 uploadOptions: _uploadOptions, |
345 uploadOptions: _uploadOptions, | 336 uploadMedia: _uploadMedia, |
346 uploadMedia: _uploadMedia, | 337 downloadOptions: _downloadOptions); |
347 downloadOptions: _downloadOptions); | |
348 return _response.then((data) => new Contact.fromJson(data)); | 338 return _response.then((data) => new Contact.fromJson(data)); |
349 } | 339 } |
350 | |
351 } | 340 } |
352 | 341 |
353 | |
354 class LocationsResourceApi { | 342 class LocationsResourceApi { |
355 final commons.ApiRequester _requester; | 343 final commons.ApiRequester _requester; |
356 | 344 |
357 LocationsResourceApi(commons.ApiRequester client) : | 345 LocationsResourceApi(commons.ApiRequester client) : _requester = client; |
358 _requester = client; | |
359 | 346 |
360 /** | 347 /// Gets a single location by ID. |
361 * Gets a single location by ID. | 348 /// |
362 * | 349 /// Request parameters: |
363 * Request parameters: | 350 /// |
364 * | 351 /// [id] - The ID of the location or latest for the last known location. |
365 * [id] - The ID of the location or latest for the last known location. | 352 /// |
366 * | 353 /// Completes with a [Location]. |
367 * Completes with a [Location]. | 354 /// |
368 * | 355 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
369 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 356 /// an error. |
370 * error. | 357 /// |
371 * | 358 /// If the used [http.Client] completes with an error when making a REST |
372 * If the used [http.Client] completes with an error when making a REST call, | 359 /// call, this method will complete with the same error. |
373 * this method will complete with the same error. | |
374 */ | |
375 async.Future<Location> get(core.String id) { | 360 async.Future<Location> get(core.String id) { |
376 var _url = null; | 361 var _url = null; |
377 var _queryParams = new core.Map(); | 362 var _queryParams = new core.Map(); |
378 var _uploadMedia = null; | 363 var _uploadMedia = null; |
379 var _uploadOptions = null; | 364 var _uploadOptions = null; |
380 var _downloadOptions = commons.DownloadOptions.Metadata; | 365 var _downloadOptions = commons.DownloadOptions.Metadata; |
381 var _body = null; | 366 var _body = null; |
382 | 367 |
383 if (id == null) { | 368 if (id == null) { |
384 throw new core.ArgumentError("Parameter id is required."); | 369 throw new core.ArgumentError("Parameter id is required."); |
385 } | 370 } |
386 | 371 |
387 _url = 'locations/' + commons.Escaper.ecapeVariable('$id'); | 372 _url = 'locations/' + commons.Escaper.ecapeVariable('$id'); |
388 | 373 |
389 var _response = _requester.request(_url, | 374 var _response = _requester.request(_url, "GET", |
390 "GET", | 375 body: _body, |
391 body: _body, | 376 queryParams: _queryParams, |
392 queryParams: _queryParams, | 377 uploadOptions: _uploadOptions, |
393 uploadOptions: _uploadOptions, | 378 uploadMedia: _uploadMedia, |
394 uploadMedia: _uploadMedia, | 379 downloadOptions: _downloadOptions); |
395 downloadOptions: _downloadOptions); | |
396 return _response.then((data) => new Location.fromJson(data)); | 380 return _response.then((data) => new Location.fromJson(data)); |
397 } | 381 } |
398 | 382 |
399 /** | 383 /// Retrieves a list of locations for the user. |
400 * Retrieves a list of locations for the user. | 384 /// |
401 * | 385 /// Request parameters: |
402 * Request parameters: | 386 /// |
403 * | 387 /// Completes with a [LocationsListResponse]. |
404 * Completes with a [LocationsListResponse]. | 388 /// |
405 * | 389 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
406 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 390 /// an error. |
407 * error. | 391 /// |
408 * | 392 /// If the used [http.Client] completes with an error when making a REST |
409 * If the used [http.Client] completes with an error when making a REST call, | 393 /// call, this method will complete with the same error. |
410 * this method will complete with the same error. | |
411 */ | |
412 async.Future<LocationsListResponse> list() { | 394 async.Future<LocationsListResponse> list() { |
413 var _url = null; | 395 var _url = null; |
414 var _queryParams = new core.Map(); | 396 var _queryParams = new core.Map(); |
415 var _uploadMedia = null; | 397 var _uploadMedia = null; |
416 var _uploadOptions = null; | 398 var _uploadOptions = null; |
417 var _downloadOptions = commons.DownloadOptions.Metadata; | 399 var _downloadOptions = commons.DownloadOptions.Metadata; |
418 var _body = null; | 400 var _body = null; |
419 | 401 |
420 | |
421 _url = 'locations'; | 402 _url = 'locations'; |
422 | 403 |
423 var _response = _requester.request(_url, | 404 var _response = _requester.request(_url, "GET", |
424 "GET", | 405 body: _body, |
425 body: _body, | 406 queryParams: _queryParams, |
426 queryParams: _queryParams, | 407 uploadOptions: _uploadOptions, |
427 uploadOptions: _uploadOptions, | 408 uploadMedia: _uploadMedia, |
428 uploadMedia: _uploadMedia, | 409 downloadOptions: _downloadOptions); |
429 downloadOptions: _downloadOptions); | |
430 return _response.then((data) => new LocationsListResponse.fromJson(data)); | 410 return _response.then((data) => new LocationsListResponse.fromJson(data)); |
431 } | 411 } |
432 | |
433 } | 412 } |
434 | 413 |
435 | |
436 class SettingsResourceApi { | 414 class SettingsResourceApi { |
437 final commons.ApiRequester _requester; | 415 final commons.ApiRequester _requester; |
438 | 416 |
439 SettingsResourceApi(commons.ApiRequester client) : | 417 SettingsResourceApi(commons.ApiRequester client) : _requester = client; |
440 _requester = client; | |
441 | 418 |
442 /** | 419 /// Gets a single setting by ID. |
443 * Gets a single setting by ID. | 420 /// |
444 * | 421 /// Request parameters: |
445 * Request parameters: | 422 /// |
446 * | 423 /// [id] - The ID of the setting. The following IDs are valid: |
447 * [id] - The ID of the setting. The following IDs are valid: | 424 /// - locale - The key to the user’s language/locale (BCP 47 identifier) that |
448 * - locale - The key to the user’s language/locale (BCP 47 identifier) that | 425 /// Glassware should use to render localized content. |
449 * Glassware should use to render localized content. | 426 /// - timezone - The key to the user’s current time zone region as defined in |
450 * - timezone - The key to the user’s current time zone region as defined in | 427 /// the tz database. Example: America/Los_Angeles. |
451 * the tz database. Example: America/Los_Angeles. | 428 /// |
452 * | 429 /// Completes with a [Setting]. |
453 * Completes with a [Setting]. | 430 /// |
454 * | 431 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
455 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 432 /// an error. |
456 * error. | 433 /// |
457 * | 434 /// If the used [http.Client] completes with an error when making a REST |
458 * If the used [http.Client] completes with an error when making a REST call, | 435 /// call, this method will complete with the same error. |
459 * this method will complete with the same error. | |
460 */ | |
461 async.Future<Setting> get(core.String id) { | 436 async.Future<Setting> get(core.String id) { |
462 var _url = null; | 437 var _url = null; |
463 var _queryParams = new core.Map(); | 438 var _queryParams = new core.Map(); |
464 var _uploadMedia = null; | 439 var _uploadMedia = null; |
465 var _uploadOptions = null; | 440 var _uploadOptions = null; |
466 var _downloadOptions = commons.DownloadOptions.Metadata; | 441 var _downloadOptions = commons.DownloadOptions.Metadata; |
467 var _body = null; | 442 var _body = null; |
468 | 443 |
469 if (id == null) { | 444 if (id == null) { |
470 throw new core.ArgumentError("Parameter id is required."); | 445 throw new core.ArgumentError("Parameter id is required."); |
471 } | 446 } |
472 | 447 |
473 _url = 'settings/' + commons.Escaper.ecapeVariable('$id'); | 448 _url = 'settings/' + commons.Escaper.ecapeVariable('$id'); |
474 | 449 |
475 var _response = _requester.request(_url, | 450 var _response = _requester.request(_url, "GET", |
476 "GET", | 451 body: _body, |
477 body: _body, | 452 queryParams: _queryParams, |
478 queryParams: _queryParams, | 453 uploadOptions: _uploadOptions, |
479 uploadOptions: _uploadOptions, | 454 uploadMedia: _uploadMedia, |
480 uploadMedia: _uploadMedia, | 455 downloadOptions: _downloadOptions); |
481 downloadOptions: _downloadOptions); | |
482 return _response.then((data) => new Setting.fromJson(data)); | 456 return _response.then((data) => new Setting.fromJson(data)); |
483 } | 457 } |
484 | |
485 } | 458 } |
486 | 459 |
487 | |
488 class SubscriptionsResourceApi { | 460 class SubscriptionsResourceApi { |
489 final commons.ApiRequester _requester; | 461 final commons.ApiRequester _requester; |
490 | 462 |
491 SubscriptionsResourceApi(commons.ApiRequester client) : | 463 SubscriptionsResourceApi(commons.ApiRequester client) : _requester = client; |
492 _requester = client; | |
493 | 464 |
494 /** | 465 /// Deletes a subscription. |
495 * Deletes a subscription. | 466 /// |
496 * | 467 /// Request parameters: |
497 * Request parameters: | 468 /// |
498 * | 469 /// [id] - The ID of the subscription. |
499 * [id] - The ID of the subscription. | 470 /// |
500 * | 471 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
501 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 472 /// an error. |
502 * error. | 473 /// |
503 * | 474 /// If the used [http.Client] completes with an error when making a REST |
504 * If the used [http.Client] completes with an error when making a REST call, | 475 /// call, this method will complete with the same error. |
505 * this method will complete with the same error. | |
506 */ | |
507 async.Future delete(core.String id) { | 476 async.Future delete(core.String id) { |
508 var _url = null; | 477 var _url = null; |
509 var _queryParams = new core.Map(); | 478 var _queryParams = new core.Map(); |
510 var _uploadMedia = null; | 479 var _uploadMedia = null; |
511 var _uploadOptions = null; | 480 var _uploadOptions = null; |
512 var _downloadOptions = commons.DownloadOptions.Metadata; | 481 var _downloadOptions = commons.DownloadOptions.Metadata; |
513 var _body = null; | 482 var _body = null; |
514 | 483 |
515 if (id == null) { | 484 if (id == null) { |
516 throw new core.ArgumentError("Parameter id is required."); | 485 throw new core.ArgumentError("Parameter id is required."); |
517 } | 486 } |
518 | 487 |
519 _downloadOptions = null; | 488 _downloadOptions = null; |
520 | 489 |
521 _url = 'subscriptions/' + commons.Escaper.ecapeVariable('$id'); | 490 _url = 'subscriptions/' + commons.Escaper.ecapeVariable('$id'); |
522 | 491 |
523 var _response = _requester.request(_url, | 492 var _response = _requester.request(_url, "DELETE", |
524 "DELETE", | 493 body: _body, |
525 body: _body, | 494 queryParams: _queryParams, |
526 queryParams: _queryParams, | 495 uploadOptions: _uploadOptions, |
527 uploadOptions: _uploadOptions, | 496 uploadMedia: _uploadMedia, |
528 uploadMedia: _uploadMedia, | 497 downloadOptions: _downloadOptions); |
529 downloadOptions: _downloadOptions); | |
530 return _response.then((data) => null); | 498 return _response.then((data) => null); |
531 } | 499 } |
532 | 500 |
533 /** | 501 /// Creates a new subscription. |
534 * Creates a new subscription. | 502 /// |
535 * | 503 /// [request] - The metadata request object. |
536 * [request] - The metadata request object. | 504 /// |
537 * | 505 /// Request parameters: |
538 * Request parameters: | 506 /// |
539 * | 507 /// Completes with a [Subscription]. |
540 * Completes with a [Subscription]. | 508 /// |
541 * | 509 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
542 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 510 /// an error. |
543 * error. | 511 /// |
544 * | 512 /// If the used [http.Client] completes with an error when making a REST |
545 * If the used [http.Client] completes with an error when making a REST call, | 513 /// call, this method will complete with the same error. |
546 * this method will complete with the same error. | |
547 */ | |
548 async.Future<Subscription> insert(Subscription request) { | 514 async.Future<Subscription> insert(Subscription request) { |
549 var _url = null; | 515 var _url = null; |
550 var _queryParams = new core.Map(); | 516 var _queryParams = new core.Map(); |
551 var _uploadMedia = null; | 517 var _uploadMedia = null; |
552 var _uploadOptions = null; | 518 var _uploadOptions = null; |
553 var _downloadOptions = commons.DownloadOptions.Metadata; | 519 var _downloadOptions = commons.DownloadOptions.Metadata; |
554 var _body = null; | 520 var _body = null; |
555 | 521 |
556 if (request != null) { | 522 if (request != null) { |
557 _body = convert.JSON.encode((request).toJson()); | 523 _body = convert.JSON.encode((request).toJson()); |
558 } | 524 } |
559 | 525 |
560 _url = 'subscriptions'; | 526 _url = 'subscriptions'; |
561 | 527 |
562 var _response = _requester.request(_url, | 528 var _response = _requester.request(_url, "POST", |
563 "POST", | 529 body: _body, |
564 body: _body, | 530 queryParams: _queryParams, |
565 queryParams: _queryParams, | 531 uploadOptions: _uploadOptions, |
566 uploadOptions: _uploadOptions, | 532 uploadMedia: _uploadMedia, |
567 uploadMedia: _uploadMedia, | 533 downloadOptions: _downloadOptions); |
568 downloadOptions: _downloadOptions); | |
569 return _response.then((data) => new Subscription.fromJson(data)); | 534 return _response.then((data) => new Subscription.fromJson(data)); |
570 } | 535 } |
571 | 536 |
572 /** | 537 /// Retrieves a list of subscriptions for the authenticated user and service. |
573 * Retrieves a list of subscriptions for the authenticated user and service. | 538 /// |
574 * | 539 /// Request parameters: |
575 * Request parameters: | 540 /// |
576 * | 541 /// Completes with a [SubscriptionsListResponse]. |
577 * Completes with a [SubscriptionsListResponse]. | 542 /// |
578 * | 543 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
579 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 544 /// an error. |
580 * error. | 545 /// |
581 * | 546 /// If the used [http.Client] completes with an error when making a REST |
582 * If the used [http.Client] completes with an error when making a REST call, | 547 /// call, this method will complete with the same error. |
583 * this method will complete with the same error. | |
584 */ | |
585 async.Future<SubscriptionsListResponse> list() { | 548 async.Future<SubscriptionsListResponse> list() { |
586 var _url = null; | 549 var _url = null; |
587 var _queryParams = new core.Map(); | 550 var _queryParams = new core.Map(); |
588 var _uploadMedia = null; | 551 var _uploadMedia = null; |
589 var _uploadOptions = null; | 552 var _uploadOptions = null; |
590 var _downloadOptions = commons.DownloadOptions.Metadata; | 553 var _downloadOptions = commons.DownloadOptions.Metadata; |
591 var _body = null; | 554 var _body = null; |
592 | 555 |
593 | |
594 _url = 'subscriptions'; | 556 _url = 'subscriptions'; |
595 | 557 |
596 var _response = _requester.request(_url, | 558 var _response = _requester.request(_url, "GET", |
597 "GET", | 559 body: _body, |
598 body: _body, | 560 queryParams: _queryParams, |
599 queryParams: _queryParams, | 561 uploadOptions: _uploadOptions, |
600 uploadOptions: _uploadOptions, | 562 uploadMedia: _uploadMedia, |
601 uploadMedia: _uploadMedia, | 563 downloadOptions: _downloadOptions); |
602 downloadOptions: _downloadOptions); | 564 return _response |
603 return _response.then((data) => new SubscriptionsListResponse.fromJson(data)
); | 565 .then((data) => new SubscriptionsListResponse.fromJson(data)); |
604 } | 566 } |
605 | 567 |
606 /** | 568 /// Updates an existing subscription in place. |
607 * Updates an existing subscription in place. | 569 /// |
608 * | 570 /// [request] - The metadata request object. |
609 * [request] - The metadata request object. | 571 /// |
610 * | 572 /// Request parameters: |
611 * Request parameters: | 573 /// |
612 * | 574 /// [id] - The ID of the subscription. |
613 * [id] - The ID of the subscription. | 575 /// |
614 * | 576 /// Completes with a [Subscription]. |
615 * Completes with a [Subscription]. | 577 /// |
616 * | 578 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
617 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 579 /// an error. |
618 * error. | 580 /// |
619 * | 581 /// If the used [http.Client] completes with an error when making a REST |
620 * If the used [http.Client] completes with an error when making a REST call, | 582 /// call, this method will complete with the same error. |
621 * this method will complete with the same error. | |
622 */ | |
623 async.Future<Subscription> update(Subscription request, core.String id) { | 583 async.Future<Subscription> update(Subscription request, core.String id) { |
624 var _url = null; | 584 var _url = null; |
625 var _queryParams = new core.Map(); | 585 var _queryParams = new core.Map(); |
626 var _uploadMedia = null; | 586 var _uploadMedia = null; |
627 var _uploadOptions = null; | 587 var _uploadOptions = null; |
628 var _downloadOptions = commons.DownloadOptions.Metadata; | 588 var _downloadOptions = commons.DownloadOptions.Metadata; |
629 var _body = null; | 589 var _body = null; |
630 | 590 |
631 if (request != null) { | 591 if (request != null) { |
632 _body = convert.JSON.encode((request).toJson()); | 592 _body = convert.JSON.encode((request).toJson()); |
633 } | 593 } |
634 if (id == null) { | 594 if (id == null) { |
635 throw new core.ArgumentError("Parameter id is required."); | 595 throw new core.ArgumentError("Parameter id is required."); |
636 } | 596 } |
637 | 597 |
638 _url = 'subscriptions/' + commons.Escaper.ecapeVariable('$id'); | 598 _url = 'subscriptions/' + commons.Escaper.ecapeVariable('$id'); |
639 | 599 |
640 var _response = _requester.request(_url, | 600 var _response = _requester.request(_url, "PUT", |
641 "PUT", | 601 body: _body, |
642 body: _body, | 602 queryParams: _queryParams, |
643 queryParams: _queryParams, | 603 uploadOptions: _uploadOptions, |
644 uploadOptions: _uploadOptions, | 604 uploadMedia: _uploadMedia, |
645 uploadMedia: _uploadMedia, | 605 downloadOptions: _downloadOptions); |
646 downloadOptions: _downloadOptions); | |
647 return _response.then((data) => new Subscription.fromJson(data)); | 606 return _response.then((data) => new Subscription.fromJson(data)); |
648 } | 607 } |
649 | |
650 } | 608 } |
651 | 609 |
652 | |
653 class TimelineResourceApi { | 610 class TimelineResourceApi { |
654 final commons.ApiRequester _requester; | 611 final commons.ApiRequester _requester; |
655 | 612 |
656 TimelineAttachmentsResourceApi get attachments => new TimelineAttachmentsResou
rceApi(_requester); | 613 TimelineAttachmentsResourceApi get attachments => |
| 614 new TimelineAttachmentsResourceApi(_requester); |
657 | 615 |
658 TimelineResourceApi(commons.ApiRequester client) : | 616 TimelineResourceApi(commons.ApiRequester client) : _requester = client; |
659 _requester = client; | |
660 | 617 |
661 /** | 618 /// Deletes a timeline item. |
662 * Deletes a timeline item. | 619 /// |
663 * | 620 /// Request parameters: |
664 * Request parameters: | 621 /// |
665 * | 622 /// [id] - The ID of the timeline item. |
666 * [id] - The ID of the timeline item. | 623 /// |
667 * | 624 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
668 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 625 /// an error. |
669 * error. | 626 /// |
670 * | 627 /// If the used [http.Client] completes with an error when making a REST |
671 * If the used [http.Client] completes with an error when making a REST call, | 628 /// call, this method will complete with the same error. |
672 * this method will complete with the same error. | |
673 */ | |
674 async.Future delete(core.String id) { | 629 async.Future delete(core.String id) { |
675 var _url = null; | 630 var _url = null; |
676 var _queryParams = new core.Map(); | 631 var _queryParams = new core.Map(); |
677 var _uploadMedia = null; | 632 var _uploadMedia = null; |
678 var _uploadOptions = null; | 633 var _uploadOptions = null; |
679 var _downloadOptions = commons.DownloadOptions.Metadata; | 634 var _downloadOptions = commons.DownloadOptions.Metadata; |
680 var _body = null; | 635 var _body = null; |
681 | 636 |
682 if (id == null) { | 637 if (id == null) { |
683 throw new core.ArgumentError("Parameter id is required."); | 638 throw new core.ArgumentError("Parameter id is required."); |
684 } | 639 } |
685 | 640 |
686 _downloadOptions = null; | 641 _downloadOptions = null; |
687 | 642 |
688 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); | 643 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); |
689 | 644 |
690 var _response = _requester.request(_url, | 645 var _response = _requester.request(_url, "DELETE", |
691 "DELETE", | 646 body: _body, |
692 body: _body, | 647 queryParams: _queryParams, |
693 queryParams: _queryParams, | 648 uploadOptions: _uploadOptions, |
694 uploadOptions: _uploadOptions, | 649 uploadMedia: _uploadMedia, |
695 uploadMedia: _uploadMedia, | 650 downloadOptions: _downloadOptions); |
696 downloadOptions: _downloadOptions); | |
697 return _response.then((data) => null); | 651 return _response.then((data) => null); |
698 } | 652 } |
699 | 653 |
700 /** | 654 /// Gets a single timeline item by ID. |
701 * Gets a single timeline item by ID. | 655 /// |
702 * | 656 /// Request parameters: |
703 * Request parameters: | 657 /// |
704 * | 658 /// [id] - The ID of the timeline item. |
705 * [id] - The ID of the timeline item. | 659 /// |
706 * | 660 /// Completes with a [TimelineItem]. |
707 * Completes with a [TimelineItem]. | 661 /// |
708 * | 662 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
709 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 663 /// an error. |
710 * error. | 664 /// |
711 * | 665 /// If the used [http.Client] completes with an error when making a REST |
712 * If the used [http.Client] completes with an error when making a REST call, | 666 /// call, this method will complete with the same error. |
713 * this method will complete with the same error. | |
714 */ | |
715 async.Future<TimelineItem> get(core.String id) { | 667 async.Future<TimelineItem> get(core.String id) { |
716 var _url = null; | 668 var _url = null; |
717 var _queryParams = new core.Map(); | 669 var _queryParams = new core.Map(); |
718 var _uploadMedia = null; | 670 var _uploadMedia = null; |
719 var _uploadOptions = null; | 671 var _uploadOptions = null; |
720 var _downloadOptions = commons.DownloadOptions.Metadata; | 672 var _downloadOptions = commons.DownloadOptions.Metadata; |
721 var _body = null; | 673 var _body = null; |
722 | 674 |
723 if (id == null) { | 675 if (id == null) { |
724 throw new core.ArgumentError("Parameter id is required."); | 676 throw new core.ArgumentError("Parameter id is required."); |
725 } | 677 } |
726 | 678 |
727 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); | 679 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); |
728 | 680 |
729 var _response = _requester.request(_url, | 681 var _response = _requester.request(_url, "GET", |
730 "GET", | 682 body: _body, |
731 body: _body, | 683 queryParams: _queryParams, |
732 queryParams: _queryParams, | 684 uploadOptions: _uploadOptions, |
733 uploadOptions: _uploadOptions, | 685 uploadMedia: _uploadMedia, |
734 uploadMedia: _uploadMedia, | 686 downloadOptions: _downloadOptions); |
735 downloadOptions: _downloadOptions); | |
736 return _response.then((data) => new TimelineItem.fromJson(data)); | 687 return _response.then((data) => new TimelineItem.fromJson(data)); |
737 } | 688 } |
738 | 689 |
739 /** | 690 /// Inserts a new item into the timeline. |
740 * Inserts a new item into the timeline. | 691 /// |
741 * | 692 /// [request] - The metadata request object. |
742 * [request] - The metadata request object. | 693 /// |
743 * | 694 /// Request parameters: |
744 * Request parameters: | 695 /// |
745 * | 696 /// [uploadMedia] - The media to upload. |
746 * [uploadMedia] - The media to upload. | 697 /// |
747 * | 698 /// [uploadOptions] - Options for the media upload. Streaming Media without |
748 * [uploadOptions] - Options for the media upload. Streaming Media without the | 699 /// the length being known ahead of time is only supported via resumable |
749 * length being known ahead of time is only supported via resumable uploads. | 700 /// uploads. |
750 * | 701 /// |
751 * Completes with a [TimelineItem]. | 702 /// Completes with a [TimelineItem]. |
752 * | 703 /// |
753 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 704 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
754 * error. | 705 /// an error. |
755 * | 706 /// |
756 * If the used [http.Client] completes with an error when making a REST call, | 707 /// If the used [http.Client] completes with an error when making a REST |
757 * this method will complete with the same error. | 708 /// call, this method will complete with the same error. |
758 */ | 709 async.Future<TimelineItem> insert(TimelineItem request, |
759 async.Future<TimelineItem> insert(TimelineItem request, {commons.UploadOptions
uploadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) { | 710 {commons.UploadOptions uploadOptions: commons.UploadOptions.Default, |
| 711 commons.Media uploadMedia}) { |
760 var _url = null; | 712 var _url = null; |
761 var _queryParams = new core.Map(); | 713 var _queryParams = new core.Map(); |
762 var _uploadMedia = null; | 714 var _uploadMedia = null; |
763 var _uploadOptions = null; | 715 var _uploadOptions = null; |
764 var _downloadOptions = commons.DownloadOptions.Metadata; | 716 var _downloadOptions = commons.DownloadOptions.Metadata; |
765 var _body = null; | 717 var _body = null; |
766 | 718 |
767 if (request != null) { | 719 if (request != null) { |
768 _body = convert.JSON.encode((request).toJson()); | 720 _body = convert.JSON.encode((request).toJson()); |
769 } | 721 } |
770 | 722 |
771 _uploadMedia = uploadMedia; | 723 _uploadMedia = uploadMedia; |
772 _uploadOptions = uploadOptions; | 724 _uploadOptions = uploadOptions; |
773 | 725 |
774 if (_uploadMedia == null) { | 726 if (_uploadMedia == null) { |
775 _url = 'timeline'; | 727 _url = 'timeline'; |
776 } else if (_uploadOptions is commons.ResumableUploadOptions) { | 728 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
777 _url = '/resumable/upload/mirror/v1/timeline'; | 729 _url = '/resumable/upload/mirror/v1/timeline'; |
778 } else { | 730 } else { |
779 _url = '/upload/mirror/v1/timeline'; | 731 _url = '/upload/mirror/v1/timeline'; |
780 } | 732 } |
781 | 733 |
782 | 734 var _response = _requester.request(_url, "POST", |
783 var _response = _requester.request(_url, | 735 body: _body, |
784 "POST", | 736 queryParams: _queryParams, |
785 body: _body, | 737 uploadOptions: _uploadOptions, |
786 queryParams: _queryParams, | 738 uploadMedia: _uploadMedia, |
787 uploadOptions: _uploadOptions, | 739 downloadOptions: _downloadOptions); |
788 uploadMedia: _uploadMedia, | |
789 downloadOptions: _downloadOptions); | |
790 return _response.then((data) => new TimelineItem.fromJson(data)); | 740 return _response.then((data) => new TimelineItem.fromJson(data)); |
791 } | 741 } |
792 | 742 |
793 /** | 743 /// Retrieves a list of timeline items for the authenticated user. |
794 * Retrieves a list of timeline items for the authenticated user. | 744 /// |
795 * | 745 /// Request parameters: |
796 * Request parameters: | 746 /// |
797 * | 747 /// [bundleId] - If provided, only items with the given bundleId will be |
798 * [bundleId] - If provided, only items with the given bundleId will be | 748 /// returned. |
799 * returned. | 749 /// |
800 * | 750 /// [includeDeleted] - If true, tombstone records for deleted items will be |
801 * [includeDeleted] - If true, tombstone records for deleted items will be | 751 /// returned. |
802 * returned. | 752 /// |
803 * | 753 /// [maxResults] - The maximum number of items to include in the response, |
804 * [maxResults] - The maximum number of items to include in the response, used | 754 /// used for paging. |
805 * for paging. | 755 /// |
806 * | 756 /// [orderBy] - Controls the order in which timeline items are returned. |
807 * [orderBy] - Controls the order in which timeline items are returned. | 757 /// Possible string values are: |
808 * Possible string values are: | 758 /// - "displayTime" : Results will be ordered by displayTime (default). This |
809 * - "displayTime" : Results will be ordered by displayTime (default). This is | 759 /// is the same ordering as is used in the timeline on the device. |
810 * the same ordering as is used in the timeline on the device. | 760 /// - "writeTime" : Results will be ordered by the time at which they were |
811 * - "writeTime" : Results will be ordered by the time at which they were last | 761 /// last written to the data store. |
812 * written to the data store. | 762 /// |
813 * | 763 /// [pageToken] - Token for the page of results to return. |
814 * [pageToken] - Token for the page of results to return. | 764 /// |
815 * | 765 /// [pinnedOnly] - If true, only pinned items will be returned. |
816 * [pinnedOnly] - If true, only pinned items will be returned. | 766 /// |
817 * | 767 /// [sourceItemId] - If provided, only items with the given sourceItemId will |
818 * [sourceItemId] - If provided, only items with the given sourceItemId will | 768 /// be returned. |
819 * be returned. | 769 /// |
820 * | 770 /// Completes with a [TimelineListResponse]. |
821 * Completes with a [TimelineListResponse]. | 771 /// |
822 * | 772 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
823 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 773 /// an error. |
824 * error. | 774 /// |
825 * | 775 /// If the used [http.Client] completes with an error when making a REST |
826 * If the used [http.Client] completes with an error when making a REST call, | 776 /// call, this method will complete with the same error. |
827 * this method will complete with the same error. | 777 async.Future<TimelineListResponse> list( |
828 */ | 778 {core.String bundleId, |
829 async.Future<TimelineListResponse> list({core.String bundleId, core.bool inclu
deDeleted, core.int maxResults, core.String orderBy, core.String pageToken, core
.bool pinnedOnly, core.String sourceItemId}) { | 779 core.bool includeDeleted, |
| 780 core.int maxResults, |
| 781 core.String orderBy, |
| 782 core.String pageToken, |
| 783 core.bool pinnedOnly, |
| 784 core.String sourceItemId}) { |
830 var _url = null; | 785 var _url = null; |
831 var _queryParams = new core.Map(); | 786 var _queryParams = new core.Map(); |
832 var _uploadMedia = null; | 787 var _uploadMedia = null; |
833 var _uploadOptions = null; | 788 var _uploadOptions = null; |
834 var _downloadOptions = commons.DownloadOptions.Metadata; | 789 var _downloadOptions = commons.DownloadOptions.Metadata; |
835 var _body = null; | 790 var _body = null; |
836 | 791 |
837 if (bundleId != null) { | 792 if (bundleId != null) { |
838 _queryParams["bundleId"] = [bundleId]; | 793 _queryParams["bundleId"] = [bundleId]; |
839 } | 794 } |
(...skipping 11 matching lines...) Expand all Loading... |
851 } | 806 } |
852 if (pinnedOnly != null) { | 807 if (pinnedOnly != null) { |
853 _queryParams["pinnedOnly"] = ["${pinnedOnly}"]; | 808 _queryParams["pinnedOnly"] = ["${pinnedOnly}"]; |
854 } | 809 } |
855 if (sourceItemId != null) { | 810 if (sourceItemId != null) { |
856 _queryParams["sourceItemId"] = [sourceItemId]; | 811 _queryParams["sourceItemId"] = [sourceItemId]; |
857 } | 812 } |
858 | 813 |
859 _url = 'timeline'; | 814 _url = 'timeline'; |
860 | 815 |
861 var _response = _requester.request(_url, | 816 var _response = _requester.request(_url, "GET", |
862 "GET", | 817 body: _body, |
863 body: _body, | 818 queryParams: _queryParams, |
864 queryParams: _queryParams, | 819 uploadOptions: _uploadOptions, |
865 uploadOptions: _uploadOptions, | 820 uploadMedia: _uploadMedia, |
866 uploadMedia: _uploadMedia, | 821 downloadOptions: _downloadOptions); |
867 downloadOptions: _downloadOptions); | |
868 return _response.then((data) => new TimelineListResponse.fromJson(data)); | 822 return _response.then((data) => new TimelineListResponse.fromJson(data)); |
869 } | 823 } |
870 | 824 |
871 /** | 825 /// Updates a timeline item in place. This method supports patch semantics. |
872 * Updates a timeline item in place. This method supports patch semantics. | 826 /// |
873 * | 827 /// [request] - The metadata request object. |
874 * [request] - The metadata request object. | 828 /// |
875 * | 829 /// Request parameters: |
876 * Request parameters: | 830 /// |
877 * | 831 /// [id] - The ID of the timeline item. |
878 * [id] - The ID of the timeline item. | 832 /// |
879 * | 833 /// Completes with a [TimelineItem]. |
880 * Completes with a [TimelineItem]. | 834 /// |
881 * | 835 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
882 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 836 /// an error. |
883 * error. | 837 /// |
884 * | 838 /// If the used [http.Client] completes with an error when making a REST |
885 * If the used [http.Client] completes with an error when making a REST call, | 839 /// call, this method will complete with the same error. |
886 * this method will complete with the same error. | |
887 */ | |
888 async.Future<TimelineItem> patch(TimelineItem request, core.String id) { | 840 async.Future<TimelineItem> patch(TimelineItem request, core.String id) { |
889 var _url = null; | 841 var _url = null; |
890 var _queryParams = new core.Map(); | 842 var _queryParams = new core.Map(); |
891 var _uploadMedia = null; | 843 var _uploadMedia = null; |
892 var _uploadOptions = null; | 844 var _uploadOptions = null; |
893 var _downloadOptions = commons.DownloadOptions.Metadata; | 845 var _downloadOptions = commons.DownloadOptions.Metadata; |
894 var _body = null; | 846 var _body = null; |
895 | 847 |
896 if (request != null) { | 848 if (request != null) { |
897 _body = convert.JSON.encode((request).toJson()); | 849 _body = convert.JSON.encode((request).toJson()); |
898 } | 850 } |
899 if (id == null) { | 851 if (id == null) { |
900 throw new core.ArgumentError("Parameter id is required."); | 852 throw new core.ArgumentError("Parameter id is required."); |
901 } | 853 } |
902 | 854 |
903 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); | 855 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); |
904 | 856 |
905 var _response = _requester.request(_url, | 857 var _response = _requester.request(_url, "PATCH", |
906 "PATCH", | 858 body: _body, |
907 body: _body, | 859 queryParams: _queryParams, |
908 queryParams: _queryParams, | 860 uploadOptions: _uploadOptions, |
909 uploadOptions: _uploadOptions, | 861 uploadMedia: _uploadMedia, |
910 uploadMedia: _uploadMedia, | 862 downloadOptions: _downloadOptions); |
911 downloadOptions: _downloadOptions); | |
912 return _response.then((data) => new TimelineItem.fromJson(data)); | 863 return _response.then((data) => new TimelineItem.fromJson(data)); |
913 } | 864 } |
914 | 865 |
915 /** | 866 /// Updates a timeline item in place. |
916 * Updates a timeline item in place. | 867 /// |
917 * | 868 /// [request] - The metadata request object. |
918 * [request] - The metadata request object. | 869 /// |
919 * | 870 /// Request parameters: |
920 * Request parameters: | 871 /// |
921 * | 872 /// [id] - The ID of the timeline item. |
922 * [id] - The ID of the timeline item. | 873 /// |
923 * | 874 /// [uploadMedia] - The media to upload. |
924 * [uploadMedia] - The media to upload. | 875 /// |
925 * | 876 /// [uploadOptions] - Options for the media upload. Streaming Media without |
926 * [uploadOptions] - Options for the media upload. Streaming Media without the | 877 /// the length being known ahead of time is only supported via resumable |
927 * length being known ahead of time is only supported via resumable uploads. | 878 /// uploads. |
928 * | 879 /// |
929 * Completes with a [TimelineItem]. | 880 /// Completes with a [TimelineItem]. |
930 * | 881 /// |
931 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 882 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
932 * error. | 883 /// an error. |
933 * | 884 /// |
934 * If the used [http.Client] completes with an error when making a REST call, | 885 /// If the used [http.Client] completes with an error when making a REST |
935 * this method will complete with the same error. | 886 /// call, this method will complete with the same error. |
936 */ | 887 async.Future<TimelineItem> update(TimelineItem request, core.String id, |
937 async.Future<TimelineItem> update(TimelineItem request, core.String id, {commo
ns.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media up
loadMedia}) { | 888 {commons.UploadOptions uploadOptions: commons.UploadOptions.Default, |
| 889 commons.Media uploadMedia}) { |
938 var _url = null; | 890 var _url = null; |
939 var _queryParams = new core.Map(); | 891 var _queryParams = new core.Map(); |
940 var _uploadMedia = null; | 892 var _uploadMedia = null; |
941 var _uploadOptions = null; | 893 var _uploadOptions = null; |
942 var _downloadOptions = commons.DownloadOptions.Metadata; | 894 var _downloadOptions = commons.DownloadOptions.Metadata; |
943 var _body = null; | 895 var _body = null; |
944 | 896 |
945 if (request != null) { | 897 if (request != null) { |
946 _body = convert.JSON.encode((request).toJson()); | 898 _body = convert.JSON.encode((request).toJson()); |
947 } | 899 } |
948 if (id == null) { | 900 if (id == null) { |
949 throw new core.ArgumentError("Parameter id is required."); | 901 throw new core.ArgumentError("Parameter id is required."); |
950 } | 902 } |
951 | 903 |
952 _uploadMedia = uploadMedia; | 904 _uploadMedia = uploadMedia; |
953 _uploadOptions = uploadOptions; | 905 _uploadOptions = uploadOptions; |
954 | 906 |
955 if (_uploadMedia == null) { | 907 if (_uploadMedia == null) { |
956 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); | 908 _url = 'timeline/' + commons.Escaper.ecapeVariable('$id'); |
957 } else if (_uploadOptions is commons.ResumableUploadOptions) { | 909 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
958 _url = '/resumable/upload/mirror/v1/timeline/' + commons.Escaper.ecapeVari
able('$id'); | 910 _url = '/resumable/upload/mirror/v1/timeline/' + |
| 911 commons.Escaper.ecapeVariable('$id'); |
959 } else { | 912 } else { |
960 _url = '/upload/mirror/v1/timeline/' + commons.Escaper.ecapeVariable('$id'
); | 913 _url = |
| 914 '/upload/mirror/v1/timeline/' + commons.Escaper.ecapeVariable('$id'); |
961 } | 915 } |
962 | 916 |
963 | 917 var _response = _requester.request(_url, "PUT", |
964 var _response = _requester.request(_url, | 918 body: _body, |
965 "PUT", | 919 queryParams: _queryParams, |
966 body: _body, | 920 uploadOptions: _uploadOptions, |
967 queryParams: _queryParams, | 921 uploadMedia: _uploadMedia, |
968 uploadOptions: _uploadOptions, | 922 downloadOptions: _downloadOptions); |
969 uploadMedia: _uploadMedia, | |
970 downloadOptions: _downloadOptions); | |
971 return _response.then((data) => new TimelineItem.fromJson(data)); | 923 return _response.then((data) => new TimelineItem.fromJson(data)); |
972 } | 924 } |
973 | |
974 } | 925 } |
975 | 926 |
976 | |
977 class TimelineAttachmentsResourceApi { | 927 class TimelineAttachmentsResourceApi { |
978 final commons.ApiRequester _requester; | 928 final commons.ApiRequester _requester; |
979 | 929 |
980 TimelineAttachmentsResourceApi(commons.ApiRequester client) : | 930 TimelineAttachmentsResourceApi(commons.ApiRequester client) |
981 _requester = client; | 931 : _requester = client; |
982 | 932 |
983 /** | 933 /// Deletes an attachment from a timeline item. |
984 * Deletes an attachment from a timeline item. | 934 /// |
985 * | 935 /// Request parameters: |
986 * Request parameters: | 936 /// |
987 * | 937 /// [itemId] - The ID of the timeline item the attachment belongs to. |
988 * [itemId] - The ID of the timeline item the attachment belongs to. | 938 /// |
989 * | 939 /// [attachmentId] - The ID of the attachment. |
990 * [attachmentId] - The ID of the attachment. | 940 /// |
991 * | 941 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
992 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 942 /// an error. |
993 * error. | 943 /// |
994 * | 944 /// If the used [http.Client] completes with an error when making a REST |
995 * If the used [http.Client] completes with an error when making a REST call, | 945 /// call, this method will complete with the same error. |
996 * this method will complete with the same error. | |
997 */ | |
998 async.Future delete(core.String itemId, core.String attachmentId) { | 946 async.Future delete(core.String itemId, core.String attachmentId) { |
999 var _url = null; | 947 var _url = null; |
1000 var _queryParams = new core.Map(); | 948 var _queryParams = new core.Map(); |
1001 var _uploadMedia = null; | 949 var _uploadMedia = null; |
1002 var _uploadOptions = null; | 950 var _uploadOptions = null; |
1003 var _downloadOptions = commons.DownloadOptions.Metadata; | 951 var _downloadOptions = commons.DownloadOptions.Metadata; |
1004 var _body = null; | 952 var _body = null; |
1005 | 953 |
1006 if (itemId == null) { | 954 if (itemId == null) { |
1007 throw new core.ArgumentError("Parameter itemId is required."); | 955 throw new core.ArgumentError("Parameter itemId is required."); |
1008 } | 956 } |
1009 if (attachmentId == null) { | 957 if (attachmentId == null) { |
1010 throw new core.ArgumentError("Parameter attachmentId is required."); | 958 throw new core.ArgumentError("Parameter attachmentId is required."); |
1011 } | 959 } |
1012 | 960 |
1013 _downloadOptions = null; | 961 _downloadOptions = null; |
1014 | 962 |
1015 _url = 'timeline/' + commons.Escaper.ecapeVariable('$itemId') + '/attachment
s/' + commons.Escaper.ecapeVariable('$attachmentId'); | 963 _url = 'timeline/' + |
| 964 commons.Escaper.ecapeVariable('$itemId') + |
| 965 '/attachments/' + |
| 966 commons.Escaper.ecapeVariable('$attachmentId'); |
1016 | 967 |
1017 var _response = _requester.request(_url, | 968 var _response = _requester.request(_url, "DELETE", |
1018 "DELETE", | 969 body: _body, |
1019 body: _body, | 970 queryParams: _queryParams, |
1020 queryParams: _queryParams, | 971 uploadOptions: _uploadOptions, |
1021 uploadOptions: _uploadOptions, | 972 uploadMedia: _uploadMedia, |
1022 uploadMedia: _uploadMedia, | 973 downloadOptions: _downloadOptions); |
1023 downloadOptions: _downloadOptions); | |
1024 return _response.then((data) => null); | 974 return _response.then((data) => null); |
1025 } | 975 } |
1026 | 976 |
1027 /** | 977 /// Retrieves an attachment on a timeline item by item ID and attachment ID. |
1028 * Retrieves an attachment on a timeline item by item ID and attachment ID. | 978 /// |
1029 * | 979 /// Request parameters: |
1030 * Request parameters: | 980 /// |
1031 * | 981 /// [itemId] - The ID of the timeline item the attachment belongs to. |
1032 * [itemId] - The ID of the timeline item the attachment belongs to. | 982 /// |
1033 * | 983 /// [attachmentId] - The ID of the attachment. |
1034 * [attachmentId] - The ID of the attachment. | 984 /// |
1035 * | 985 /// [downloadOptions] - Options for downloading. A download can be either a |
1036 * [downloadOptions] - Options for downloading. A download can be either a | 986 /// Metadata (default) or Media download. Partial Media downloads are |
1037 * Metadata (default) or Media download. Partial Media downloads are possible | 987 /// possible as well. |
1038 * as well. | 988 /// |
1039 * | 989 /// Completes with a |
1040 * Completes with a | 990 /// |
1041 * | 991 /// - [Attachment] for Metadata downloads (see [downloadOptions]). |
1042 * - [Attachment] for Metadata downloads (see [downloadOptions]). | 992 /// |
1043 * | 993 /// - [commons.Media] for Media downloads (see [downloadOptions]). |
1044 * - [commons.Media] for Media downloads (see [downloadOptions]). | 994 /// |
1045 * | 995 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 996 /// an error. |
1047 * error. | 997 /// |
1048 * | 998 /// If the used [http.Client] completes with an error when making a REST |
1049 * If the used [http.Client] completes with an error when making a REST call, | 999 /// call, this method will complete with the same error. |
1050 * this method will complete with the same error. | 1000 async.Future get(core.String itemId, core.String attachmentId, |
1051 */ | 1001 {commons.DownloadOptions downloadOptions: |
1052 async.Future get(core.String itemId, core.String attachmentId, {commons.Downlo
adOptions downloadOptions: commons.DownloadOptions.Metadata}) { | 1002 commons.DownloadOptions.Metadata}) { |
1053 var _url = null; | 1003 var _url = null; |
1054 var _queryParams = new core.Map(); | 1004 var _queryParams = new core.Map(); |
1055 var _uploadMedia = null; | 1005 var _uploadMedia = null; |
1056 var _uploadOptions = null; | 1006 var _uploadOptions = null; |
1057 var _downloadOptions = commons.DownloadOptions.Metadata; | 1007 var _downloadOptions = commons.DownloadOptions.Metadata; |
1058 var _body = null; | 1008 var _body = null; |
1059 | 1009 |
1060 if (itemId == null) { | 1010 if (itemId == null) { |
1061 throw new core.ArgumentError("Parameter itemId is required."); | 1011 throw new core.ArgumentError("Parameter itemId is required."); |
1062 } | 1012 } |
1063 if (attachmentId == null) { | 1013 if (attachmentId == null) { |
1064 throw new core.ArgumentError("Parameter attachmentId is required."); | 1014 throw new core.ArgumentError("Parameter attachmentId is required."); |
1065 } | 1015 } |
1066 | 1016 |
1067 _downloadOptions = downloadOptions; | 1017 _downloadOptions = downloadOptions; |
1068 | 1018 |
1069 _url = 'timeline/' + commons.Escaper.ecapeVariable('$itemId') + '/attachment
s/' + commons.Escaper.ecapeVariable('$attachmentId'); | 1019 _url = 'timeline/' + |
| 1020 commons.Escaper.ecapeVariable('$itemId') + |
| 1021 '/attachments/' + |
| 1022 commons.Escaper.ecapeVariable('$attachmentId'); |
1070 | 1023 |
1071 var _response = _requester.request(_url, | 1024 var _response = _requester.request(_url, "GET", |
1072 "GET", | 1025 body: _body, |
1073 body: _body, | 1026 queryParams: _queryParams, |
1074 queryParams: _queryParams, | 1027 uploadOptions: _uploadOptions, |
1075 uploadOptions: _uploadOptions, | 1028 uploadMedia: _uploadMedia, |
1076 uploadMedia: _uploadMedia, | 1029 downloadOptions: _downloadOptions); |
1077 downloadOptions: _downloadOptions); | |
1078 if (_downloadOptions == null || | 1030 if (_downloadOptions == null || |
1079 _downloadOptions == commons.DownloadOptions.Metadata) { | 1031 _downloadOptions == commons.DownloadOptions.Metadata) { |
1080 return _response.then((data) => new Attachment.fromJson(data)); | 1032 return _response.then((data) => new Attachment.fromJson(data)); |
1081 } else { | 1033 } else { |
1082 return _response; | 1034 return _response; |
1083 } | 1035 } |
1084 } | 1036 } |
1085 | 1037 |
1086 /** | 1038 /// Adds a new attachment to a timeline item. |
1087 * Adds a new attachment to a timeline item. | 1039 /// |
1088 * | 1040 /// Request parameters: |
1089 * Request parameters: | 1041 /// |
1090 * | 1042 /// [itemId] - The ID of the timeline item the attachment belongs to. |
1091 * [itemId] - The ID of the timeline item the attachment belongs to. | 1043 /// |
1092 * | 1044 /// [uploadMedia] - The media to upload. |
1093 * [uploadMedia] - The media to upload. | 1045 /// |
1094 * | 1046 /// [uploadOptions] - Options for the media upload. Streaming Media without |
1095 * [uploadOptions] - Options for the media upload. Streaming Media without the | 1047 /// the length being known ahead of time is only supported via resumable |
1096 * length being known ahead of time is only supported via resumable uploads. | 1048 /// uploads. |
1097 * | 1049 /// |
1098 * Completes with a [Attachment]. | 1050 /// Completes with a [Attachment]. |
1099 * | 1051 /// |
1100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1052 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1101 * error. | 1053 /// an error. |
1102 * | 1054 /// |
1103 * If the used [http.Client] completes with an error when making a REST call, | 1055 /// If the used [http.Client] completes with an error when making a REST |
1104 * this method will complete with the same error. | 1056 /// call, this method will complete with the same error. |
1105 */ | 1057 async.Future<Attachment> insert(core.String itemId, |
1106 async.Future<Attachment> insert(core.String itemId, {commons.UploadOptions upl
oadOptions : commons.UploadOptions.Default, commons.Media uploadMedia}) { | 1058 {commons.UploadOptions uploadOptions: commons.UploadOptions.Default, |
| 1059 commons.Media uploadMedia}) { |
1107 var _url = null; | 1060 var _url = null; |
1108 var _queryParams = new core.Map(); | 1061 var _queryParams = new core.Map(); |
1109 var _uploadMedia = null; | 1062 var _uploadMedia = null; |
1110 var _uploadOptions = null; | 1063 var _uploadOptions = null; |
1111 var _downloadOptions = commons.DownloadOptions.Metadata; | 1064 var _downloadOptions = commons.DownloadOptions.Metadata; |
1112 var _body = null; | 1065 var _body = null; |
1113 | 1066 |
1114 if (itemId == null) { | 1067 if (itemId == null) { |
1115 throw new core.ArgumentError("Parameter itemId is required."); | 1068 throw new core.ArgumentError("Parameter itemId is required."); |
1116 } | 1069 } |
1117 | 1070 |
1118 _uploadMedia = uploadMedia; | 1071 _uploadMedia = uploadMedia; |
1119 _uploadOptions = uploadOptions; | 1072 _uploadOptions = uploadOptions; |
1120 | 1073 |
1121 if (_uploadMedia == null) { | 1074 if (_uploadMedia == null) { |
1122 _url = 'timeline/' + commons.Escaper.ecapeVariable('$itemId') + '/attachme
nts'; | 1075 _url = 'timeline/' + |
| 1076 commons.Escaper.ecapeVariable('$itemId') + |
| 1077 '/attachments'; |
1123 } else if (_uploadOptions is commons.ResumableUploadOptions) { | 1078 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
1124 _url = '/resumable/upload/mirror/v1/timeline/' + commons.Escaper.ecapeVari
able('$itemId') + '/attachments'; | 1079 _url = '/resumable/upload/mirror/v1/timeline/' + |
| 1080 commons.Escaper.ecapeVariable('$itemId') + |
| 1081 '/attachments'; |
1125 } else { | 1082 } else { |
1126 _url = '/upload/mirror/v1/timeline/' + commons.Escaper.ecapeVariable('$ite
mId') + '/attachments'; | 1083 _url = '/upload/mirror/v1/timeline/' + |
| 1084 commons.Escaper.ecapeVariable('$itemId') + |
| 1085 '/attachments'; |
1127 } | 1086 } |
1128 | 1087 |
1129 | 1088 var _response = _requester.request(_url, "POST", |
1130 var _response = _requester.request(_url, | 1089 body: _body, |
1131 "POST", | 1090 queryParams: _queryParams, |
1132 body: _body, | 1091 uploadOptions: _uploadOptions, |
1133 queryParams: _queryParams, | 1092 uploadMedia: _uploadMedia, |
1134 uploadOptions: _uploadOptions, | 1093 downloadOptions: _downloadOptions); |
1135 uploadMedia: _uploadMedia, | |
1136 downloadOptions: _downloadOptions); | |
1137 return _response.then((data) => new Attachment.fromJson(data)); | 1094 return _response.then((data) => new Attachment.fromJson(data)); |
1138 } | 1095 } |
1139 | 1096 |
1140 /** | 1097 /// Returns a list of attachments for a timeline item. |
1141 * Returns a list of attachments for a timeline item. | 1098 /// |
1142 * | 1099 /// Request parameters: |
1143 * Request parameters: | 1100 /// |
1144 * | 1101 /// [itemId] - The ID of the timeline item whose attachments should be |
1145 * [itemId] - The ID of the timeline item whose attachments should be listed. | 1102 /// listed. |
1146 * | 1103 /// |
1147 * Completes with a [AttachmentsListResponse]. | 1104 /// Completes with a [AttachmentsListResponse]. |
1148 * | 1105 /// |
1149 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1106 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1150 * error. | 1107 /// an error. |
1151 * | 1108 /// |
1152 * If the used [http.Client] completes with an error when making a REST call, | 1109 /// If the used [http.Client] completes with an error when making a REST |
1153 * this method will complete with the same error. | 1110 /// call, this method will complete with the same error. |
1154 */ | |
1155 async.Future<AttachmentsListResponse> list(core.String itemId) { | 1111 async.Future<AttachmentsListResponse> list(core.String itemId) { |
1156 var _url = null; | 1112 var _url = null; |
1157 var _queryParams = new core.Map(); | 1113 var _queryParams = new core.Map(); |
1158 var _uploadMedia = null; | 1114 var _uploadMedia = null; |
1159 var _uploadOptions = null; | 1115 var _uploadOptions = null; |
1160 var _downloadOptions = commons.DownloadOptions.Metadata; | 1116 var _downloadOptions = commons.DownloadOptions.Metadata; |
1161 var _body = null; | 1117 var _body = null; |
1162 | 1118 |
1163 if (itemId == null) { | 1119 if (itemId == null) { |
1164 throw new core.ArgumentError("Parameter itemId is required."); | 1120 throw new core.ArgumentError("Parameter itemId is required."); |
1165 } | 1121 } |
1166 | 1122 |
1167 _url = 'timeline/' + commons.Escaper.ecapeVariable('$itemId') + '/attachment
s'; | 1123 _url = |
| 1124 'timeline/' + commons.Escaper.ecapeVariable('$itemId') + '/attachments'; |
1168 | 1125 |
1169 var _response = _requester.request(_url, | 1126 var _response = _requester.request(_url, "GET", |
1170 "GET", | 1127 body: _body, |
1171 body: _body, | 1128 queryParams: _queryParams, |
1172 queryParams: _queryParams, | 1129 uploadOptions: _uploadOptions, |
1173 uploadOptions: _uploadOptions, | 1130 uploadMedia: _uploadMedia, |
1174 uploadMedia: _uploadMedia, | 1131 downloadOptions: _downloadOptions); |
1175 downloadOptions: _downloadOptions); | |
1176 return _response.then((data) => new AttachmentsListResponse.fromJson(data)); | 1132 return _response.then((data) => new AttachmentsListResponse.fromJson(data)); |
1177 } | 1133 } |
1178 | |
1179 } | 1134 } |
1180 | 1135 |
1181 | 1136 /// Represents an account passed into the Account Manager on Glass. |
1182 | |
1183 /** Represents an account passed into the Account Manager on Glass. */ | |
1184 class Account { | 1137 class Account { |
1185 core.List<AuthToken> authTokens; | 1138 core.List<AuthToken> authTokens; |
1186 core.List<core.String> features; | 1139 core.List<core.String> features; |
1187 core.String password; | 1140 core.String password; |
1188 core.List<UserData> userData; | 1141 core.List<UserData> userData; |
1189 | 1142 |
1190 Account(); | 1143 Account(); |
1191 | 1144 |
1192 Account.fromJson(core.Map _json) { | 1145 Account.fromJson(core.Map _json) { |
1193 if (_json.containsKey("authTokens")) { | 1146 if (_json.containsKey("authTokens")) { |
1194 authTokens = _json["authTokens"].map((value) => new AuthToken.fromJson(val
ue)).toList(); | 1147 authTokens = _json["authTokens"] |
| 1148 .map((value) => new AuthToken.fromJson(value)) |
| 1149 .toList(); |
1195 } | 1150 } |
1196 if (_json.containsKey("features")) { | 1151 if (_json.containsKey("features")) { |
1197 features = _json["features"]; | 1152 features = _json["features"]; |
1198 } | 1153 } |
1199 if (_json.containsKey("password")) { | 1154 if (_json.containsKey("password")) { |
1200 password = _json["password"]; | 1155 password = _json["password"]; |
1201 } | 1156 } |
1202 if (_json.containsKey("userData")) { | 1157 if (_json.containsKey("userData")) { |
1203 userData = _json["userData"].map((value) => new UserData.fromJson(value)).
toList(); | 1158 userData = _json["userData"] |
| 1159 .map((value) => new UserData.fromJson(value)) |
| 1160 .toList(); |
1204 } | 1161 } |
1205 } | 1162 } |
1206 | 1163 |
1207 core.Map<core.String, core.Object> toJson() { | 1164 core.Map<core.String, core.Object> toJson() { |
1208 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1165 final core.Map<core.String, core.Object> _json = |
| 1166 new core.Map<core.String, core.Object>(); |
1209 if (authTokens != null) { | 1167 if (authTokens != null) { |
1210 _json["authTokens"] = authTokens.map((value) => (value).toJson()).toList()
; | 1168 _json["authTokens"] = |
| 1169 authTokens.map((value) => (value).toJson()).toList(); |
1211 } | 1170 } |
1212 if (features != null) { | 1171 if (features != null) { |
1213 _json["features"] = features; | 1172 _json["features"] = features; |
1214 } | 1173 } |
1215 if (password != null) { | 1174 if (password != null) { |
1216 _json["password"] = password; | 1175 _json["password"] = password; |
1217 } | 1176 } |
1218 if (userData != null) { | 1177 if (userData != null) { |
1219 _json["userData"] = userData.map((value) => (value).toJson()).toList(); | 1178 _json["userData"] = userData.map((value) => (value).toJson()).toList(); |
1220 } | 1179 } |
1221 return _json; | 1180 return _json; |
1222 } | 1181 } |
1223 } | 1182 } |
1224 | 1183 |
1225 /** | 1184 /// Represents media content, such as a photo, that can be attached to a |
1226 * Represents media content, such as a photo, that can be attached to a timeline | 1185 /// timeline item. |
1227 * item. | |
1228 */ | |
1229 class Attachment { | 1186 class Attachment { |
1230 /** The MIME type of the attachment. */ | 1187 /// The MIME type of the attachment. |
1231 core.String contentType; | 1188 core.String contentType; |
1232 /** The URL for the content. */ | 1189 |
| 1190 /// The URL for the content. |
1233 core.String contentUrl; | 1191 core.String contentUrl; |
1234 /** The ID of the attachment. */ | 1192 |
| 1193 /// The ID of the attachment. |
1235 core.String id; | 1194 core.String id; |
1236 /** | 1195 |
1237 * Indicates that the contentUrl is not available because the attachment | 1196 /// Indicates that the contentUrl is not available because the attachment |
1238 * content is still being processed. If the caller wishes to retrieve the | 1197 /// content is still being processed. If the caller wishes to retrieve the |
1239 * content, it should try again later. | 1198 /// content, it should try again later. |
1240 */ | |
1241 core.bool isProcessingContent; | 1199 core.bool isProcessingContent; |
1242 | 1200 |
1243 Attachment(); | 1201 Attachment(); |
1244 | 1202 |
1245 Attachment.fromJson(core.Map _json) { | 1203 Attachment.fromJson(core.Map _json) { |
1246 if (_json.containsKey("contentType")) { | 1204 if (_json.containsKey("contentType")) { |
1247 contentType = _json["contentType"]; | 1205 contentType = _json["contentType"]; |
1248 } | 1206 } |
1249 if (_json.containsKey("contentUrl")) { | 1207 if (_json.containsKey("contentUrl")) { |
1250 contentUrl = _json["contentUrl"]; | 1208 contentUrl = _json["contentUrl"]; |
1251 } | 1209 } |
1252 if (_json.containsKey("id")) { | 1210 if (_json.containsKey("id")) { |
1253 id = _json["id"]; | 1211 id = _json["id"]; |
1254 } | 1212 } |
1255 if (_json.containsKey("isProcessingContent")) { | 1213 if (_json.containsKey("isProcessingContent")) { |
1256 isProcessingContent = _json["isProcessingContent"]; | 1214 isProcessingContent = _json["isProcessingContent"]; |
1257 } | 1215 } |
1258 } | 1216 } |
1259 | 1217 |
1260 core.Map<core.String, core.Object> toJson() { | 1218 core.Map<core.String, core.Object> toJson() { |
1261 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1219 final core.Map<core.String, core.Object> _json = |
| 1220 new core.Map<core.String, core.Object>(); |
1262 if (contentType != null) { | 1221 if (contentType != null) { |
1263 _json["contentType"] = contentType; | 1222 _json["contentType"] = contentType; |
1264 } | 1223 } |
1265 if (contentUrl != null) { | 1224 if (contentUrl != null) { |
1266 _json["contentUrl"] = contentUrl; | 1225 _json["contentUrl"] = contentUrl; |
1267 } | 1226 } |
1268 if (id != null) { | 1227 if (id != null) { |
1269 _json["id"] = id; | 1228 _json["id"] = id; |
1270 } | 1229 } |
1271 if (isProcessingContent != null) { | 1230 if (isProcessingContent != null) { |
1272 _json["isProcessingContent"] = isProcessingContent; | 1231 _json["isProcessingContent"] = isProcessingContent; |
1273 } | 1232 } |
1274 return _json; | 1233 return _json; |
1275 } | 1234 } |
1276 } | 1235 } |
1277 | 1236 |
1278 /** | 1237 /// A list of Attachments. This is the response from the server to GET requests |
1279 * A list of Attachments. This is the response from the server to GET requests | 1238 /// on the attachments collection. |
1280 * on the attachments collection. | |
1281 */ | |
1282 class AttachmentsListResponse { | 1239 class AttachmentsListResponse { |
1283 /** The list of attachments. */ | 1240 /// The list of attachments. |
1284 core.List<Attachment> items; | 1241 core.List<Attachment> items; |
1285 /** The type of resource. This is always mirror#attachmentsList. */ | 1242 |
| 1243 /// The type of resource. This is always mirror#attachmentsList. |
1286 core.String kind; | 1244 core.String kind; |
1287 | 1245 |
1288 AttachmentsListResponse(); | 1246 AttachmentsListResponse(); |
1289 | 1247 |
1290 AttachmentsListResponse.fromJson(core.Map _json) { | 1248 AttachmentsListResponse.fromJson(core.Map _json) { |
1291 if (_json.containsKey("items")) { | 1249 if (_json.containsKey("items")) { |
1292 items = _json["items"].map((value) => new Attachment.fromJson(value)).toLi
st(); | 1250 items = _json["items"] |
| 1251 .map((value) => new Attachment.fromJson(value)) |
| 1252 .toList(); |
1293 } | 1253 } |
1294 if (_json.containsKey("kind")) { | 1254 if (_json.containsKey("kind")) { |
1295 kind = _json["kind"]; | 1255 kind = _json["kind"]; |
1296 } | 1256 } |
1297 } | 1257 } |
1298 | 1258 |
1299 core.Map<core.String, core.Object> toJson() { | 1259 core.Map<core.String, core.Object> toJson() { |
1300 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1260 final core.Map<core.String, core.Object> _json = |
| 1261 new core.Map<core.String, core.Object>(); |
1301 if (items != null) { | 1262 if (items != null) { |
1302 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1263 _json["items"] = items.map((value) => (value).toJson()).toList(); |
1303 } | 1264 } |
1304 if (kind != null) { | 1265 if (kind != null) { |
1305 _json["kind"] = kind; | 1266 _json["kind"] = kind; |
1306 } | 1267 } |
1307 return _json; | 1268 return _json; |
1308 } | 1269 } |
1309 } | 1270 } |
1310 | 1271 |
1311 class AuthToken { | 1272 class AuthToken { |
1312 core.String authToken; | 1273 core.String authToken; |
1313 core.String type; | 1274 core.String type; |
1314 | 1275 |
1315 AuthToken(); | 1276 AuthToken(); |
1316 | 1277 |
1317 AuthToken.fromJson(core.Map _json) { | 1278 AuthToken.fromJson(core.Map _json) { |
1318 if (_json.containsKey("authToken")) { | 1279 if (_json.containsKey("authToken")) { |
1319 authToken = _json["authToken"]; | 1280 authToken = _json["authToken"]; |
1320 } | 1281 } |
1321 if (_json.containsKey("type")) { | 1282 if (_json.containsKey("type")) { |
1322 type = _json["type"]; | 1283 type = _json["type"]; |
1323 } | 1284 } |
1324 } | 1285 } |
1325 | 1286 |
1326 core.Map<core.String, core.Object> toJson() { | 1287 core.Map<core.String, core.Object> toJson() { |
1327 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1288 final core.Map<core.String, core.Object> _json = |
| 1289 new core.Map<core.String, core.Object>(); |
1328 if (authToken != null) { | 1290 if (authToken != null) { |
1329 _json["authToken"] = authToken; | 1291 _json["authToken"] = authToken; |
1330 } | 1292 } |
1331 if (type != null) { | 1293 if (type != null) { |
1332 _json["type"] = type; | 1294 _json["type"] = type; |
1333 } | 1295 } |
1334 return _json; | 1296 return _json; |
1335 } | 1297 } |
1336 } | 1298 } |
1337 | 1299 |
1338 /** A single menu command that is part of a Contact. */ | 1300 /// A single menu command that is part of a Contact. |
1339 class Command { | 1301 class Command { |
1340 /** | 1302 /// The type of operation this command corresponds to. Allowed values are: |
1341 * The type of operation this command corresponds to. Allowed values are: | 1303 /// - TAKE_A_NOTE - Shares a timeline item with the transcription of user |
1342 * - TAKE_A_NOTE - Shares a timeline item with the transcription of user | 1304 /// speech from the "Take a note" voice menu command. |
1343 * speech from the "Take a note" voice menu command. | 1305 /// - POST_AN_UPDATE - Shares a timeline item with the transcription of user |
1344 * - POST_AN_UPDATE - Shares a timeline item with the transcription of user | 1306 /// speech from the "Post an update" voice menu command. |
1345 * speech from the "Post an update" voice menu command. | |
1346 */ | |
1347 core.String type; | 1307 core.String type; |
1348 | 1308 |
1349 Command(); | 1309 Command(); |
1350 | 1310 |
1351 Command.fromJson(core.Map _json) { | 1311 Command.fromJson(core.Map _json) { |
1352 if (_json.containsKey("type")) { | 1312 if (_json.containsKey("type")) { |
1353 type = _json["type"]; | 1313 type = _json["type"]; |
1354 } | 1314 } |
1355 } | 1315 } |
1356 | 1316 |
1357 core.Map<core.String, core.Object> toJson() { | 1317 core.Map<core.String, core.Object> toJson() { |
1358 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1318 final core.Map<core.String, core.Object> _json = |
| 1319 new core.Map<core.String, core.Object>(); |
1359 if (type != null) { | 1320 if (type != null) { |
1360 _json["type"] = type; | 1321 _json["type"] = type; |
1361 } | 1322 } |
1362 return _json; | 1323 return _json; |
1363 } | 1324 } |
1364 } | 1325 } |
1365 | 1326 |
1366 /** A person or group that can be used as a creator or a contact. */ | 1327 /// A person or group that can be used as a creator or a contact. |
1367 class Contact { | 1328 class Contact { |
1368 /** | 1329 /// A list of voice menu commands that a contact can handle. Glass shows up |
1369 * A list of voice menu commands that a contact can handle. Glass shows up to | 1330 /// to three contacts for each voice menu command. If there are more than |
1370 * three contacts for each voice menu command. If there are more than that, | 1331 /// that, the three contacts with the highest priority are shown for that |
1371 * the three contacts with the highest priority are shown for that particular | 1332 /// particular command. |
1372 * command. | |
1373 */ | |
1374 core.List<Command> acceptCommands; | 1333 core.List<Command> acceptCommands; |
1375 /** | 1334 |
1376 * A list of MIME types that a contact supports. The contact will be shown to | 1335 /// A list of MIME types that a contact supports. The contact will be shown |
1377 * the user if any of its acceptTypes matches any of the types of the | 1336 /// to the user if any of its acceptTypes matches any of the types of the |
1378 * attachments on the item. If no acceptTypes are given, the contact will be | 1337 /// attachments on the item. If no acceptTypes are given, the contact will be |
1379 * shown for all items. | 1338 /// shown for all items. |
1380 */ | |
1381 core.List<core.String> acceptTypes; | 1339 core.List<core.String> acceptTypes; |
1382 /** The name to display for this contact. */ | 1340 |
| 1341 /// The name to display for this contact. |
1383 core.String displayName; | 1342 core.String displayName; |
1384 /** | 1343 |
1385 * An ID for this contact. This is generated by the application and is treated | 1344 /// An ID for this contact. This is generated by the application and is |
1386 * as an opaque token. | 1345 /// treated as an opaque token. |
1387 */ | |
1388 core.String id; | 1346 core.String id; |
1389 /** | 1347 |
1390 * Set of image URLs to display for a contact. Most contacts will have a | 1348 /// Set of image URLs to display for a contact. Most contacts will have a |
1391 * single image, but a "group" contact may include up to 8 image URLs and they | 1349 /// single image, but a "group" contact may include up to 8 image URLs and |
1392 * will be resized and cropped into a mosaic on the client. | 1350 /// they will be resized and cropped into a mosaic on the client. |
1393 */ | |
1394 core.List<core.String> imageUrls; | 1351 core.List<core.String> imageUrls; |
1395 /** The type of resource. This is always mirror#contact. */ | 1352 |
| 1353 /// The type of resource. This is always mirror#contact. |
1396 core.String kind; | 1354 core.String kind; |
1397 /** | 1355 |
1398 * Primary phone number for the contact. This can be a fully-qualified number, | 1356 /// Primary phone number for the contact. This can be a fully-qualified |
1399 * with country calling code and area code, or a local number. | 1357 /// number, with country calling code and area code, or a local number. |
1400 */ | |
1401 core.String phoneNumber; | 1358 core.String phoneNumber; |
1402 /** | 1359 |
1403 * Priority for the contact to determine ordering in a list of contacts. | 1360 /// Priority for the contact to determine ordering in a list of contacts. |
1404 * Contacts with higher priorities will be shown before ones with lower | 1361 /// Contacts with higher priorities will be shown before ones with lower |
1405 * priorities. | 1362 /// priorities. |
1406 */ | |
1407 core.int priority; | 1363 core.int priority; |
1408 /** | 1364 |
1409 * A list of sharing features that a contact can handle. Allowed values are: | 1365 /// A list of sharing features that a contact can handle. Allowed values are: |
1410 * - ADD_CAPTION | 1366 /// - ADD_CAPTION |
1411 */ | |
1412 core.List<core.String> sharingFeatures; | 1367 core.List<core.String> sharingFeatures; |
1413 /** | 1368 |
1414 * The ID of the application that created this contact. This is populated by | 1369 /// The ID of the application that created this contact. This is populated by |
1415 * the API | 1370 /// the API |
1416 */ | |
1417 core.String source; | 1371 core.String source; |
1418 /** | 1372 |
1419 * Name of this contact as it should be pronounced. If this contact's name | 1373 /// Name of this contact as it should be pronounced. If this contact's name |
1420 * must be spoken as part of a voice disambiguation menu, this name is used as | 1374 /// must be spoken as part of a voice disambiguation menu, this name is used |
1421 * the expected pronunciation. This is useful for contact names with | 1375 /// as the expected pronunciation. This is useful for contact names with |
1422 * unpronounceable characters or whose display spelling is otherwise not | 1376 /// unpronounceable characters or whose display spelling is otherwise not |
1423 * phonetic. | 1377 /// phonetic. |
1424 */ | |
1425 core.String speakableName; | 1378 core.String speakableName; |
1426 /** | 1379 |
1427 * The type for this contact. This is used for sorting in UIs. Allowed values | 1380 /// The type for this contact. This is used for sorting in UIs. Allowed |
1428 * are: | 1381 /// values are: |
1429 * - INDIVIDUAL - Represents a single person. This is the default. | 1382 /// - INDIVIDUAL - Represents a single person. This is the default. |
1430 * - GROUP - Represents more than a single person. | 1383 /// - GROUP - Represents more than a single person. |
1431 */ | |
1432 core.String type; | 1384 core.String type; |
1433 | 1385 |
1434 Contact(); | 1386 Contact(); |
1435 | 1387 |
1436 Contact.fromJson(core.Map _json) { | 1388 Contact.fromJson(core.Map _json) { |
1437 if (_json.containsKey("acceptCommands")) { | 1389 if (_json.containsKey("acceptCommands")) { |
1438 acceptCommands = _json["acceptCommands"].map((value) => new Command.fromJs
on(value)).toList(); | 1390 acceptCommands = _json["acceptCommands"] |
| 1391 .map((value) => new Command.fromJson(value)) |
| 1392 .toList(); |
1439 } | 1393 } |
1440 if (_json.containsKey("acceptTypes")) { | 1394 if (_json.containsKey("acceptTypes")) { |
1441 acceptTypes = _json["acceptTypes"]; | 1395 acceptTypes = _json["acceptTypes"]; |
1442 } | 1396 } |
1443 if (_json.containsKey("displayName")) { | 1397 if (_json.containsKey("displayName")) { |
1444 displayName = _json["displayName"]; | 1398 displayName = _json["displayName"]; |
1445 } | 1399 } |
1446 if (_json.containsKey("id")) { | 1400 if (_json.containsKey("id")) { |
1447 id = _json["id"]; | 1401 id = _json["id"]; |
1448 } | 1402 } |
(...skipping 17 matching lines...) Expand all Loading... |
1466 } | 1420 } |
1467 if (_json.containsKey("speakableName")) { | 1421 if (_json.containsKey("speakableName")) { |
1468 speakableName = _json["speakableName"]; | 1422 speakableName = _json["speakableName"]; |
1469 } | 1423 } |
1470 if (_json.containsKey("type")) { | 1424 if (_json.containsKey("type")) { |
1471 type = _json["type"]; | 1425 type = _json["type"]; |
1472 } | 1426 } |
1473 } | 1427 } |
1474 | 1428 |
1475 core.Map<core.String, core.Object> toJson() { | 1429 core.Map<core.String, core.Object> toJson() { |
1476 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1430 final core.Map<core.String, core.Object> _json = |
| 1431 new core.Map<core.String, core.Object>(); |
1477 if (acceptCommands != null) { | 1432 if (acceptCommands != null) { |
1478 _json["acceptCommands"] = acceptCommands.map((value) => (value).toJson()).
toList(); | 1433 _json["acceptCommands"] = |
| 1434 acceptCommands.map((value) => (value).toJson()).toList(); |
1479 } | 1435 } |
1480 if (acceptTypes != null) { | 1436 if (acceptTypes != null) { |
1481 _json["acceptTypes"] = acceptTypes; | 1437 _json["acceptTypes"] = acceptTypes; |
1482 } | 1438 } |
1483 if (displayName != null) { | 1439 if (displayName != null) { |
1484 _json["displayName"] = displayName; | 1440 _json["displayName"] = displayName; |
1485 } | 1441 } |
1486 if (id != null) { | 1442 if (id != null) { |
1487 _json["id"] = id; | 1443 _json["id"] = id; |
1488 } | 1444 } |
(...skipping 18 matching lines...) Expand all Loading... |
1507 if (speakableName != null) { | 1463 if (speakableName != null) { |
1508 _json["speakableName"] = speakableName; | 1464 _json["speakableName"] = speakableName; |
1509 } | 1465 } |
1510 if (type != null) { | 1466 if (type != null) { |
1511 _json["type"] = type; | 1467 _json["type"] = type; |
1512 } | 1468 } |
1513 return _json; | 1469 return _json; |
1514 } | 1470 } |
1515 } | 1471 } |
1516 | 1472 |
1517 /** | 1473 /// A list of Contacts representing contacts. This is the response from the |
1518 * A list of Contacts representing contacts. This is the response from the | 1474 /// server to GET requests on the contacts collection. |
1519 * server to GET requests on the contacts collection. | |
1520 */ | |
1521 class ContactsListResponse { | 1475 class ContactsListResponse { |
1522 /** Contact list. */ | 1476 /// Contact list. |
1523 core.List<Contact> items; | 1477 core.List<Contact> items; |
1524 /** The type of resource. This is always mirror#contacts. */ | 1478 |
| 1479 /// The type of resource. This is always mirror#contacts. |
1525 core.String kind; | 1480 core.String kind; |
1526 | 1481 |
1527 ContactsListResponse(); | 1482 ContactsListResponse(); |
1528 | 1483 |
1529 ContactsListResponse.fromJson(core.Map _json) { | 1484 ContactsListResponse.fromJson(core.Map _json) { |
1530 if (_json.containsKey("items")) { | 1485 if (_json.containsKey("items")) { |
1531 items = _json["items"].map((value) => new Contact.fromJson(value)).toList(
); | 1486 items = |
| 1487 _json["items"].map((value) => new Contact.fromJson(value)).toList(); |
1532 } | 1488 } |
1533 if (_json.containsKey("kind")) { | 1489 if (_json.containsKey("kind")) { |
1534 kind = _json["kind"]; | 1490 kind = _json["kind"]; |
1535 } | 1491 } |
1536 } | 1492 } |
1537 | 1493 |
1538 core.Map<core.String, core.Object> toJson() { | 1494 core.Map<core.String, core.Object> toJson() { |
1539 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1495 final core.Map<core.String, core.Object> _json = |
| 1496 new core.Map<core.String, core.Object>(); |
1540 if (items != null) { | 1497 if (items != null) { |
1541 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1498 _json["items"] = items.map((value) => (value).toJson()).toList(); |
1542 } | 1499 } |
1543 if (kind != null) { | 1500 if (kind != null) { |
1544 _json["kind"] = kind; | 1501 _json["kind"] = kind; |
1545 } | 1502 } |
1546 return _json; | 1503 return _json; |
1547 } | 1504 } |
1548 } | 1505 } |
1549 | 1506 |
1550 /** A geographic location that can be associated with a timeline item. */ | 1507 /// A geographic location that can be associated with a timeline item. |
1551 class Location { | 1508 class Location { |
1552 /** The accuracy of the location fix in meters. */ | 1509 /// The accuracy of the location fix in meters. |
1553 core.double accuracy; | 1510 core.double accuracy; |
1554 /** The full address of the location. */ | 1511 |
| 1512 /// The full address of the location. |
1555 core.String address; | 1513 core.String address; |
1556 /** | 1514 |
1557 * The name to be displayed. This may be a business name or a user-defined | 1515 /// The name to be displayed. This may be a business name or a user-defined |
1558 * place, such as "Home". | 1516 /// place, such as "Home". |
1559 */ | |
1560 core.String displayName; | 1517 core.String displayName; |
1561 /** The ID of the location. */ | 1518 |
| 1519 /// The ID of the location. |
1562 core.String id; | 1520 core.String id; |
1563 /** The type of resource. This is always mirror#location. */ | 1521 |
| 1522 /// The type of resource. This is always mirror#location. |
1564 core.String kind; | 1523 core.String kind; |
1565 /** The latitude, in degrees. */ | 1524 |
| 1525 /// The latitude, in degrees. |
1566 core.double latitude; | 1526 core.double latitude; |
1567 /** The longitude, in degrees. */ | 1527 |
| 1528 /// The longitude, in degrees. |
1568 core.double longitude; | 1529 core.double longitude; |
1569 /** | 1530 |
1570 * The time at which this location was captured, formatted according to RFC | 1531 /// The time at which this location was captured, formatted according to RFC |
1571 * 3339. | 1532 /// 3339. |
1572 */ | |
1573 core.DateTime timestamp; | 1533 core.DateTime timestamp; |
1574 | 1534 |
1575 Location(); | 1535 Location(); |
1576 | 1536 |
1577 Location.fromJson(core.Map _json) { | 1537 Location.fromJson(core.Map _json) { |
1578 if (_json.containsKey("accuracy")) { | 1538 if (_json.containsKey("accuracy")) { |
1579 accuracy = _json["accuracy"]; | 1539 accuracy = _json["accuracy"]; |
1580 } | 1540 } |
1581 if (_json.containsKey("address")) { | 1541 if (_json.containsKey("address")) { |
1582 address = _json["address"]; | 1542 address = _json["address"]; |
(...skipping 12 matching lines...) Expand all Loading... |
1595 } | 1555 } |
1596 if (_json.containsKey("longitude")) { | 1556 if (_json.containsKey("longitude")) { |
1597 longitude = _json["longitude"]; | 1557 longitude = _json["longitude"]; |
1598 } | 1558 } |
1599 if (_json.containsKey("timestamp")) { | 1559 if (_json.containsKey("timestamp")) { |
1600 timestamp = core.DateTime.parse(_json["timestamp"]); | 1560 timestamp = core.DateTime.parse(_json["timestamp"]); |
1601 } | 1561 } |
1602 } | 1562 } |
1603 | 1563 |
1604 core.Map<core.String, core.Object> toJson() { | 1564 core.Map<core.String, core.Object> toJson() { |
1605 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1565 final core.Map<core.String, core.Object> _json = |
| 1566 new core.Map<core.String, core.Object>(); |
1606 if (accuracy != null) { | 1567 if (accuracy != null) { |
1607 _json["accuracy"] = accuracy; | 1568 _json["accuracy"] = accuracy; |
1608 } | 1569 } |
1609 if (address != null) { | 1570 if (address != null) { |
1610 _json["address"] = address; | 1571 _json["address"] = address; |
1611 } | 1572 } |
1612 if (displayName != null) { | 1573 if (displayName != null) { |
1613 _json["displayName"] = displayName; | 1574 _json["displayName"] = displayName; |
1614 } | 1575 } |
1615 if (id != null) { | 1576 if (id != null) { |
1616 _json["id"] = id; | 1577 _json["id"] = id; |
1617 } | 1578 } |
1618 if (kind != null) { | 1579 if (kind != null) { |
1619 _json["kind"] = kind; | 1580 _json["kind"] = kind; |
1620 } | 1581 } |
1621 if (latitude != null) { | 1582 if (latitude != null) { |
1622 _json["latitude"] = latitude; | 1583 _json["latitude"] = latitude; |
1623 } | 1584 } |
1624 if (longitude != null) { | 1585 if (longitude != null) { |
1625 _json["longitude"] = longitude; | 1586 _json["longitude"] = longitude; |
1626 } | 1587 } |
1627 if (timestamp != null) { | 1588 if (timestamp != null) { |
1628 _json["timestamp"] = (timestamp).toIso8601String(); | 1589 _json["timestamp"] = (timestamp).toIso8601String(); |
1629 } | 1590 } |
1630 return _json; | 1591 return _json; |
1631 } | 1592 } |
1632 } | 1593 } |
1633 | 1594 |
1634 /** | 1595 /// A list of Locations. This is the response from the server to GET requests |
1635 * A list of Locations. This is the response from the server to GET requests on | 1596 /// on the locations collection. |
1636 * the locations collection. | |
1637 */ | |
1638 class LocationsListResponse { | 1597 class LocationsListResponse { |
1639 /** The list of locations. */ | 1598 /// The list of locations. |
1640 core.List<Location> items; | 1599 core.List<Location> items; |
1641 /** The type of resource. This is always mirror#locationsList. */ | 1600 |
| 1601 /// The type of resource. This is always mirror#locationsList. |
1642 core.String kind; | 1602 core.String kind; |
1643 | 1603 |
1644 LocationsListResponse(); | 1604 LocationsListResponse(); |
1645 | 1605 |
1646 LocationsListResponse.fromJson(core.Map _json) { | 1606 LocationsListResponse.fromJson(core.Map _json) { |
1647 if (_json.containsKey("items")) { | 1607 if (_json.containsKey("items")) { |
1648 items = _json["items"].map((value) => new Location.fromJson(value)).toList
(); | 1608 items = |
| 1609 _json["items"].map((value) => new Location.fromJson(value)).toList(); |
1649 } | 1610 } |
1650 if (_json.containsKey("kind")) { | 1611 if (_json.containsKey("kind")) { |
1651 kind = _json["kind"]; | 1612 kind = _json["kind"]; |
1652 } | 1613 } |
1653 } | 1614 } |
1654 | 1615 |
1655 core.Map<core.String, core.Object> toJson() { | 1616 core.Map<core.String, core.Object> toJson() { |
1656 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1617 final core.Map<core.String, core.Object> _json = |
| 1618 new core.Map<core.String, core.Object>(); |
1657 if (items != null) { | 1619 if (items != null) { |
1658 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1620 _json["items"] = items.map((value) => (value).toJson()).toList(); |
1659 } | 1621 } |
1660 if (kind != null) { | 1622 if (kind != null) { |
1661 _json["kind"] = kind; | 1623 _json["kind"] = kind; |
1662 } | 1624 } |
1663 return _json; | 1625 return _json; |
1664 } | 1626 } |
1665 } | 1627 } |
1666 | 1628 |
1667 /** A custom menu item that can be presented to the user by a timeline item. */ | 1629 /// A custom menu item that can be presented to the user by a timeline item. |
1668 class MenuItem { | 1630 class MenuItem { |
1669 /** | 1631 /// Controls the behavior when the user picks the menu option. Allowed values |
1670 * Controls the behavior when the user picks the menu option. Allowed values | 1632 /// are: |
1671 * are: | 1633 /// - CUSTOM - Custom action set by the service. When the user selects this |
1672 * - CUSTOM - Custom action set by the service. When the user selects this | 1634 /// menuItem, the API triggers a notification to your callbackUrl with the |
1673 * menuItem, the API triggers a notification to your callbackUrl with the | 1635 /// userActions.type set to CUSTOM and the userActions.payload set to the ID |
1674 * userActions.type set to CUSTOM and the userActions.payload set to the ID of | 1636 /// of this menu item. This is the default value. |
1675 * this menu item. This is the default value. | 1637 /// - Built-in actions: |
1676 * - Built-in actions: | 1638 /// - REPLY - Initiate a reply to the timeline item using the voice recording |
1677 * - REPLY - Initiate a reply to the timeline item using the voice recording | 1639 /// UI. The creator attribute must be set in the timeline item for this menu |
1678 * UI. The creator attribute must be set in the timeline item for this menu to | 1640 /// to be available. |
1679 * be available. | 1641 /// - REPLY_ALL - Same behavior as REPLY. The original timeline item's |
1680 * - REPLY_ALL - Same behavior as REPLY. The original timeline item's | 1642 /// recipients will be added to the reply item. |
1681 * recipients will be added to the reply item. | 1643 /// - DELETE - Delete the timeline item. |
1682 * - DELETE - Delete the timeline item. | 1644 /// - SHARE - Share the timeline item with the available contacts. |
1683 * - SHARE - Share the timeline item with the available contacts. | 1645 /// - READ_ALOUD - Read the timeline item's speakableText aloud; if this |
1684 * - READ_ALOUD - Read the timeline item's speakableText aloud; if this field | 1646 /// field is not set, read the text field; if none of those fields are set, |
1685 * is not set, read the text field; if none of those fields are set, this menu | 1647 /// this menu item is ignored. |
1686 * item is ignored. | 1648 /// - GET_MEDIA_INPUT - Allow users to provide media payloads to Glassware |
1687 * - GET_MEDIA_INPUT - Allow users to provide media payloads to Glassware from | 1649 /// from a menu item (currently, only transcribed text from voice input is |
1688 * a menu item (currently, only transcribed text from voice input is | 1650 /// supported). Subscribe to notifications when users invoke this menu item |
1689 * supported). Subscribe to notifications when users invoke this menu item to | 1651 /// to receive the timeline item ID. Retrieve the media from the timeline |
1690 * receive the timeline item ID. Retrieve the media from the timeline item in | 1652 /// item in the payload property. |
1691 * the payload property. | 1653 /// - VOICE_CALL - Initiate a phone call using the timeline item's |
1692 * - VOICE_CALL - Initiate a phone call using the timeline item's | 1654 /// creator.phoneNumber attribute as recipient. |
1693 * creator.phoneNumber attribute as recipient. | 1655 /// - NAVIGATE - Navigate to the timeline item's location. |
1694 * - NAVIGATE - Navigate to the timeline item's location. | 1656 /// - TOGGLE_PINNED - Toggle the isPinned state of the timeline item. |
1695 * - TOGGLE_PINNED - Toggle the isPinned state of the timeline item. | 1657 /// - OPEN_URI - Open the payload of the menu item in the browser. |
1696 * - OPEN_URI - Open the payload of the menu item in the browser. | 1658 /// - PLAY_VIDEO - Open the payload of the menu item in the Glass video |
1697 * - PLAY_VIDEO - Open the payload of the menu item in the Glass video player. | 1659 /// player. |
1698 * - SEND_MESSAGE - Initiate sending a message to the timeline item's creator: | 1660 /// - SEND_MESSAGE - Initiate sending a message to the timeline item's |
1699 * - If the creator.phoneNumber is set and Glass is connected to an Android | 1661 /// creator: |
1700 * phone, the message is an SMS. | 1662 /// - If the creator.phoneNumber is set and Glass is connected to an Android |
1701 * - Otherwise, if the creator.email is set, the message is an email. | 1663 /// phone, the message is an SMS. |
1702 */ | 1664 /// - Otherwise, if the creator.email is set, the message is an email. |
1703 core.String action; | 1665 core.String action; |
1704 /** | 1666 |
1705 * The ContextualMenus.Command associated with this MenuItem (e.g. | 1667 /// The ContextualMenus.Command associated with this MenuItem (e.g. |
1706 * READ_ALOUD). The voice label for this command will be displayed in the | 1668 /// READ_ALOUD). The voice label for this command will be displayed in the |
1707 * voice menu and the touch label will be displayed in the touch menu. Note | 1669 /// voice menu and the touch label will be displayed in the touch menu. Note |
1708 * that the default menu value's display name will be overriden if you specify | 1670 /// that the default menu value's display name will be overriden if you |
1709 * this property. Values that do not correspond to a ContextualMenus.Command | 1671 /// specify this property. Values that do not correspond to a |
1710 * name will be ignored. | 1672 /// ContextualMenus.Command name will be ignored. |
1711 */ | |
1712 core.String contextualCommand; | 1673 core.String contextualCommand; |
1713 /** | 1674 |
1714 * The ID for this menu item. This is generated by the application and is | 1675 /// The ID for this menu item. This is generated by the application and is |
1715 * treated as an opaque token. | 1676 /// treated as an opaque token. |
1716 */ | |
1717 core.String id; | 1677 core.String id; |
1718 /** | 1678 |
1719 * A generic payload whose meaning changes depending on this MenuItem's | 1679 /// A generic payload whose meaning changes depending on this MenuItem's |
1720 * action. | 1680 /// action. |
1721 * - When the action is OPEN_URI, the payload is the URL of the website to | 1681 /// - When the action is OPEN_URI, the payload is the URL of the website to |
1722 * view. | 1682 /// view. |
1723 * - When the action is PLAY_VIDEO, the payload is the streaming URL of the | 1683 /// - When the action is PLAY_VIDEO, the payload is the streaming URL of the |
1724 * video | 1684 /// video |
1725 * - When the action is GET_MEDIA_INPUT, the payload is the text transcription | 1685 /// - When the action is GET_MEDIA_INPUT, the payload is the text |
1726 * of a user's speech input | 1686 /// transcription of a user's speech input |
1727 */ | |
1728 core.String payload; | 1687 core.String payload; |
1729 /** | 1688 |
1730 * If set to true on a CUSTOM menu item, that item will be removed from the | 1689 /// If set to true on a CUSTOM menu item, that item will be removed from the |
1731 * menu after it is selected. | 1690 /// menu after it is selected. |
1732 */ | |
1733 core.bool removeWhenSelected; | 1691 core.bool removeWhenSelected; |
1734 /** | 1692 |
1735 * For CUSTOM items, a list of values controlling the appearance of the menu | 1693 /// For CUSTOM items, a list of values controlling the appearance of the menu |
1736 * item in each of its states. A value for the DEFAULT state must be provided. | 1694 /// item in each of its states. A value for the DEFAULT state must be |
1737 * If the PENDING or CONFIRMED states are missing, they will not be shown. | 1695 /// provided. If the PENDING or CONFIRMED states are missing, they will not |
1738 */ | 1696 /// be shown. |
1739 core.List<MenuValue> values; | 1697 core.List<MenuValue> values; |
1740 | 1698 |
1741 MenuItem(); | 1699 MenuItem(); |
1742 | 1700 |
1743 MenuItem.fromJson(core.Map _json) { | 1701 MenuItem.fromJson(core.Map _json) { |
1744 if (_json.containsKey("action")) { | 1702 if (_json.containsKey("action")) { |
1745 action = _json["action"]; | 1703 action = _json["action"]; |
1746 } | 1704 } |
1747 if (_json.containsKey("contextual_command")) { | 1705 if (_json.containsKey("contextual_command")) { |
1748 contextualCommand = _json["contextual_command"]; | 1706 contextualCommand = _json["contextual_command"]; |
1749 } | 1707 } |
1750 if (_json.containsKey("id")) { | 1708 if (_json.containsKey("id")) { |
1751 id = _json["id"]; | 1709 id = _json["id"]; |
1752 } | 1710 } |
1753 if (_json.containsKey("payload")) { | 1711 if (_json.containsKey("payload")) { |
1754 payload = _json["payload"]; | 1712 payload = _json["payload"]; |
1755 } | 1713 } |
1756 if (_json.containsKey("removeWhenSelected")) { | 1714 if (_json.containsKey("removeWhenSelected")) { |
1757 removeWhenSelected = _json["removeWhenSelected"]; | 1715 removeWhenSelected = _json["removeWhenSelected"]; |
1758 } | 1716 } |
1759 if (_json.containsKey("values")) { | 1717 if (_json.containsKey("values")) { |
1760 values = _json["values"].map((value) => new MenuValue.fromJson(value)).toL
ist(); | 1718 values = _json["values"] |
| 1719 .map((value) => new MenuValue.fromJson(value)) |
| 1720 .toList(); |
1761 } | 1721 } |
1762 } | 1722 } |
1763 | 1723 |
1764 core.Map<core.String, core.Object> toJson() { | 1724 core.Map<core.String, core.Object> toJson() { |
1765 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1725 final core.Map<core.String, core.Object> _json = |
| 1726 new core.Map<core.String, core.Object>(); |
1766 if (action != null) { | 1727 if (action != null) { |
1767 _json["action"] = action; | 1728 _json["action"] = action; |
1768 } | 1729 } |
1769 if (contextualCommand != null) { | 1730 if (contextualCommand != null) { |
1770 _json["contextual_command"] = contextualCommand; | 1731 _json["contextual_command"] = contextualCommand; |
1771 } | 1732 } |
1772 if (id != null) { | 1733 if (id != null) { |
1773 _json["id"] = id; | 1734 _json["id"] = id; |
1774 } | 1735 } |
1775 if (payload != null) { | 1736 if (payload != null) { |
1776 _json["payload"] = payload; | 1737 _json["payload"] = payload; |
1777 } | 1738 } |
1778 if (removeWhenSelected != null) { | 1739 if (removeWhenSelected != null) { |
1779 _json["removeWhenSelected"] = removeWhenSelected; | 1740 _json["removeWhenSelected"] = removeWhenSelected; |
1780 } | 1741 } |
1781 if (values != null) { | 1742 if (values != null) { |
1782 _json["values"] = values.map((value) => (value).toJson()).toList(); | 1743 _json["values"] = values.map((value) => (value).toJson()).toList(); |
1783 } | 1744 } |
1784 return _json; | 1745 return _json; |
1785 } | 1746 } |
1786 } | 1747 } |
1787 | 1748 |
1788 /** A single value that is part of a MenuItem. */ | 1749 /// A single value that is part of a MenuItem. |
1789 class MenuValue { | 1750 class MenuValue { |
1790 /** | 1751 /// The name to display for the menu item. If you specify this property for a |
1791 * The name to display for the menu item. If you specify this property for a | 1752 /// built-in menu item, the default contextual voice command for that menu |
1792 * built-in menu item, the default contextual voice command for that menu item | 1753 /// item is not shown. |
1793 * is not shown. | |
1794 */ | |
1795 core.String displayName; | 1754 core.String displayName; |
1796 /** URL of an icon to display with the menu item. */ | 1755 |
| 1756 /// URL of an icon to display with the menu item. |
1797 core.String iconUrl; | 1757 core.String iconUrl; |
1798 /** | 1758 |
1799 * The state that this value applies to. Allowed values are: | 1759 /// The state that this value applies to. Allowed values are: |
1800 * - DEFAULT - Default value shown when displayed in the menuItems list. | 1760 /// - DEFAULT - Default value shown when displayed in the menuItems list. |
1801 * - PENDING - Value shown when the menuItem has been selected by the user but | 1761 /// - PENDING - Value shown when the menuItem has been selected by the user |
1802 * can still be cancelled. | 1762 /// but can still be cancelled. |
1803 * - CONFIRMED - Value shown when the menuItem has been selected by the user | 1763 /// - CONFIRMED - Value shown when the menuItem has been selected by the user |
1804 * and can no longer be cancelled. | 1764 /// and can no longer be cancelled. |
1805 */ | |
1806 core.String state; | 1765 core.String state; |
1807 | 1766 |
1808 MenuValue(); | 1767 MenuValue(); |
1809 | 1768 |
1810 MenuValue.fromJson(core.Map _json) { | 1769 MenuValue.fromJson(core.Map _json) { |
1811 if (_json.containsKey("displayName")) { | 1770 if (_json.containsKey("displayName")) { |
1812 displayName = _json["displayName"]; | 1771 displayName = _json["displayName"]; |
1813 } | 1772 } |
1814 if (_json.containsKey("iconUrl")) { | 1773 if (_json.containsKey("iconUrl")) { |
1815 iconUrl = _json["iconUrl"]; | 1774 iconUrl = _json["iconUrl"]; |
1816 } | 1775 } |
1817 if (_json.containsKey("state")) { | 1776 if (_json.containsKey("state")) { |
1818 state = _json["state"]; | 1777 state = _json["state"]; |
1819 } | 1778 } |
1820 } | 1779 } |
1821 | 1780 |
1822 core.Map<core.String, core.Object> toJson() { | 1781 core.Map<core.String, core.Object> toJson() { |
1823 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1782 final core.Map<core.String, core.Object> _json = |
| 1783 new core.Map<core.String, core.Object>(); |
1824 if (displayName != null) { | 1784 if (displayName != null) { |
1825 _json["displayName"] = displayName; | 1785 _json["displayName"] = displayName; |
1826 } | 1786 } |
1827 if (iconUrl != null) { | 1787 if (iconUrl != null) { |
1828 _json["iconUrl"] = iconUrl; | 1788 _json["iconUrl"] = iconUrl; |
1829 } | 1789 } |
1830 if (state != null) { | 1790 if (state != null) { |
1831 _json["state"] = state; | 1791 _json["state"] = state; |
1832 } | 1792 } |
1833 return _json; | 1793 return _json; |
1834 } | 1794 } |
1835 } | 1795 } |
1836 | 1796 |
1837 /** A notification delivered by the API. */ | 1797 /// A notification delivered by the API. |
1838 class Notification { | 1798 class Notification { |
1839 /** The collection that generated the notification. */ | 1799 /// The collection that generated the notification. |
1840 core.String collection; | 1800 core.String collection; |
1841 /** The ID of the item that generated the notification. */ | 1801 |
| 1802 /// The ID of the item that generated the notification. |
1842 core.String itemId; | 1803 core.String itemId; |
1843 /** The type of operation that generated the notification. */ | 1804 |
| 1805 /// The type of operation that generated the notification. |
1844 core.String operation; | 1806 core.String operation; |
1845 /** A list of actions taken by the user that triggered the notification. */ | 1807 |
| 1808 /// A list of actions taken by the user that triggered the notification. |
1846 core.List<UserAction> userActions; | 1809 core.List<UserAction> userActions; |
1847 /** | 1810 |
1848 * The user token provided by the service when it subscribed for | 1811 /// The user token provided by the service when it subscribed for |
1849 * notifications. | 1812 /// notifications. |
1850 */ | |
1851 core.String userToken; | 1813 core.String userToken; |
1852 /** | 1814 |
1853 * The secret verify token provided by the service when it subscribed for | 1815 /// The secret verify token provided by the service when it subscribed for |
1854 * notifications. | 1816 /// notifications. |
1855 */ | |
1856 core.String verifyToken; | 1817 core.String verifyToken; |
1857 | 1818 |
1858 Notification(); | 1819 Notification(); |
1859 | 1820 |
1860 Notification.fromJson(core.Map _json) { | 1821 Notification.fromJson(core.Map _json) { |
1861 if (_json.containsKey("collection")) { | 1822 if (_json.containsKey("collection")) { |
1862 collection = _json["collection"]; | 1823 collection = _json["collection"]; |
1863 } | 1824 } |
1864 if (_json.containsKey("itemId")) { | 1825 if (_json.containsKey("itemId")) { |
1865 itemId = _json["itemId"]; | 1826 itemId = _json["itemId"]; |
1866 } | 1827 } |
1867 if (_json.containsKey("operation")) { | 1828 if (_json.containsKey("operation")) { |
1868 operation = _json["operation"]; | 1829 operation = _json["operation"]; |
1869 } | 1830 } |
1870 if (_json.containsKey("userActions")) { | 1831 if (_json.containsKey("userActions")) { |
1871 userActions = _json["userActions"].map((value) => new UserAction.fromJson(
value)).toList(); | 1832 userActions = _json["userActions"] |
| 1833 .map((value) => new UserAction.fromJson(value)) |
| 1834 .toList(); |
1872 } | 1835 } |
1873 if (_json.containsKey("userToken")) { | 1836 if (_json.containsKey("userToken")) { |
1874 userToken = _json["userToken"]; | 1837 userToken = _json["userToken"]; |
1875 } | 1838 } |
1876 if (_json.containsKey("verifyToken")) { | 1839 if (_json.containsKey("verifyToken")) { |
1877 verifyToken = _json["verifyToken"]; | 1840 verifyToken = _json["verifyToken"]; |
1878 } | 1841 } |
1879 } | 1842 } |
1880 | 1843 |
1881 core.Map<core.String, core.Object> toJson() { | 1844 core.Map<core.String, core.Object> toJson() { |
1882 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1845 final core.Map<core.String, core.Object> _json = |
| 1846 new core.Map<core.String, core.Object>(); |
1883 if (collection != null) { | 1847 if (collection != null) { |
1884 _json["collection"] = collection; | 1848 _json["collection"] = collection; |
1885 } | 1849 } |
1886 if (itemId != null) { | 1850 if (itemId != null) { |
1887 _json["itemId"] = itemId; | 1851 _json["itemId"] = itemId; |
1888 } | 1852 } |
1889 if (operation != null) { | 1853 if (operation != null) { |
1890 _json["operation"] = operation; | 1854 _json["operation"] = operation; |
1891 } | 1855 } |
1892 if (userActions != null) { | 1856 if (userActions != null) { |
1893 _json["userActions"] = userActions.map((value) => (value).toJson()).toList
(); | 1857 _json["userActions"] = |
| 1858 userActions.map((value) => (value).toJson()).toList(); |
1894 } | 1859 } |
1895 if (userToken != null) { | 1860 if (userToken != null) { |
1896 _json["userToken"] = userToken; | 1861 _json["userToken"] = userToken; |
1897 } | 1862 } |
1898 if (verifyToken != null) { | 1863 if (verifyToken != null) { |
1899 _json["verifyToken"] = verifyToken; | 1864 _json["verifyToken"] = verifyToken; |
1900 } | 1865 } |
1901 return _json; | 1866 return _json; |
1902 } | 1867 } |
1903 } | 1868 } |
1904 | 1869 |
1905 /** | 1870 /// Controls how notifications for a timeline item are presented to the user. |
1906 * Controls how notifications for a timeline item are presented to the user. | |
1907 */ | |
1908 class NotificationConfig { | 1871 class NotificationConfig { |
1909 /** The time at which the notification should be delivered. */ | 1872 /// The time at which the notification should be delivered. |
1910 core.DateTime deliveryTime; | 1873 core.DateTime deliveryTime; |
1911 /** | 1874 |
1912 * Describes how important the notification is. Allowed values are: | 1875 /// Describes how important the notification is. Allowed values are: |
1913 * - DEFAULT - Notifications of default importance. A chime will be played to | 1876 /// - DEFAULT - Notifications of default importance. A chime will be played |
1914 * alert users. | 1877 /// to alert users. |
1915 */ | |
1916 core.String level; | 1878 core.String level; |
1917 | 1879 |
1918 NotificationConfig(); | 1880 NotificationConfig(); |
1919 | 1881 |
1920 NotificationConfig.fromJson(core.Map _json) { | 1882 NotificationConfig.fromJson(core.Map _json) { |
1921 if (_json.containsKey("deliveryTime")) { | 1883 if (_json.containsKey("deliveryTime")) { |
1922 deliveryTime = core.DateTime.parse(_json["deliveryTime"]); | 1884 deliveryTime = core.DateTime.parse(_json["deliveryTime"]); |
1923 } | 1885 } |
1924 if (_json.containsKey("level")) { | 1886 if (_json.containsKey("level")) { |
1925 level = _json["level"]; | 1887 level = _json["level"]; |
1926 } | 1888 } |
1927 } | 1889 } |
1928 | 1890 |
1929 core.Map<core.String, core.Object> toJson() { | 1891 core.Map<core.String, core.Object> toJson() { |
1930 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1892 final core.Map<core.String, core.Object> _json = |
| 1893 new core.Map<core.String, core.Object>(); |
1931 if (deliveryTime != null) { | 1894 if (deliveryTime != null) { |
1932 _json["deliveryTime"] = (deliveryTime).toIso8601String(); | 1895 _json["deliveryTime"] = (deliveryTime).toIso8601String(); |
1933 } | 1896 } |
1934 if (level != null) { | 1897 if (level != null) { |
1935 _json["level"] = level; | 1898 _json["level"] = level; |
1936 } | 1899 } |
1937 return _json; | 1900 return _json; |
1938 } | 1901 } |
1939 } | 1902 } |
1940 | 1903 |
1941 /** A setting for Glass. */ | 1904 /// A setting for Glass. |
1942 class Setting { | 1905 class Setting { |
1943 /** | 1906 /// The setting's ID. The following IDs are valid: |
1944 * The setting's ID. The following IDs are valid: | 1907 /// - locale - The key to the user’s language/locale (BCP 47 identifier) that |
1945 * - locale - The key to the user’s language/locale (BCP 47 identifier) that | 1908 /// Glassware should use to render localized content. |
1946 * Glassware should use to render localized content. | 1909 /// - timezone - The key to the user’s current time zone region as defined in |
1947 * - timezone - The key to the user’s current time zone region as defined in | 1910 /// the tz database. Example: America/Los_Angeles. |
1948 * the tz database. Example: America/Los_Angeles. | |
1949 */ | |
1950 core.String id; | 1911 core.String id; |
1951 /** The type of resource. This is always mirror#setting. */ | 1912 |
| 1913 /// The type of resource. This is always mirror#setting. |
1952 core.String kind; | 1914 core.String kind; |
1953 /** The setting value, as a string. */ | 1915 |
| 1916 /// The setting value, as a string. |
1954 core.String value; | 1917 core.String value; |
1955 | 1918 |
1956 Setting(); | 1919 Setting(); |
1957 | 1920 |
1958 Setting.fromJson(core.Map _json) { | 1921 Setting.fromJson(core.Map _json) { |
1959 if (_json.containsKey("id")) { | 1922 if (_json.containsKey("id")) { |
1960 id = _json["id"]; | 1923 id = _json["id"]; |
1961 } | 1924 } |
1962 if (_json.containsKey("kind")) { | 1925 if (_json.containsKey("kind")) { |
1963 kind = _json["kind"]; | 1926 kind = _json["kind"]; |
1964 } | 1927 } |
1965 if (_json.containsKey("value")) { | 1928 if (_json.containsKey("value")) { |
1966 value = _json["value"]; | 1929 value = _json["value"]; |
1967 } | 1930 } |
1968 } | 1931 } |
1969 | 1932 |
1970 core.Map<core.String, core.Object> toJson() { | 1933 core.Map<core.String, core.Object> toJson() { |
1971 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1934 final core.Map<core.String, core.Object> _json = |
| 1935 new core.Map<core.String, core.Object>(); |
1972 if (id != null) { | 1936 if (id != null) { |
1973 _json["id"] = id; | 1937 _json["id"] = id; |
1974 } | 1938 } |
1975 if (kind != null) { | 1939 if (kind != null) { |
1976 _json["kind"] = kind; | 1940 _json["kind"] = kind; |
1977 } | 1941 } |
1978 if (value != null) { | 1942 if (value != null) { |
1979 _json["value"] = value; | 1943 _json["value"] = value; |
1980 } | 1944 } |
1981 return _json; | 1945 return _json; |
1982 } | 1946 } |
1983 } | 1947 } |
1984 | 1948 |
1985 /** A subscription to events on a collection. */ | 1949 /// A subscription to events on a collection. |
1986 class Subscription { | 1950 class Subscription { |
1987 /** | 1951 /// The URL where notifications should be delivered (must start with |
1988 * The URL where notifications should be delivered (must start with https://). | 1952 /// https://). |
1989 */ | |
1990 core.String callbackUrl; | 1953 core.String callbackUrl; |
1991 /** | 1954 |
1992 * The collection to subscribe to. Allowed values are: | 1955 /// The collection to subscribe to. Allowed values are: |
1993 * - timeline - Changes in the timeline including insertion, deletion, and | 1956 /// - timeline - Changes in the timeline including insertion, deletion, and |
1994 * updates. | 1957 /// updates. |
1995 * - locations - Location updates. | 1958 /// - locations - Location updates. |
1996 * - settings - Settings updates. | 1959 /// - settings - Settings updates. |
1997 */ | |
1998 core.String collection; | 1960 core.String collection; |
1999 /** The ID of the subscription. */ | 1961 |
| 1962 /// The ID of the subscription. |
2000 core.String id; | 1963 core.String id; |
2001 /** The type of resource. This is always mirror#subscription. */ | 1964 |
| 1965 /// The type of resource. This is always mirror#subscription. |
2002 core.String kind; | 1966 core.String kind; |
2003 /** | 1967 |
2004 * Container object for notifications. This is not populated in the | 1968 /// Container object for notifications. This is not populated in the |
2005 * Subscription resource. | 1969 /// Subscription resource. |
2006 */ | |
2007 Notification notification; | 1970 Notification notification; |
2008 /** | 1971 |
2009 * A list of operations that should be subscribed to. An empty list indicates | 1972 /// A list of operations that should be subscribed to. An empty list |
2010 * that all operations on the collection should be subscribed to. Allowed | 1973 /// indicates that all operations on the collection should be subscribed to. |
2011 * values are: | 1974 /// Allowed values are: |
2012 * - UPDATE - The item has been updated. | 1975 /// - UPDATE - The item has been updated. |
2013 * - INSERT - A new item has been inserted. | 1976 /// - INSERT - A new item has been inserted. |
2014 * - DELETE - The item has been deleted. | 1977 /// - DELETE - The item has been deleted. |
2015 * - MENU_ACTION - A custom menu item has been triggered by the user. | 1978 /// - MENU_ACTION - A custom menu item has been triggered by the user. |
2016 */ | |
2017 core.List<core.String> operation; | 1979 core.List<core.String> operation; |
2018 /** | 1980 |
2019 * The time at which this subscription was last modified, formatted according | 1981 /// The time at which this subscription was last modified, formatted |
2020 * to RFC 3339. | 1982 /// according to RFC 3339. |
2021 */ | |
2022 core.DateTime updated; | 1983 core.DateTime updated; |
2023 /** | 1984 |
2024 * An opaque token sent to the subscriber in notifications so that it can | 1985 /// An opaque token sent to the subscriber in notifications so that it can |
2025 * determine the ID of the user. | 1986 /// determine the ID of the user. |
2026 */ | |
2027 core.String userToken; | 1987 core.String userToken; |
2028 /** | 1988 |
2029 * A secret token sent to the subscriber in notifications so that it can | 1989 /// A secret token sent to the subscriber in notifications so that it can |
2030 * verify that the notification was generated by Google. | 1990 /// verify that the notification was generated by Google. |
2031 */ | |
2032 core.String verifyToken; | 1991 core.String verifyToken; |
2033 | 1992 |
2034 Subscription(); | 1993 Subscription(); |
2035 | 1994 |
2036 Subscription.fromJson(core.Map _json) { | 1995 Subscription.fromJson(core.Map _json) { |
2037 if (_json.containsKey("callbackUrl")) { | 1996 if (_json.containsKey("callbackUrl")) { |
2038 callbackUrl = _json["callbackUrl"]; | 1997 callbackUrl = _json["callbackUrl"]; |
2039 } | 1998 } |
2040 if (_json.containsKey("collection")) { | 1999 if (_json.containsKey("collection")) { |
2041 collection = _json["collection"]; | 2000 collection = _json["collection"]; |
(...skipping 15 matching lines...) Expand all Loading... |
2057 } | 2016 } |
2058 if (_json.containsKey("userToken")) { | 2017 if (_json.containsKey("userToken")) { |
2059 userToken = _json["userToken"]; | 2018 userToken = _json["userToken"]; |
2060 } | 2019 } |
2061 if (_json.containsKey("verifyToken")) { | 2020 if (_json.containsKey("verifyToken")) { |
2062 verifyToken = _json["verifyToken"]; | 2021 verifyToken = _json["verifyToken"]; |
2063 } | 2022 } |
2064 } | 2023 } |
2065 | 2024 |
2066 core.Map<core.String, core.Object> toJson() { | 2025 core.Map<core.String, core.Object> toJson() { |
2067 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2026 final core.Map<core.String, core.Object> _json = |
| 2027 new core.Map<core.String, core.Object>(); |
2068 if (callbackUrl != null) { | 2028 if (callbackUrl != null) { |
2069 _json["callbackUrl"] = callbackUrl; | 2029 _json["callbackUrl"] = callbackUrl; |
2070 } | 2030 } |
2071 if (collection != null) { | 2031 if (collection != null) { |
2072 _json["collection"] = collection; | 2032 _json["collection"] = collection; |
2073 } | 2033 } |
2074 if (id != null) { | 2034 if (id != null) { |
2075 _json["id"] = id; | 2035 _json["id"] = id; |
2076 } | 2036 } |
2077 if (kind != null) { | 2037 if (kind != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
2089 if (userToken != null) { | 2049 if (userToken != null) { |
2090 _json["userToken"] = userToken; | 2050 _json["userToken"] = userToken; |
2091 } | 2051 } |
2092 if (verifyToken != null) { | 2052 if (verifyToken != null) { |
2093 _json["verifyToken"] = verifyToken; | 2053 _json["verifyToken"] = verifyToken; |
2094 } | 2054 } |
2095 return _json; | 2055 return _json; |
2096 } | 2056 } |
2097 } | 2057 } |
2098 | 2058 |
2099 /** | 2059 /// A list of Subscriptions. This is the response from the server to GET |
2100 * A list of Subscriptions. This is the response from the server to GET requests | 2060 /// requests on the subscription collection. |
2101 * on the subscription collection. | |
2102 */ | |
2103 class SubscriptionsListResponse { | 2061 class SubscriptionsListResponse { |
2104 /** The list of subscriptions. */ | 2062 /// The list of subscriptions. |
2105 core.List<Subscription> items; | 2063 core.List<Subscription> items; |
2106 /** The type of resource. This is always mirror#subscriptionsList. */ | 2064 |
| 2065 /// The type of resource. This is always mirror#subscriptionsList. |
2107 core.String kind; | 2066 core.String kind; |
2108 | 2067 |
2109 SubscriptionsListResponse(); | 2068 SubscriptionsListResponse(); |
2110 | 2069 |
2111 SubscriptionsListResponse.fromJson(core.Map _json) { | 2070 SubscriptionsListResponse.fromJson(core.Map _json) { |
2112 if (_json.containsKey("items")) { | 2071 if (_json.containsKey("items")) { |
2113 items = _json["items"].map((value) => new Subscription.fromJson(value)).to
List(); | 2072 items = _json["items"] |
| 2073 .map((value) => new Subscription.fromJson(value)) |
| 2074 .toList(); |
2114 } | 2075 } |
2115 if (_json.containsKey("kind")) { | 2076 if (_json.containsKey("kind")) { |
2116 kind = _json["kind"]; | 2077 kind = _json["kind"]; |
2117 } | 2078 } |
2118 } | 2079 } |
2119 | 2080 |
2120 core.Map<core.String, core.Object> toJson() { | 2081 core.Map<core.String, core.Object> toJson() { |
2121 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2082 final core.Map<core.String, core.Object> _json = |
| 2083 new core.Map<core.String, core.Object>(); |
2122 if (items != null) { | 2084 if (items != null) { |
2123 _json["items"] = items.map((value) => (value).toJson()).toList(); | 2085 _json["items"] = items.map((value) => (value).toJson()).toList(); |
2124 } | 2086 } |
2125 if (kind != null) { | 2087 if (kind != null) { |
2126 _json["kind"] = kind; | 2088 _json["kind"] = kind; |
2127 } | 2089 } |
2128 return _json; | 2090 return _json; |
2129 } | 2091 } |
2130 } | 2092 } |
2131 | 2093 |
2132 /** | 2094 /// Each item in the user's timeline is represented as a TimelineItem JSON |
2133 * Each item in the user's timeline is represented as a TimelineItem JSON | 2095 /// structure, described below. |
2134 * structure, described below. | |
2135 */ | |
2136 class TimelineItem { | 2096 class TimelineItem { |
2137 /** | 2097 /// A list of media attachments associated with this item. As a convenience, |
2138 * A list of media attachments associated with this item. As a convenience, | 2098 /// you can refer to attachments in your HTML payloads with the attachment or |
2139 * you can refer to attachments in your HTML payloads with the attachment or | 2099 /// cid scheme. For example: |
2140 * cid scheme. For example: | 2100 /// - attachment: <img src="attachment:attachment_index"> where |
2141 * - attachment: <img src="attachment:attachment_index"> where | 2101 /// attachment_index is the 0-based index of this array. |
2142 * attachment_index is the 0-based index of this array. | 2102 /// - cid: <img src="cid:attachment_id"> where attachment_id is the ID of the |
2143 * - cid: <img src="cid:attachment_id"> where attachment_id is the ID of the | 2103 /// attachment. |
2144 * attachment. | |
2145 */ | |
2146 core.List<Attachment> attachments; | 2104 core.List<Attachment> attachments; |
2147 /** | 2105 |
2148 * The bundle ID for this item. Services can specify a bundleId to group many | 2106 /// The bundle ID for this item. Services can specify a bundleId to group |
2149 * items together. They appear under a single top-level item on the device. | 2107 /// many items together. They appear under a single top-level item on the |
2150 */ | 2108 /// device. |
2151 core.String bundleId; | 2109 core.String bundleId; |
2152 /** | 2110 |
2153 * A canonical URL pointing to the canonical/high quality version of the data | 2111 /// A canonical URL pointing to the canonical/high quality version of the |
2154 * represented by the timeline item. | 2112 /// data represented by the timeline item. |
2155 */ | |
2156 core.String canonicalUrl; | 2113 core.String canonicalUrl; |
2157 /** | 2114 |
2158 * The time at which this item was created, formatted according to RFC 3339. | 2115 /// The time at which this item was created, formatted according to RFC 3339. |
2159 */ | |
2160 core.DateTime created; | 2116 core.DateTime created; |
2161 /** The user or group that created this item. */ | 2117 |
| 2118 /// The user or group that created this item. |
2162 Contact creator; | 2119 Contact creator; |
2163 /** | 2120 |
2164 * The time that should be displayed when this item is viewed in the timeline, | 2121 /// The time that should be displayed when this item is viewed in the |
2165 * formatted according to RFC 3339. This user's timeline is sorted | 2122 /// timeline, formatted according to RFC 3339. This user's timeline is sorted |
2166 * chronologically on display time, so this will also determine where the item | 2123 /// chronologically on display time, so this will also determine where the |
2167 * is displayed in the timeline. If not set by the service, the display time | 2124 /// item is displayed in the timeline. If not set by the service, the display |
2168 * defaults to the updated time. | 2125 /// time defaults to the updated time. |
2169 */ | |
2170 core.DateTime displayTime; | 2126 core.DateTime displayTime; |
2171 /** ETag for this item. */ | 2127 |
| 2128 /// ETag for this item. |
2172 core.String etag; | 2129 core.String etag; |
2173 /** | 2130 |
2174 * HTML content for this item. If both text and html are provided for an item, | 2131 /// HTML content for this item. If both text and html are provided for an |
2175 * the html will be rendered in the timeline. | 2132 /// item, the html will be rendered in the timeline. |
2176 * Allowed HTML elements - You can use these elements in your timeline cards. | 2133 /// Allowed HTML elements - You can use these elements in your timeline |
2177 * | 2134 /// cards. |
2178 * - Headers: h1, h2, h3, h4, h5, h6 | 2135 /// |
2179 * - Images: img | 2136 /// - Headers: h1, h2, h3, h4, h5, h6 |
2180 * - Lists: li, ol, ul | 2137 /// - Images: img |
2181 * - HTML5 semantics: article, aside, details, figure, figcaption, footer, | 2138 /// - Lists: li, ol, ul |
2182 * header, nav, section, summary, time | 2139 /// - HTML5 semantics: article, aside, details, figure, figcaption, footer, |
2183 * - Structural: blockquote, br, div, hr, p, span | 2140 /// header, nav, section, summary, time |
2184 * - Style: b, big, center, em, i, u, s, small, strike, strong, style, sub, | 2141 /// - Structural: blockquote, br, div, hr, p, span |
2185 * sup | 2142 /// - Style: b, big, center, em, i, u, s, small, strike, strong, style, sub, |
2186 * - Tables: table, tbody, td, tfoot, th, thead, tr | 2143 /// sup |
2187 * Blocked HTML elements: These elements and their contents are removed from | 2144 /// - Tables: table, tbody, td, tfoot, th, thead, tr |
2188 * HTML payloads. | 2145 /// Blocked HTML elements: These elements and their contents are removed from |
2189 * | 2146 /// HTML payloads. |
2190 * - Document headers: head, title | 2147 /// |
2191 * - Embeds: audio, embed, object, source, video | 2148 /// - Document headers: head, title |
2192 * - Frames: frame, frameset | 2149 /// - Embeds: audio, embed, object, source, video |
2193 * - Scripting: applet, script | 2150 /// - Frames: frame, frameset |
2194 * Other elements: Any elements that aren't listed are removed, but their | 2151 /// - Scripting: applet, script |
2195 * contents are preserved. | 2152 /// Other elements: Any elements that aren't listed are removed, but their |
2196 */ | 2153 /// contents are preserved. |
2197 core.String html; | 2154 core.String html; |
2198 /** The ID of the timeline item. This is unique within a user's timeline. */ | 2155 |
| 2156 /// The ID of the timeline item. This is unique within a user's timeline. |
2199 core.String id; | 2157 core.String id; |
2200 /** | 2158 |
2201 * If this item was generated as a reply to another item, this field will be | 2159 /// If this item was generated as a reply to another item, this field will be |
2202 * set to the ID of the item being replied to. This can be used to attach a | 2160 /// set to the ID of the item being replied to. This can be used to attach a |
2203 * reply to the appropriate conversation or post. | 2161 /// reply to the appropriate conversation or post. |
2204 */ | |
2205 core.String inReplyTo; | 2162 core.String inReplyTo; |
2206 /** | 2163 |
2207 * Whether this item is a bundle cover. | 2164 /// Whether this item is a bundle cover. |
2208 * | 2165 /// |
2209 * If an item is marked as a bundle cover, it will be the entry point to the | 2166 /// If an item is marked as a bundle cover, it will be the entry point to the |
2210 * bundle of items that have the same bundleId as that item. It will be shown | 2167 /// bundle of items that have the same bundleId as that item. It will be |
2211 * only on the main timeline — not within the opened bundle. | 2168 /// shown only on the main timeline — not within the opened bundle. |
2212 * | 2169 /// |
2213 * On the main timeline, items that are shown are: | 2170 /// On the main timeline, items that are shown are: |
2214 * - Items that have isBundleCover set to true | 2171 /// - Items that have isBundleCover set to true |
2215 * - Items that do not have a bundleId In a bundle sub-timeline, items that | 2172 /// - Items that do not have a bundleId In a bundle sub-timeline, items that |
2216 * are shown are: | 2173 /// are shown are: |
2217 * - Items that have the bundleId in question AND isBundleCover set to false | 2174 /// - Items that have the bundleId in question AND isBundleCover set to false |
2218 */ | |
2219 core.bool isBundleCover; | 2175 core.bool isBundleCover; |
2220 /** | 2176 |
2221 * When true, indicates this item is deleted, and only the ID property is set. | 2177 /// When true, indicates this item is deleted, and only the ID property is |
2222 */ | 2178 /// set. |
2223 core.bool isDeleted; | 2179 core.bool isDeleted; |
2224 /** | 2180 |
2225 * When true, indicates this item is pinned, which means it's grouped | 2181 /// When true, indicates this item is pinned, which means it's grouped |
2226 * alongside "active" items like navigation and hangouts, on the opposite side | 2182 /// alongside "active" items like navigation and hangouts, on the opposite |
2227 * of the home screen from historical (non-pinned) timeline items. You can | 2183 /// side of the home screen from historical (non-pinned) timeline items. You |
2228 * allow the user to toggle the value of this property with the TOGGLE_PINNED | 2184 /// can allow the user to toggle the value of this property with the |
2229 * built-in menu item. | 2185 /// TOGGLE_PINNED built-in menu item. |
2230 */ | |
2231 core.bool isPinned; | 2186 core.bool isPinned; |
2232 /** The type of resource. This is always mirror#timelineItem. */ | 2187 |
| 2188 /// The type of resource. This is always mirror#timelineItem. |
2233 core.String kind; | 2189 core.String kind; |
2234 /** The geographic location associated with this item. */ | 2190 |
| 2191 /// The geographic location associated with this item. |
2235 Location location; | 2192 Location location; |
2236 /** | 2193 |
2237 * A list of menu items that will be presented to the user when this item is | 2194 /// A list of menu items that will be presented to the user when this item is |
2238 * selected in the timeline. | 2195 /// selected in the timeline. |
2239 */ | |
2240 core.List<MenuItem> menuItems; | 2196 core.List<MenuItem> menuItems; |
2241 /** | 2197 |
2242 * Controls how notifications for this item are presented on the device. If | 2198 /// Controls how notifications for this item are presented on the device. If |
2243 * this is missing, no notification will be generated. | 2199 /// this is missing, no notification will be generated. |
2244 */ | |
2245 NotificationConfig notification; | 2200 NotificationConfig notification; |
2246 /** | 2201 |
2247 * For pinned items, this determines the order in which the item is displayed | 2202 /// For pinned items, this determines the order in which the item is |
2248 * in the timeline, with a higher score appearing closer to the clock. Note: | 2203 /// displayed in the timeline, with a higher score appearing closer to the |
2249 * setting this field is currently not supported. | 2204 /// clock. Note: setting this field is currently not supported. |
2250 */ | |
2251 core.int pinScore; | 2205 core.int pinScore; |
2252 /** A list of users or groups that this item has been shared with. */ | 2206 |
| 2207 /// A list of users or groups that this item has been shared with. |
2253 core.List<Contact> recipients; | 2208 core.List<Contact> recipients; |
2254 /** A URL that can be used to retrieve this item. */ | 2209 |
| 2210 /// A URL that can be used to retrieve this item. |
2255 core.String selfLink; | 2211 core.String selfLink; |
2256 /** | 2212 |
2257 * Opaque string you can use to map a timeline item to data in your own | 2213 /// Opaque string you can use to map a timeline item to data in your own |
2258 * service. | 2214 /// service. |
2259 */ | |
2260 core.String sourceItemId; | 2215 core.String sourceItemId; |
2261 /** | 2216 |
2262 * The speakable version of the content of this item. Along with the | 2217 /// The speakable version of the content of this item. Along with the |
2263 * READ_ALOUD menu item, use this field to provide text that would be clearer | 2218 /// READ_ALOUD menu item, use this field to provide text that would be |
2264 * when read aloud, or to provide extended information to what is displayed | 2219 /// clearer when read aloud, or to provide extended information to what is |
2265 * visually on Glass. | 2220 /// displayed visually on Glass. |
2266 * | 2221 /// |
2267 * Glassware should also specify the speakableType field, which will be spoken | 2222 /// Glassware should also specify the speakableType field, which will be |
2268 * before this text in cases where the additional context is useful, for | 2223 /// spoken before this text in cases where the additional context is useful, |
2269 * example when the user requests that the item be read aloud following a | 2224 /// for example when the user requests that the item be read aloud following |
2270 * notification. | 2225 /// a notification. |
2271 */ | |
2272 core.String speakableText; | 2226 core.String speakableText; |
2273 /** | 2227 |
2274 * A speakable description of the type of this item. This will be announced to | 2228 /// A speakable description of the type of this item. This will be announced |
2275 * the user prior to reading the content of the item in cases where the | 2229 /// to the user prior to reading the content of the item in cases where the |
2276 * additional context is useful, for example when the user requests that the | 2230 /// additional context is useful, for example when the user requests that the |
2277 * item be read aloud following a notification. | 2231 /// item be read aloud following a notification. |
2278 * | 2232 /// |
2279 * This should be a short, simple noun phrase such as "Email", "Text message", | 2233 /// This should be a short, simple noun phrase such as "Email", "Text |
2280 * or "Daily Planet News Update". | 2234 /// message", or "Daily Planet News Update". |
2281 * | 2235 /// |
2282 * Glassware are encouraged to populate this field for every timeline item, | 2236 /// Glassware are encouraged to populate this field for every timeline item, |
2283 * even if the item does not contain speakableText or text so that the user | 2237 /// even if the item does not contain speakableText or text so that the user |
2284 * can learn the type of the item without looking at the screen. | 2238 /// can learn the type of the item without looking at the screen. |
2285 */ | |
2286 core.String speakableType; | 2239 core.String speakableType; |
2287 /** Text content of this item. */ | 2240 |
| 2241 /// Text content of this item. |
2288 core.String text; | 2242 core.String text; |
2289 /** The title of this item. */ | 2243 |
| 2244 /// The title of this item. |
2290 core.String title; | 2245 core.String title; |
2291 /** | 2246 |
2292 * The time at which this item was last modified, formatted according to RFC | 2247 /// The time at which this item was last modified, formatted according to RFC |
2293 * 3339. | 2248 /// 3339. |
2294 */ | |
2295 core.DateTime updated; | 2249 core.DateTime updated; |
2296 | 2250 |
2297 TimelineItem(); | 2251 TimelineItem(); |
2298 | 2252 |
2299 TimelineItem.fromJson(core.Map _json) { | 2253 TimelineItem.fromJson(core.Map _json) { |
2300 if (_json.containsKey("attachments")) { | 2254 if (_json.containsKey("attachments")) { |
2301 attachments = _json["attachments"].map((value) => new Attachment.fromJson(
value)).toList(); | 2255 attachments = _json["attachments"] |
| 2256 .map((value) => new Attachment.fromJson(value)) |
| 2257 .toList(); |
2302 } | 2258 } |
2303 if (_json.containsKey("bundleId")) { | 2259 if (_json.containsKey("bundleId")) { |
2304 bundleId = _json["bundleId"]; | 2260 bundleId = _json["bundleId"]; |
2305 } | 2261 } |
2306 if (_json.containsKey("canonicalUrl")) { | 2262 if (_json.containsKey("canonicalUrl")) { |
2307 canonicalUrl = _json["canonicalUrl"]; | 2263 canonicalUrl = _json["canonicalUrl"]; |
2308 } | 2264 } |
2309 if (_json.containsKey("created")) { | 2265 if (_json.containsKey("created")) { |
2310 created = core.DateTime.parse(_json["created"]); | 2266 created = core.DateTime.parse(_json["created"]); |
2311 } | 2267 } |
(...skipping 24 matching lines...) Expand all Loading... |
2336 if (_json.containsKey("isPinned")) { | 2292 if (_json.containsKey("isPinned")) { |
2337 isPinned = _json["isPinned"]; | 2293 isPinned = _json["isPinned"]; |
2338 } | 2294 } |
2339 if (_json.containsKey("kind")) { | 2295 if (_json.containsKey("kind")) { |
2340 kind = _json["kind"]; | 2296 kind = _json["kind"]; |
2341 } | 2297 } |
2342 if (_json.containsKey("location")) { | 2298 if (_json.containsKey("location")) { |
2343 location = new Location.fromJson(_json["location"]); | 2299 location = new Location.fromJson(_json["location"]); |
2344 } | 2300 } |
2345 if (_json.containsKey("menuItems")) { | 2301 if (_json.containsKey("menuItems")) { |
2346 menuItems = _json["menuItems"].map((value) => new MenuItem.fromJson(value)
).toList(); | 2302 menuItems = _json["menuItems"] |
| 2303 .map((value) => new MenuItem.fromJson(value)) |
| 2304 .toList(); |
2347 } | 2305 } |
2348 if (_json.containsKey("notification")) { | 2306 if (_json.containsKey("notification")) { |
2349 notification = new NotificationConfig.fromJson(_json["notification"]); | 2307 notification = new NotificationConfig.fromJson(_json["notification"]); |
2350 } | 2308 } |
2351 if (_json.containsKey("pinScore")) { | 2309 if (_json.containsKey("pinScore")) { |
2352 pinScore = _json["pinScore"]; | 2310 pinScore = _json["pinScore"]; |
2353 } | 2311 } |
2354 if (_json.containsKey("recipients")) { | 2312 if (_json.containsKey("recipients")) { |
2355 recipients = _json["recipients"].map((value) => new Contact.fromJson(value
)).toList(); | 2313 recipients = _json["recipients"] |
| 2314 .map((value) => new Contact.fromJson(value)) |
| 2315 .toList(); |
2356 } | 2316 } |
2357 if (_json.containsKey("selfLink")) { | 2317 if (_json.containsKey("selfLink")) { |
2358 selfLink = _json["selfLink"]; | 2318 selfLink = _json["selfLink"]; |
2359 } | 2319 } |
2360 if (_json.containsKey("sourceItemId")) { | 2320 if (_json.containsKey("sourceItemId")) { |
2361 sourceItemId = _json["sourceItemId"]; | 2321 sourceItemId = _json["sourceItemId"]; |
2362 } | 2322 } |
2363 if (_json.containsKey("speakableText")) { | 2323 if (_json.containsKey("speakableText")) { |
2364 speakableText = _json["speakableText"]; | 2324 speakableText = _json["speakableText"]; |
2365 } | 2325 } |
2366 if (_json.containsKey("speakableType")) { | 2326 if (_json.containsKey("speakableType")) { |
2367 speakableType = _json["speakableType"]; | 2327 speakableType = _json["speakableType"]; |
2368 } | 2328 } |
2369 if (_json.containsKey("text")) { | 2329 if (_json.containsKey("text")) { |
2370 text = _json["text"]; | 2330 text = _json["text"]; |
2371 } | 2331 } |
2372 if (_json.containsKey("title")) { | 2332 if (_json.containsKey("title")) { |
2373 title = _json["title"]; | 2333 title = _json["title"]; |
2374 } | 2334 } |
2375 if (_json.containsKey("updated")) { | 2335 if (_json.containsKey("updated")) { |
2376 updated = core.DateTime.parse(_json["updated"]); | 2336 updated = core.DateTime.parse(_json["updated"]); |
2377 } | 2337 } |
2378 } | 2338 } |
2379 | 2339 |
2380 core.Map<core.String, core.Object> toJson() { | 2340 core.Map<core.String, core.Object> toJson() { |
2381 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2341 final core.Map<core.String, core.Object> _json = |
| 2342 new core.Map<core.String, core.Object>(); |
2382 if (attachments != null) { | 2343 if (attachments != null) { |
2383 _json["attachments"] = attachments.map((value) => (value).toJson()).toList
(); | 2344 _json["attachments"] = |
| 2345 attachments.map((value) => (value).toJson()).toList(); |
2384 } | 2346 } |
2385 if (bundleId != null) { | 2347 if (bundleId != null) { |
2386 _json["bundleId"] = bundleId; | 2348 _json["bundleId"] = bundleId; |
2387 } | 2349 } |
2388 if (canonicalUrl != null) { | 2350 if (canonicalUrl != null) { |
2389 _json["canonicalUrl"] = canonicalUrl; | 2351 _json["canonicalUrl"] = canonicalUrl; |
2390 } | 2352 } |
2391 if (created != null) { | 2353 if (created != null) { |
2392 _json["created"] = (created).toIso8601String(); | 2354 _json["created"] = (created).toIso8601String(); |
2393 } | 2355 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 if (menuItems != null) { | 2389 if (menuItems != null) { |
2428 _json["menuItems"] = menuItems.map((value) => (value).toJson()).toList(); | 2390 _json["menuItems"] = menuItems.map((value) => (value).toJson()).toList(); |
2429 } | 2391 } |
2430 if (notification != null) { | 2392 if (notification != null) { |
2431 _json["notification"] = (notification).toJson(); | 2393 _json["notification"] = (notification).toJson(); |
2432 } | 2394 } |
2433 if (pinScore != null) { | 2395 if (pinScore != null) { |
2434 _json["pinScore"] = pinScore; | 2396 _json["pinScore"] = pinScore; |
2435 } | 2397 } |
2436 if (recipients != null) { | 2398 if (recipients != null) { |
2437 _json["recipients"] = recipients.map((value) => (value).toJson()).toList()
; | 2399 _json["recipients"] = |
| 2400 recipients.map((value) => (value).toJson()).toList(); |
2438 } | 2401 } |
2439 if (selfLink != null) { | 2402 if (selfLink != null) { |
2440 _json["selfLink"] = selfLink; | 2403 _json["selfLink"] = selfLink; |
2441 } | 2404 } |
2442 if (sourceItemId != null) { | 2405 if (sourceItemId != null) { |
2443 _json["sourceItemId"] = sourceItemId; | 2406 _json["sourceItemId"] = sourceItemId; |
2444 } | 2407 } |
2445 if (speakableText != null) { | 2408 if (speakableText != null) { |
2446 _json["speakableText"] = speakableText; | 2409 _json["speakableText"] = speakableText; |
2447 } | 2410 } |
2448 if (speakableType != null) { | 2411 if (speakableType != null) { |
2449 _json["speakableType"] = speakableType; | 2412 _json["speakableType"] = speakableType; |
2450 } | 2413 } |
2451 if (text != null) { | 2414 if (text != null) { |
2452 _json["text"] = text; | 2415 _json["text"] = text; |
2453 } | 2416 } |
2454 if (title != null) { | 2417 if (title != null) { |
2455 _json["title"] = title; | 2418 _json["title"] = title; |
2456 } | 2419 } |
2457 if (updated != null) { | 2420 if (updated != null) { |
2458 _json["updated"] = (updated).toIso8601String(); | 2421 _json["updated"] = (updated).toIso8601String(); |
2459 } | 2422 } |
2460 return _json; | 2423 return _json; |
2461 } | 2424 } |
2462 } | 2425 } |
2463 | 2426 |
2464 /** | 2427 /// A list of timeline items. This is the response from the server to GET |
2465 * A list of timeline items. This is the response from the server to GET | 2428 /// requests on the timeline collection. |
2466 * requests on the timeline collection. | |
2467 */ | |
2468 class TimelineListResponse { | 2429 class TimelineListResponse { |
2469 /** Items in the timeline. */ | 2430 /// Items in the timeline. |
2470 core.List<TimelineItem> items; | 2431 core.List<TimelineItem> items; |
2471 /** The type of resource. This is always mirror#timeline. */ | 2432 |
| 2433 /// The type of resource. This is always mirror#timeline. |
2472 core.String kind; | 2434 core.String kind; |
2473 /** | 2435 |
2474 * The next page token. Provide this as the pageToken parameter in the request | 2436 /// The next page token. Provide this as the pageToken parameter in the |
2475 * to retrieve the next page of results. | 2437 /// request to retrieve the next page of results. |
2476 */ | |
2477 core.String nextPageToken; | 2438 core.String nextPageToken; |
2478 | 2439 |
2479 TimelineListResponse(); | 2440 TimelineListResponse(); |
2480 | 2441 |
2481 TimelineListResponse.fromJson(core.Map _json) { | 2442 TimelineListResponse.fromJson(core.Map _json) { |
2482 if (_json.containsKey("items")) { | 2443 if (_json.containsKey("items")) { |
2483 items = _json["items"].map((value) => new TimelineItem.fromJson(value)).to
List(); | 2444 items = _json["items"] |
| 2445 .map((value) => new TimelineItem.fromJson(value)) |
| 2446 .toList(); |
2484 } | 2447 } |
2485 if (_json.containsKey("kind")) { | 2448 if (_json.containsKey("kind")) { |
2486 kind = _json["kind"]; | 2449 kind = _json["kind"]; |
2487 } | 2450 } |
2488 if (_json.containsKey("nextPageToken")) { | 2451 if (_json.containsKey("nextPageToken")) { |
2489 nextPageToken = _json["nextPageToken"]; | 2452 nextPageToken = _json["nextPageToken"]; |
2490 } | 2453 } |
2491 } | 2454 } |
2492 | 2455 |
2493 core.Map<core.String, core.Object> toJson() { | 2456 core.Map<core.String, core.Object> toJson() { |
2494 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2457 final core.Map<core.String, core.Object> _json = |
| 2458 new core.Map<core.String, core.Object>(); |
2495 if (items != null) { | 2459 if (items != null) { |
2496 _json["items"] = items.map((value) => (value).toJson()).toList(); | 2460 _json["items"] = items.map((value) => (value).toJson()).toList(); |
2497 } | 2461 } |
2498 if (kind != null) { | 2462 if (kind != null) { |
2499 _json["kind"] = kind; | 2463 _json["kind"] = kind; |
2500 } | 2464 } |
2501 if (nextPageToken != null) { | 2465 if (nextPageToken != null) { |
2502 _json["nextPageToken"] = nextPageToken; | 2466 _json["nextPageToken"] = nextPageToken; |
2503 } | 2467 } |
2504 return _json; | 2468 return _json; |
2505 } | 2469 } |
2506 } | 2470 } |
2507 | 2471 |
2508 /** Represents an action taken by the user that triggered a notification. */ | 2472 /// Represents an action taken by the user that triggered a notification. |
2509 class UserAction { | 2473 class UserAction { |
2510 /** | 2474 /// An optional payload for the action. |
2511 * An optional payload for the action. | 2475 /// |
2512 * | 2476 /// For actions of type CUSTOM, this is the ID of the custom menu item that |
2513 * For actions of type CUSTOM, this is the ID of the custom menu item that was | 2477 /// was selected. |
2514 * selected. | |
2515 */ | |
2516 core.String payload; | 2478 core.String payload; |
2517 /** | 2479 |
2518 * The type of action. The value of this can be: | 2480 /// The type of action. The value of this can be: |
2519 * - SHARE - the user shared an item. | 2481 /// - SHARE - the user shared an item. |
2520 * - REPLY - the user replied to an item. | 2482 /// - REPLY - the user replied to an item. |
2521 * - REPLY_ALL - the user replied to all recipients of an item. | 2483 /// - REPLY_ALL - the user replied to all recipients of an item. |
2522 * - CUSTOM - the user selected a custom menu item on the timeline item. | 2484 /// - CUSTOM - the user selected a custom menu item on the timeline item. |
2523 * - DELETE - the user deleted the item. | 2485 /// - DELETE - the user deleted the item. |
2524 * - PIN - the user pinned the item. | 2486 /// - PIN - the user pinned the item. |
2525 * - UNPIN - the user unpinned the item. | 2487 /// - UNPIN - the user unpinned the item. |
2526 * - LAUNCH - the user initiated a voice command. In the future, additional | 2488 /// - LAUNCH - the user initiated a voice command. In the future, additional |
2527 * types may be added. UserActions with unrecognized types should be ignored. | 2489 /// types may be added. UserActions with unrecognized types should be |
2528 */ | 2490 /// ignored. |
2529 core.String type; | 2491 core.String type; |
2530 | 2492 |
2531 UserAction(); | 2493 UserAction(); |
2532 | 2494 |
2533 UserAction.fromJson(core.Map _json) { | 2495 UserAction.fromJson(core.Map _json) { |
2534 if (_json.containsKey("payload")) { | 2496 if (_json.containsKey("payload")) { |
2535 payload = _json["payload"]; | 2497 payload = _json["payload"]; |
2536 } | 2498 } |
2537 if (_json.containsKey("type")) { | 2499 if (_json.containsKey("type")) { |
2538 type = _json["type"]; | 2500 type = _json["type"]; |
2539 } | 2501 } |
2540 } | 2502 } |
2541 | 2503 |
2542 core.Map<core.String, core.Object> toJson() { | 2504 core.Map<core.String, core.Object> toJson() { |
2543 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2505 final core.Map<core.String, core.Object> _json = |
| 2506 new core.Map<core.String, core.Object>(); |
2544 if (payload != null) { | 2507 if (payload != null) { |
2545 _json["payload"] = payload; | 2508 _json["payload"] = payload; |
2546 } | 2509 } |
2547 if (type != null) { | 2510 if (type != null) { |
2548 _json["type"] = type; | 2511 _json["type"] = type; |
2549 } | 2512 } |
2550 return _json; | 2513 return _json; |
2551 } | 2514 } |
2552 } | 2515 } |
2553 | 2516 |
2554 class UserData { | 2517 class UserData { |
2555 core.String key; | 2518 core.String key; |
2556 core.String value; | 2519 core.String value; |
2557 | 2520 |
2558 UserData(); | 2521 UserData(); |
2559 | 2522 |
2560 UserData.fromJson(core.Map _json) { | 2523 UserData.fromJson(core.Map _json) { |
2561 if (_json.containsKey("key")) { | 2524 if (_json.containsKey("key")) { |
2562 key = _json["key"]; | 2525 key = _json["key"]; |
2563 } | 2526 } |
2564 if (_json.containsKey("value")) { | 2527 if (_json.containsKey("value")) { |
2565 value = _json["value"]; | 2528 value = _json["value"]; |
2566 } | 2529 } |
2567 } | 2530 } |
2568 | 2531 |
2569 core.Map<core.String, core.Object> toJson() { | 2532 core.Map<core.String, core.Object> toJson() { |
2570 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2533 final core.Map<core.String, core.Object> _json = |
| 2534 new core.Map<core.String, core.Object>(); |
2571 if (key != null) { | 2535 if (key != null) { |
2572 _json["key"] = key; | 2536 _json["key"] = key; |
2573 } | 2537 } |
2574 if (value != null) { | 2538 if (value != null) { |
2575 _json["value"] = value; | 2539 _json["value"] = value; |
2576 } | 2540 } |
2577 return _json; | 2541 return _json; |
2578 } | 2542 } |
2579 } | 2543 } |
OLD | NEW |