OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.fusiontables.v2; | 3 library googleapis.fusiontables.v2; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, |
| 16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, |
| 17 ByteRange; |
| 18 |
| 19 const core.String USER_AGENT = 'dart-api-client fusiontables/v2'; |
15 | 20 |
16 /** API for working with Fusion Tables data. */ | 21 /** API for working with Fusion Tables data. */ |
17 class FusiontablesApi { | 22 class FusiontablesApi { |
18 /** Manage your Fusion Tables */ | 23 /** Manage your Fusion Tables */ |
19 static const FusiontablesScope = "https://www.googleapis.com/auth/fusiontables
"; | 24 static const FusiontablesScope = "https://www.googleapis.com/auth/fusiontables
"; |
20 | 25 |
21 /** View your Fusion Tables */ | 26 /** View your Fusion Tables */ |
22 static const FusiontablesReadonlyScope = "https://www.googleapis.com/auth/fusi
ontables.readonly"; | 27 static const FusiontablesReadonlyScope = "https://www.googleapis.com/auth/fusi
ontables.readonly"; |
23 | 28 |
24 | 29 |
25 final common_internal.ApiRequester _requester; | 30 final commons.ApiRequester _requester; |
26 | 31 |
27 ColumnResourceApi get column => new ColumnResourceApi(_requester); | 32 ColumnResourceApi get column => new ColumnResourceApi(_requester); |
28 QueryResourceApi get query => new QueryResourceApi(_requester); | 33 QueryResourceApi get query => new QueryResourceApi(_requester); |
29 StyleResourceApi get style => new StyleResourceApi(_requester); | 34 StyleResourceApi get style => new StyleResourceApi(_requester); |
30 TableResourceApi get table => new TableResourceApi(_requester); | 35 TableResourceApi get table => new TableResourceApi(_requester); |
31 TaskResourceApi get task => new TaskResourceApi(_requester); | 36 TaskResourceApi get task => new TaskResourceApi(_requester); |
32 TemplateResourceApi get template => new TemplateResourceApi(_requester); | 37 TemplateResourceApi get template => new TemplateResourceApi(_requester); |
33 | 38 |
34 FusiontablesApi(http.Client client, {core.String rootUrl: "https://www.googlea
pis.com/", core.String servicePath: "fusiontables/v2/"}) : | 39 FusiontablesApi(http.Client client, {core.String rootUrl: "https://www.googlea
pis.com/", core.String servicePath: "fusiontables/v2/"}) : |
35 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 40 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
36 } | 41 } |
37 | 42 |
38 | 43 |
39 /** Not documented yet. */ | |
40 class ColumnResourceApi { | 44 class ColumnResourceApi { |
41 final common_internal.ApiRequester _requester; | 45 final commons.ApiRequester _requester; |
42 | 46 |
43 ColumnResourceApi(common_internal.ApiRequester client) : | 47 ColumnResourceApi(commons.ApiRequester client) : |
44 _requester = client; | 48 _requester = client; |
45 | 49 |
46 /** | 50 /** |
47 * Deletes the column. | 51 * Deletes the specified column. |
48 * | 52 * |
49 * Request parameters: | 53 * Request parameters: |
50 * | 54 * |
51 * [tableId] - Table from which the column is being deleted. | 55 * [tableId] - Table from which the column is being deleted. |
52 * | 56 * |
53 * [columnId] - Name or identifier for the column being deleted. | 57 * [columnId] - Name or identifier for the column being deleted. |
54 * | 58 * |
55 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 59 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
56 * error. | 60 * error. |
57 * | 61 * |
58 * If the used [http.Client] completes with an error when making a REST call, | 62 * If the used [http.Client] completes with an error when making a REST call, |
59 * this method will complete with the same error. | 63 * this method will complete with the same error. |
60 */ | 64 */ |
61 async.Future delete(core.String tableId, core.String columnId) { | 65 async.Future delete(core.String tableId, core.String columnId) { |
62 var _url = null; | 66 var _url = null; |
63 var _queryParams = new core.Map(); | 67 var _queryParams = new core.Map(); |
64 var _uploadMedia = null; | 68 var _uploadMedia = null; |
65 var _uploadOptions = null; | 69 var _uploadOptions = null; |
66 var _downloadOptions = common.DownloadOptions.Metadata; | 70 var _downloadOptions = commons.DownloadOptions.Metadata; |
67 var _body = null; | 71 var _body = null; |
68 | 72 |
69 if (tableId == null) { | 73 if (tableId == null) { |
70 throw new core.ArgumentError("Parameter tableId is required."); | 74 throw new core.ArgumentError("Parameter tableId is required."); |
71 } | 75 } |
72 if (columnId == null) { | 76 if (columnId == null) { |
73 throw new core.ArgumentError("Parameter columnId is required."); | 77 throw new core.ArgumentError("Parameter columnId is required."); |
74 } | 78 } |
75 | 79 |
76 _downloadOptions = null; | 80 _downloadOptions = null; |
77 | 81 |
78 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/col
umns/' + common_internal.Escaper.ecapeVariable('$columnId'); | 82 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/columns/' +
commons.Escaper.ecapeVariable('$columnId'); |
79 | 83 |
80 var _response = _requester.request(_url, | 84 var _response = _requester.request(_url, |
81 "DELETE", | 85 "DELETE", |
82 body: _body, | 86 body: _body, |
83 queryParams: _queryParams, | 87 queryParams: _queryParams, |
84 uploadOptions: _uploadOptions, | 88 uploadOptions: _uploadOptions, |
85 uploadMedia: _uploadMedia, | 89 uploadMedia: _uploadMedia, |
86 downloadOptions: _downloadOptions); | 90 downloadOptions: _downloadOptions); |
87 return _response.then((data) => null); | 91 return _response.then((data) => null); |
88 } | 92 } |
89 | 93 |
90 /** | 94 /** |
91 * Retrieves a specific column by its id. | 95 * Retrieves a specific column by its ID. |
92 * | 96 * |
93 * Request parameters: | 97 * Request parameters: |
94 * | 98 * |
95 * [tableId] - Table to which the column belongs. | 99 * [tableId] - Table to which the column belongs. |
96 * | 100 * |
97 * [columnId] - Name or identifier for the column that is being requested. | 101 * [columnId] - Name or identifier for the column that is being requested. |
98 * | 102 * |
99 * Completes with a [Column]. | 103 * Completes with a [Column]. |
100 * | 104 * |
101 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 105 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
102 * error. | 106 * error. |
103 * | 107 * |
104 * If the used [http.Client] completes with an error when making a REST call, | 108 * If the used [http.Client] completes with an error when making a REST call, |
105 * this method will complete with the same error. | 109 * this method will complete with the same error. |
106 */ | 110 */ |
107 async.Future<Column> get(core.String tableId, core.String columnId) { | 111 async.Future<Column> get(core.String tableId, core.String columnId) { |
108 var _url = null; | 112 var _url = null; |
109 var _queryParams = new core.Map(); | 113 var _queryParams = new core.Map(); |
110 var _uploadMedia = null; | 114 var _uploadMedia = null; |
111 var _uploadOptions = null; | 115 var _uploadOptions = null; |
112 var _downloadOptions = common.DownloadOptions.Metadata; | 116 var _downloadOptions = commons.DownloadOptions.Metadata; |
113 var _body = null; | 117 var _body = null; |
114 | 118 |
115 if (tableId == null) { | 119 if (tableId == null) { |
116 throw new core.ArgumentError("Parameter tableId is required."); | 120 throw new core.ArgumentError("Parameter tableId is required."); |
117 } | 121 } |
118 if (columnId == null) { | 122 if (columnId == null) { |
119 throw new core.ArgumentError("Parameter columnId is required."); | 123 throw new core.ArgumentError("Parameter columnId is required."); |
120 } | 124 } |
121 | 125 |
122 | 126 |
123 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/col
umns/' + common_internal.Escaper.ecapeVariable('$columnId'); | 127 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/columns/' +
commons.Escaper.ecapeVariable('$columnId'); |
124 | 128 |
125 var _response = _requester.request(_url, | 129 var _response = _requester.request(_url, |
126 "GET", | 130 "GET", |
127 body: _body, | 131 body: _body, |
128 queryParams: _queryParams, | 132 queryParams: _queryParams, |
129 uploadOptions: _uploadOptions, | 133 uploadOptions: _uploadOptions, |
130 uploadMedia: _uploadMedia, | 134 uploadMedia: _uploadMedia, |
131 downloadOptions: _downloadOptions); | 135 downloadOptions: _downloadOptions); |
132 return _response.then((data) => new Column.fromJson(data)); | 136 return _response.then((data) => new Column.fromJson(data)); |
133 } | 137 } |
134 | 138 |
135 /** | 139 /** |
136 * Adds a new column to the table. | 140 * Adds a new column to the table. |
137 * | 141 * |
138 * [request] - The metadata request object. | 142 * [request] - The metadata request object. |
139 * | 143 * |
140 * Request parameters: | 144 * Request parameters: |
141 * | 145 * |
142 * [tableId] - Table for which a new column is being added. | 146 * [tableId] - Table for which a new column is being added. |
143 * | 147 * |
144 * Completes with a [Column]. | 148 * Completes with a [Column]. |
145 * | 149 * |
146 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 150 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
147 * error. | 151 * error. |
148 * | 152 * |
149 * If the used [http.Client] completes with an error when making a REST call, | 153 * If the used [http.Client] completes with an error when making a REST call, |
150 * this method will complete with the same error. | 154 * this method will complete with the same error. |
151 */ | 155 */ |
152 async.Future<Column> insert(Column request, core.String tableId) { | 156 async.Future<Column> insert(Column request, core.String tableId) { |
153 var _url = null; | 157 var _url = null; |
154 var _queryParams = new core.Map(); | 158 var _queryParams = new core.Map(); |
155 var _uploadMedia = null; | 159 var _uploadMedia = null; |
156 var _uploadOptions = null; | 160 var _uploadOptions = null; |
157 var _downloadOptions = common.DownloadOptions.Metadata; | 161 var _downloadOptions = commons.DownloadOptions.Metadata; |
158 var _body = null; | 162 var _body = null; |
159 | 163 |
160 if (request != null) { | 164 if (request != null) { |
161 _body = convert.JSON.encode((request).toJson()); | 165 _body = convert.JSON.encode((request).toJson()); |
162 } | 166 } |
163 if (tableId == null) { | 167 if (tableId == null) { |
164 throw new core.ArgumentError("Parameter tableId is required."); | 168 throw new core.ArgumentError("Parameter tableId is required."); |
165 } | 169 } |
166 | 170 |
167 | 171 |
168 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/col
umns'; | 172 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/columns'; |
169 | 173 |
170 var _response = _requester.request(_url, | 174 var _response = _requester.request(_url, |
171 "POST", | 175 "POST", |
172 body: _body, | 176 body: _body, |
173 queryParams: _queryParams, | 177 queryParams: _queryParams, |
174 uploadOptions: _uploadOptions, | 178 uploadOptions: _uploadOptions, |
175 uploadMedia: _uploadMedia, | 179 uploadMedia: _uploadMedia, |
176 downloadOptions: _downloadOptions); | 180 downloadOptions: _downloadOptions); |
177 return _response.then((data) => new Column.fromJson(data)); | 181 return _response.then((data) => new Column.fromJson(data)); |
178 } | 182 } |
179 | 183 |
180 /** | 184 /** |
181 * Retrieves a list of columns. | 185 * Retrieves a list of columns. |
182 * | 186 * |
183 * Request parameters: | 187 * Request parameters: |
184 * | 188 * |
185 * [tableId] - Table whose columns are being listed. | 189 * [tableId] - Table whose columns are being listed. |
186 * | 190 * |
187 * [maxResults] - Maximum number of columns to return. Default is 5. | 191 * [maxResults] - Maximum number of columns to return. Default is 5. |
188 * | 192 * |
189 * [pageToken] - Continuation token specifying which result page to return. | 193 * [pageToken] - Continuation token specifying which result page to return. |
190 * | 194 * |
191 * Completes with a [ColumnList]. | 195 * Completes with a [ColumnList]. |
192 * | 196 * |
193 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 197 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
194 * error. | 198 * error. |
195 * | 199 * |
196 * If the used [http.Client] completes with an error when making a REST call, | 200 * If the used [http.Client] completes with an error when making a REST call, |
197 * this method will complete with the same error. | 201 * this method will complete with the same error. |
198 */ | 202 */ |
199 async.Future<ColumnList> list(core.String tableId, {core.int maxResults, core.
String pageToken}) { | 203 async.Future<ColumnList> list(core.String tableId, {core.int maxResults, core.
String pageToken}) { |
200 var _url = null; | 204 var _url = null; |
201 var _queryParams = new core.Map(); | 205 var _queryParams = new core.Map(); |
202 var _uploadMedia = null; | 206 var _uploadMedia = null; |
203 var _uploadOptions = null; | 207 var _uploadOptions = null; |
204 var _downloadOptions = common.DownloadOptions.Metadata; | 208 var _downloadOptions = commons.DownloadOptions.Metadata; |
205 var _body = null; | 209 var _body = null; |
206 | 210 |
207 if (tableId == null) { | 211 if (tableId == null) { |
208 throw new core.ArgumentError("Parameter tableId is required."); | 212 throw new core.ArgumentError("Parameter tableId is required."); |
209 } | 213 } |
210 if (maxResults != null) { | 214 if (maxResults != null) { |
211 _queryParams["maxResults"] = ["${maxResults}"]; | 215 _queryParams["maxResults"] = ["${maxResults}"]; |
212 } | 216 } |
213 if (pageToken != null) { | 217 if (pageToken != null) { |
214 _queryParams["pageToken"] = [pageToken]; | 218 _queryParams["pageToken"] = [pageToken]; |
215 } | 219 } |
216 | 220 |
217 | 221 |
218 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/col
umns'; | 222 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/columns'; |
219 | 223 |
220 var _response = _requester.request(_url, | 224 var _response = _requester.request(_url, |
221 "GET", | 225 "GET", |
222 body: _body, | 226 body: _body, |
223 queryParams: _queryParams, | 227 queryParams: _queryParams, |
224 uploadOptions: _uploadOptions, | 228 uploadOptions: _uploadOptions, |
225 uploadMedia: _uploadMedia, | 229 uploadMedia: _uploadMedia, |
226 downloadOptions: _downloadOptions); | 230 downloadOptions: _downloadOptions); |
227 return _response.then((data) => new ColumnList.fromJson(data)); | 231 return _response.then((data) => new ColumnList.fromJson(data)); |
228 } | 232 } |
229 | 233 |
230 /** | 234 /** |
231 * Updates the name or type of an existing column. This method supports patch | 235 * Updates the name or type of an existing column. This method supports patch |
232 * semantics. | 236 * semantics. |
233 * | 237 * |
234 * [request] - The metadata request object. | 238 * [request] - The metadata request object. |
235 * | 239 * |
236 * Request parameters: | 240 * Request parameters: |
237 * | 241 * |
238 * [tableId] - Table for which the column is being updated. | 242 * [tableId] - Table for which the column is being updated. |
239 * | 243 * |
240 * [columnId] - Name or identifier for the column that is being updated. | 244 * [columnId] - Name or identifier for the column that is being updated. |
241 * | 245 * |
242 * Completes with a [Column]. | 246 * Completes with a [Column]. |
243 * | 247 * |
244 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 248 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
245 * error. | 249 * error. |
246 * | 250 * |
247 * If the used [http.Client] completes with an error when making a REST call, | 251 * If the used [http.Client] completes with an error when making a REST call, |
248 * this method will complete with the same error. | 252 * this method will complete with the same error. |
249 */ | 253 */ |
250 async.Future<Column> patch(Column request, core.String tableId, core.String co
lumnId) { | 254 async.Future<Column> patch(Column request, core.String tableId, core.String co
lumnId) { |
251 var _url = null; | 255 var _url = null; |
252 var _queryParams = new core.Map(); | 256 var _queryParams = new core.Map(); |
253 var _uploadMedia = null; | 257 var _uploadMedia = null; |
254 var _uploadOptions = null; | 258 var _uploadOptions = null; |
255 var _downloadOptions = common.DownloadOptions.Metadata; | 259 var _downloadOptions = commons.DownloadOptions.Metadata; |
256 var _body = null; | 260 var _body = null; |
257 | 261 |
258 if (request != null) { | 262 if (request != null) { |
259 _body = convert.JSON.encode((request).toJson()); | 263 _body = convert.JSON.encode((request).toJson()); |
260 } | 264 } |
261 if (tableId == null) { | 265 if (tableId == null) { |
262 throw new core.ArgumentError("Parameter tableId is required."); | 266 throw new core.ArgumentError("Parameter tableId is required."); |
263 } | 267 } |
264 if (columnId == null) { | 268 if (columnId == null) { |
265 throw new core.ArgumentError("Parameter columnId is required."); | 269 throw new core.ArgumentError("Parameter columnId is required."); |
266 } | 270 } |
267 | 271 |
268 | 272 |
269 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/col
umns/' + common_internal.Escaper.ecapeVariable('$columnId'); | 273 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/columns/' +
commons.Escaper.ecapeVariable('$columnId'); |
270 | 274 |
271 var _response = _requester.request(_url, | 275 var _response = _requester.request(_url, |
272 "PATCH", | 276 "PATCH", |
273 body: _body, | 277 body: _body, |
274 queryParams: _queryParams, | 278 queryParams: _queryParams, |
275 uploadOptions: _uploadOptions, | 279 uploadOptions: _uploadOptions, |
276 uploadMedia: _uploadMedia, | 280 uploadMedia: _uploadMedia, |
277 downloadOptions: _downloadOptions); | 281 downloadOptions: _downloadOptions); |
278 return _response.then((data) => new Column.fromJson(data)); | 282 return _response.then((data) => new Column.fromJson(data)); |
279 } | 283 } |
280 | 284 |
281 /** | 285 /** |
282 * Updates the name or type of an existing column. | 286 * Updates the name or type of an existing column. |
283 * | 287 * |
284 * [request] - The metadata request object. | 288 * [request] - The metadata request object. |
285 * | 289 * |
286 * Request parameters: | 290 * Request parameters: |
287 * | 291 * |
288 * [tableId] - Table for which the column is being updated. | 292 * [tableId] - Table for which the column is being updated. |
289 * | 293 * |
290 * [columnId] - Name or identifier for the column that is being updated. | 294 * [columnId] - Name or identifier for the column that is being updated. |
291 * | 295 * |
292 * Completes with a [Column]. | 296 * Completes with a [Column]. |
293 * | 297 * |
294 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 298 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
295 * error. | 299 * error. |
296 * | 300 * |
297 * If the used [http.Client] completes with an error when making a REST call, | 301 * If the used [http.Client] completes with an error when making a REST call, |
298 * this method will complete with the same error. | 302 * this method will complete with the same error. |
299 */ | 303 */ |
300 async.Future<Column> update(Column request, core.String tableId, core.String c
olumnId) { | 304 async.Future<Column> update(Column request, core.String tableId, core.String c
olumnId) { |
301 var _url = null; | 305 var _url = null; |
302 var _queryParams = new core.Map(); | 306 var _queryParams = new core.Map(); |
303 var _uploadMedia = null; | 307 var _uploadMedia = null; |
304 var _uploadOptions = null; | 308 var _uploadOptions = null; |
305 var _downloadOptions = common.DownloadOptions.Metadata; | 309 var _downloadOptions = commons.DownloadOptions.Metadata; |
306 var _body = null; | 310 var _body = null; |
307 | 311 |
308 if (request != null) { | 312 if (request != null) { |
309 _body = convert.JSON.encode((request).toJson()); | 313 _body = convert.JSON.encode((request).toJson()); |
310 } | 314 } |
311 if (tableId == null) { | 315 if (tableId == null) { |
312 throw new core.ArgumentError("Parameter tableId is required."); | 316 throw new core.ArgumentError("Parameter tableId is required."); |
313 } | 317 } |
314 if (columnId == null) { | 318 if (columnId == null) { |
315 throw new core.ArgumentError("Parameter columnId is required."); | 319 throw new core.ArgumentError("Parameter columnId is required."); |
316 } | 320 } |
317 | 321 |
318 | 322 |
319 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/col
umns/' + common_internal.Escaper.ecapeVariable('$columnId'); | 323 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/columns/' +
commons.Escaper.ecapeVariable('$columnId'); |
320 | 324 |
321 var _response = _requester.request(_url, | 325 var _response = _requester.request(_url, |
322 "PUT", | 326 "PUT", |
323 body: _body, | 327 body: _body, |
324 queryParams: _queryParams, | 328 queryParams: _queryParams, |
325 uploadOptions: _uploadOptions, | 329 uploadOptions: _uploadOptions, |
326 uploadMedia: _uploadMedia, | 330 uploadMedia: _uploadMedia, |
327 downloadOptions: _downloadOptions); | 331 downloadOptions: _downloadOptions); |
328 return _response.then((data) => new Column.fromJson(data)); | 332 return _response.then((data) => new Column.fromJson(data)); |
329 } | 333 } |
330 | 334 |
331 } | 335 } |
332 | 336 |
333 | 337 |
334 /** Not documented yet. */ | |
335 class QueryResourceApi { | 338 class QueryResourceApi { |
336 final common_internal.ApiRequester _requester; | 339 final commons.ApiRequester _requester; |
337 | 340 |
338 QueryResourceApi(common_internal.ApiRequester client) : | 341 QueryResourceApi(commons.ApiRequester client) : |
339 _requester = client; | 342 _requester = client; |
340 | 343 |
341 /** | 344 /** |
342 * Executes an SQL SELECT/INSERT/UPDATE/DELETE/SHOW/DESCRIBE/CREATE statement. | 345 * Executes a Fusion Tables SQL statement, which can be any of |
| 346 * - SELECT |
| 347 * - INSERT |
| 348 * - UPDATE |
| 349 * - DELETE |
| 350 * - SHOW |
| 351 * - DESCRIBE |
| 352 * - CREATE statement. |
343 * | 353 * |
344 * Request parameters: | 354 * Request parameters: |
345 * | 355 * |
346 * [sql_1] - An SQL SELECT/SHOW/DESCRIBE/INSERT/UPDATE/DELETE/CREATE | 356 * [sql_1] - A Fusion Tables SQL statement, which can be any of |
347 * statement. | 357 * - SELECT |
| 358 * - INSERT |
| 359 * - UPDATE |
| 360 * - DELETE |
| 361 * - SHOW |
| 362 * - DESCRIBE |
| 363 * - CREATE |
348 * | 364 * |
349 * [hdrs] - Should column names be included (in the first row)?. Default is | 365 * [hdrs] - Whether column names are included in the first row. Default is |
350 * true. | 366 * true. |
351 * | 367 * |
352 * [typed] - Should typed values be returned in the (JSON) response -- numbers | 368 * [typed] - Whether typed values are returned in the (JSON) response: numbers |
353 * for numeric values and parsed geometries for KML values? Default is true. | 369 * for numeric values and parsed geometries for KML values. Default is true. |
354 * | 370 * |
355 * [downloadOptions] - Options for downloading. A download can be either a | 371 * [downloadOptions] - Options for downloading. A download can be either a |
356 * Metadata (default) or Media download. Partial Media downloads are possible | 372 * Metadata (default) or Media download. Partial Media downloads are possible |
357 * as well. | 373 * as well. |
358 * | 374 * |
359 * Completes with a | 375 * Completes with a |
360 * | 376 * |
361 * - [Sqlresponse] for Metadata downloads (see [downloadOptions]). | 377 * - [Sqlresponse] for Metadata downloads (see [downloadOptions]). |
362 * | 378 * |
363 * - [common.Media] for Media downloads (see [downloadOptions]). | 379 * - [commons.Media] for Media downloads (see [downloadOptions]). |
364 * | 380 * |
365 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
366 * error. | 382 * error. |
367 * | 383 * |
368 * If the used [http.Client] completes with an error when making a REST call, | 384 * If the used [http.Client] completes with an error when making a REST call, |
369 * this method will complete with the same error. | 385 * this method will complete with the same error. |
370 */ | 386 */ |
371 async.Future sql(core.String sql_1, {core.bool hdrs, core.bool typed, common.D
ownloadOptions downloadOptions: common.DownloadOptions.Metadata}) { | 387 async.Future sql(core.String sql_1, {core.bool hdrs, core.bool typed, commons.
DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
372 var _url = null; | 388 var _url = null; |
373 var _queryParams = new core.Map(); | 389 var _queryParams = new core.Map(); |
374 var _uploadMedia = null; | 390 var _uploadMedia = null; |
375 var _uploadOptions = null; | 391 var _uploadOptions = null; |
376 var _downloadOptions = common.DownloadOptions.Metadata; | 392 var _downloadOptions = commons.DownloadOptions.Metadata; |
377 var _body = null; | 393 var _body = null; |
378 | 394 |
379 if (sql_1 == null) { | 395 if (sql_1 == null) { |
380 throw new core.ArgumentError("Parameter sql_1 is required."); | 396 throw new core.ArgumentError("Parameter sql_1 is required."); |
381 } | 397 } |
382 _queryParams["sql"] = [sql_1]; | 398 _queryParams["sql"] = [sql_1]; |
383 if (hdrs != null) { | 399 if (hdrs != null) { |
384 _queryParams["hdrs"] = ["${hdrs}"]; | 400 _queryParams["hdrs"] = ["${hdrs}"]; |
385 } | 401 } |
386 if (typed != null) { | 402 if (typed != null) { |
387 _queryParams["typed"] = ["${typed}"]; | 403 _queryParams["typed"] = ["${typed}"]; |
388 } | 404 } |
389 | 405 |
390 _downloadOptions = downloadOptions; | 406 _downloadOptions = downloadOptions; |
391 | 407 |
392 _url = 'query'; | 408 _url = 'query'; |
393 | 409 |
394 var _response = _requester.request(_url, | 410 var _response = _requester.request(_url, |
395 "POST", | 411 "POST", |
396 body: _body, | 412 body: _body, |
397 queryParams: _queryParams, | 413 queryParams: _queryParams, |
398 uploadOptions: _uploadOptions, | 414 uploadOptions: _uploadOptions, |
399 uploadMedia: _uploadMedia, | 415 uploadMedia: _uploadMedia, |
400 downloadOptions: _downloadOptions); | 416 downloadOptions: _downloadOptions); |
401 if (_downloadOptions == null || | 417 if (_downloadOptions == null || |
402 _downloadOptions == common.DownloadOptions.Metadata) { | 418 _downloadOptions == commons.DownloadOptions.Metadata) { |
403 return _response.then((data) => new Sqlresponse.fromJson(data)); | 419 return _response.then((data) => new Sqlresponse.fromJson(data)); |
404 } else { | 420 } else { |
405 return _response; | 421 return _response; |
406 } | 422 } |
407 } | 423 } |
408 | 424 |
409 /** | 425 /** |
410 * Executes an SQL SELECT/SHOW/DESCRIBE statement. | 426 * Executes a SQL statement which can be any of |
| 427 * - SELECT |
| 428 * - SHOW |
| 429 * - DESCRIBE |
411 * | 430 * |
412 * Request parameters: | 431 * Request parameters: |
413 * | 432 * |
414 * [sql_1] - An SQL SELECT/SHOW/DESCRIBE statement. | 433 * [sql_1] - A SQL statement which can be any of |
| 434 * - SELECT |
| 435 * - SHOW |
| 436 * - DESCRIBE |
415 * | 437 * |
416 * [hdrs] - Should column names be included (in the first row)?. Default is | 438 * [hdrs] - Whether column names are included (in the first row). Default is |
417 * true. | 439 * true. |
418 * | 440 * |
419 * [typed] - Should typed values be returned in the (JSON) response -- numbers | 441 * [typed] - Whether typed values are returned in the (JSON) response: numbers |
420 * for numeric values and parsed geometries for KML values? Default is true. | 442 * for numeric values and parsed geometries for KML values. Default is true. |
421 * | 443 * |
422 * [downloadOptions] - Options for downloading. A download can be either a | 444 * [downloadOptions] - Options for downloading. A download can be either a |
423 * Metadata (default) or Media download. Partial Media downloads are possible | 445 * Metadata (default) or Media download. Partial Media downloads are possible |
424 * as well. | 446 * as well. |
425 * | 447 * |
426 * Completes with a | 448 * Completes with a |
427 * | 449 * |
428 * - [Sqlresponse] for Metadata downloads (see [downloadOptions]). | 450 * - [Sqlresponse] for Metadata downloads (see [downloadOptions]). |
429 * | 451 * |
430 * - [common.Media] for Media downloads (see [downloadOptions]). | 452 * - [commons.Media] for Media downloads (see [downloadOptions]). |
431 * | 453 * |
432 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 454 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
433 * error. | 455 * error. |
434 * | 456 * |
435 * If the used [http.Client] completes with an error when making a REST call, | 457 * If the used [http.Client] completes with an error when making a REST call, |
436 * this method will complete with the same error. | 458 * this method will complete with the same error. |
437 */ | 459 */ |
438 async.Future sqlGet(core.String sql_1, {core.bool hdrs, core.bool typed, commo
n.DownloadOptions downloadOptions: common.DownloadOptions.Metadata}) { | 460 async.Future sqlGet(core.String sql_1, {core.bool hdrs, core.bool typed, commo
ns.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
439 var _url = null; | 461 var _url = null; |
440 var _queryParams = new core.Map(); | 462 var _queryParams = new core.Map(); |
441 var _uploadMedia = null; | 463 var _uploadMedia = null; |
442 var _uploadOptions = null; | 464 var _uploadOptions = null; |
443 var _downloadOptions = common.DownloadOptions.Metadata; | 465 var _downloadOptions = commons.DownloadOptions.Metadata; |
444 var _body = null; | 466 var _body = null; |
445 | 467 |
446 if (sql_1 == null) { | 468 if (sql_1 == null) { |
447 throw new core.ArgumentError("Parameter sql_1 is required."); | 469 throw new core.ArgumentError("Parameter sql_1 is required."); |
448 } | 470 } |
449 _queryParams["sql"] = [sql_1]; | 471 _queryParams["sql"] = [sql_1]; |
450 if (hdrs != null) { | 472 if (hdrs != null) { |
451 _queryParams["hdrs"] = ["${hdrs}"]; | 473 _queryParams["hdrs"] = ["${hdrs}"]; |
452 } | 474 } |
453 if (typed != null) { | 475 if (typed != null) { |
454 _queryParams["typed"] = ["${typed}"]; | 476 _queryParams["typed"] = ["${typed}"]; |
455 } | 477 } |
456 | 478 |
457 _downloadOptions = downloadOptions; | 479 _downloadOptions = downloadOptions; |
458 | 480 |
459 _url = 'query'; | 481 _url = 'query'; |
460 | 482 |
461 var _response = _requester.request(_url, | 483 var _response = _requester.request(_url, |
462 "GET", | 484 "GET", |
463 body: _body, | 485 body: _body, |
464 queryParams: _queryParams, | 486 queryParams: _queryParams, |
465 uploadOptions: _uploadOptions, | 487 uploadOptions: _uploadOptions, |
466 uploadMedia: _uploadMedia, | 488 uploadMedia: _uploadMedia, |
467 downloadOptions: _downloadOptions); | 489 downloadOptions: _downloadOptions); |
468 if (_downloadOptions == null || | 490 if (_downloadOptions == null || |
469 _downloadOptions == common.DownloadOptions.Metadata) { | 491 _downloadOptions == commons.DownloadOptions.Metadata) { |
470 return _response.then((data) => new Sqlresponse.fromJson(data)); | 492 return _response.then((data) => new Sqlresponse.fromJson(data)); |
471 } else { | 493 } else { |
472 return _response; | 494 return _response; |
473 } | 495 } |
474 } | 496 } |
475 | 497 |
476 } | 498 } |
477 | 499 |
478 | 500 |
479 /** Not documented yet. */ | |
480 class StyleResourceApi { | 501 class StyleResourceApi { |
481 final common_internal.ApiRequester _requester; | 502 final commons.ApiRequester _requester; |
482 | 503 |
483 StyleResourceApi(common_internal.ApiRequester client) : | 504 StyleResourceApi(commons.ApiRequester client) : |
484 _requester = client; | 505 _requester = client; |
485 | 506 |
486 /** | 507 /** |
487 * Deletes a style. | 508 * Deletes a style. |
488 * | 509 * |
489 * Request parameters: | 510 * Request parameters: |
490 * | 511 * |
491 * [tableId] - Table from which the style is being deleted | 512 * [tableId] - Table from which the style is being deleted |
492 * | 513 * |
493 * [styleId] - Identifier (within a table) for the style being deleted | 514 * [styleId] - Identifier (within a table) for the style being deleted |
494 * | 515 * |
495 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 516 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
496 * error. | 517 * error. |
497 * | 518 * |
498 * If the used [http.Client] completes with an error when making a REST call, | 519 * If the used [http.Client] completes with an error when making a REST call, |
499 * this method will complete with the same error. | 520 * this method will complete with the same error. |
500 */ | 521 */ |
501 async.Future delete(core.String tableId, core.int styleId) { | 522 async.Future delete(core.String tableId, core.int styleId) { |
502 var _url = null; | 523 var _url = null; |
503 var _queryParams = new core.Map(); | 524 var _queryParams = new core.Map(); |
504 var _uploadMedia = null; | 525 var _uploadMedia = null; |
505 var _uploadOptions = null; | 526 var _uploadOptions = null; |
506 var _downloadOptions = common.DownloadOptions.Metadata; | 527 var _downloadOptions = commons.DownloadOptions.Metadata; |
507 var _body = null; | 528 var _body = null; |
508 | 529 |
509 if (tableId == null) { | 530 if (tableId == null) { |
510 throw new core.ArgumentError("Parameter tableId is required."); | 531 throw new core.ArgumentError("Parameter tableId is required."); |
511 } | 532 } |
512 if (styleId == null) { | 533 if (styleId == null) { |
513 throw new core.ArgumentError("Parameter styleId is required."); | 534 throw new core.ArgumentError("Parameter styleId is required."); |
514 } | 535 } |
515 | 536 |
516 _downloadOptions = null; | 537 _downloadOptions = null; |
517 | 538 |
518 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/sty
les/' + common_internal.Escaper.ecapeVariable('$styleId'); | 539 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/styles/' +
commons.Escaper.ecapeVariable('$styleId'); |
519 | 540 |
520 var _response = _requester.request(_url, | 541 var _response = _requester.request(_url, |
521 "DELETE", | 542 "DELETE", |
522 body: _body, | 543 body: _body, |
523 queryParams: _queryParams, | 544 queryParams: _queryParams, |
524 uploadOptions: _uploadOptions, | 545 uploadOptions: _uploadOptions, |
525 uploadMedia: _uploadMedia, | 546 uploadMedia: _uploadMedia, |
526 downloadOptions: _downloadOptions); | 547 downloadOptions: _downloadOptions); |
527 return _response.then((data) => null); | 548 return _response.then((data) => null); |
528 } | 549 } |
529 | 550 |
530 /** | 551 /** |
531 * Gets a specific style. | 552 * Gets a specific style. |
532 * | 553 * |
533 * Request parameters: | 554 * Request parameters: |
534 * | 555 * |
535 * [tableId] - Table to which the requested style belongs | 556 * [tableId] - Table to which the requested style belongs |
536 * | 557 * |
537 * [styleId] - Identifier (integer) for a specific style in a table | 558 * [styleId] - Identifier (integer) for a specific style in a table |
538 * | 559 * |
539 * Completes with a [StyleSetting]. | 560 * Completes with a [StyleSetting]. |
540 * | 561 * |
541 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 562 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
542 * error. | 563 * error. |
543 * | 564 * |
544 * If the used [http.Client] completes with an error when making a REST call, | 565 * If the used [http.Client] completes with an error when making a REST call, |
545 * this method will complete with the same error. | 566 * this method will complete with the same error. |
546 */ | 567 */ |
547 async.Future<StyleSetting> get(core.String tableId, core.int styleId) { | 568 async.Future<StyleSetting> get(core.String tableId, core.int styleId) { |
548 var _url = null; | 569 var _url = null; |
549 var _queryParams = new core.Map(); | 570 var _queryParams = new core.Map(); |
550 var _uploadMedia = null; | 571 var _uploadMedia = null; |
551 var _uploadOptions = null; | 572 var _uploadOptions = null; |
552 var _downloadOptions = common.DownloadOptions.Metadata; | 573 var _downloadOptions = commons.DownloadOptions.Metadata; |
553 var _body = null; | 574 var _body = null; |
554 | 575 |
555 if (tableId == null) { | 576 if (tableId == null) { |
556 throw new core.ArgumentError("Parameter tableId is required."); | 577 throw new core.ArgumentError("Parameter tableId is required."); |
557 } | 578 } |
558 if (styleId == null) { | 579 if (styleId == null) { |
559 throw new core.ArgumentError("Parameter styleId is required."); | 580 throw new core.ArgumentError("Parameter styleId is required."); |
560 } | 581 } |
561 | 582 |
562 | 583 |
563 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/sty
les/' + common_internal.Escaper.ecapeVariable('$styleId'); | 584 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/styles/' +
commons.Escaper.ecapeVariable('$styleId'); |
564 | 585 |
565 var _response = _requester.request(_url, | 586 var _response = _requester.request(_url, |
566 "GET", | 587 "GET", |
567 body: _body, | 588 body: _body, |
568 queryParams: _queryParams, | 589 queryParams: _queryParams, |
569 uploadOptions: _uploadOptions, | 590 uploadOptions: _uploadOptions, |
570 uploadMedia: _uploadMedia, | 591 uploadMedia: _uploadMedia, |
571 downloadOptions: _downloadOptions); | 592 downloadOptions: _downloadOptions); |
572 return _response.then((data) => new StyleSetting.fromJson(data)); | 593 return _response.then((data) => new StyleSetting.fromJson(data)); |
573 } | 594 } |
574 | 595 |
575 /** | 596 /** |
576 * Adds a new style for the table. | 597 * Adds a new style for the table. |
577 * | 598 * |
578 * [request] - The metadata request object. | 599 * [request] - The metadata request object. |
579 * | 600 * |
580 * Request parameters: | 601 * Request parameters: |
581 * | 602 * |
582 * [tableId] - Table for which a new style is being added | 603 * [tableId] - Table for which a new style is being added |
583 * | 604 * |
584 * Completes with a [StyleSetting]. | 605 * Completes with a [StyleSetting]. |
585 * | 606 * |
586 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 607 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
587 * error. | 608 * error. |
588 * | 609 * |
589 * If the used [http.Client] completes with an error when making a REST call, | 610 * If the used [http.Client] completes with an error when making a REST call, |
590 * this method will complete with the same error. | 611 * this method will complete with the same error. |
591 */ | 612 */ |
592 async.Future<StyleSetting> insert(StyleSetting request, core.String tableId) { | 613 async.Future<StyleSetting> insert(StyleSetting request, core.String tableId) { |
593 var _url = null; | 614 var _url = null; |
594 var _queryParams = new core.Map(); | 615 var _queryParams = new core.Map(); |
595 var _uploadMedia = null; | 616 var _uploadMedia = null; |
596 var _uploadOptions = null; | 617 var _uploadOptions = null; |
597 var _downloadOptions = common.DownloadOptions.Metadata; | 618 var _downloadOptions = commons.DownloadOptions.Metadata; |
598 var _body = null; | 619 var _body = null; |
599 | 620 |
600 if (request != null) { | 621 if (request != null) { |
601 _body = convert.JSON.encode((request).toJson()); | 622 _body = convert.JSON.encode((request).toJson()); |
602 } | 623 } |
603 if (tableId == null) { | 624 if (tableId == null) { |
604 throw new core.ArgumentError("Parameter tableId is required."); | 625 throw new core.ArgumentError("Parameter tableId is required."); |
605 } | 626 } |
606 | 627 |
607 | 628 |
608 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/sty
les'; | 629 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/styles'; |
609 | 630 |
610 var _response = _requester.request(_url, | 631 var _response = _requester.request(_url, |
611 "POST", | 632 "POST", |
612 body: _body, | 633 body: _body, |
613 queryParams: _queryParams, | 634 queryParams: _queryParams, |
614 uploadOptions: _uploadOptions, | 635 uploadOptions: _uploadOptions, |
615 uploadMedia: _uploadMedia, | 636 uploadMedia: _uploadMedia, |
616 downloadOptions: _downloadOptions); | 637 downloadOptions: _downloadOptions); |
617 return _response.then((data) => new StyleSetting.fromJson(data)); | 638 return _response.then((data) => new StyleSetting.fromJson(data)); |
618 } | 639 } |
619 | 640 |
620 /** | 641 /** |
621 * Retrieves a list of styles. | 642 * Retrieves a list of styles. |
622 * | 643 * |
623 * Request parameters: | 644 * Request parameters: |
624 * | 645 * |
625 * [tableId] - Table whose styles are being listed | 646 * [tableId] - Table whose styles are being listed |
626 * | 647 * |
627 * [maxResults] - Maximum number of styles to return. Optional. Default is 5. | 648 * [maxResults] - Maximum number of styles to return. Optional. Default is 5. |
628 * | 649 * |
629 * [pageToken] - Continuation token specifying which result page to return. | 650 * [pageToken] - Continuation token specifying which result page to return. |
630 * Optional. | 651 * Optional. |
631 * | 652 * |
632 * Completes with a [StyleSettingList]. | 653 * Completes with a [StyleSettingList]. |
633 * | 654 * |
634 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 655 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
635 * error. | 656 * error. |
636 * | 657 * |
637 * If the used [http.Client] completes with an error when making a REST call, | 658 * If the used [http.Client] completes with an error when making a REST call, |
638 * this method will complete with the same error. | 659 * this method will complete with the same error. |
639 */ | 660 */ |
640 async.Future<StyleSettingList> list(core.String tableId, {core.int maxResults,
core.String pageToken}) { | 661 async.Future<StyleSettingList> list(core.String tableId, {core.int maxResults,
core.String pageToken}) { |
641 var _url = null; | 662 var _url = null; |
642 var _queryParams = new core.Map(); | 663 var _queryParams = new core.Map(); |
643 var _uploadMedia = null; | 664 var _uploadMedia = null; |
644 var _uploadOptions = null; | 665 var _uploadOptions = null; |
645 var _downloadOptions = common.DownloadOptions.Metadata; | 666 var _downloadOptions = commons.DownloadOptions.Metadata; |
646 var _body = null; | 667 var _body = null; |
647 | 668 |
648 if (tableId == null) { | 669 if (tableId == null) { |
649 throw new core.ArgumentError("Parameter tableId is required."); | 670 throw new core.ArgumentError("Parameter tableId is required."); |
650 } | 671 } |
651 if (maxResults != null) { | 672 if (maxResults != null) { |
652 _queryParams["maxResults"] = ["${maxResults}"]; | 673 _queryParams["maxResults"] = ["${maxResults}"]; |
653 } | 674 } |
654 if (pageToken != null) { | 675 if (pageToken != null) { |
655 _queryParams["pageToken"] = [pageToken]; | 676 _queryParams["pageToken"] = [pageToken]; |
656 } | 677 } |
657 | 678 |
658 | 679 |
659 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/sty
les'; | 680 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/styles'; |
660 | 681 |
661 var _response = _requester.request(_url, | 682 var _response = _requester.request(_url, |
662 "GET", | 683 "GET", |
663 body: _body, | 684 body: _body, |
664 queryParams: _queryParams, | 685 queryParams: _queryParams, |
665 uploadOptions: _uploadOptions, | 686 uploadOptions: _uploadOptions, |
666 uploadMedia: _uploadMedia, | 687 uploadMedia: _uploadMedia, |
667 downloadOptions: _downloadOptions); | 688 downloadOptions: _downloadOptions); |
668 return _response.then((data) => new StyleSettingList.fromJson(data)); | 689 return _response.then((data) => new StyleSettingList.fromJson(data)); |
669 } | 690 } |
670 | 691 |
671 /** | 692 /** |
672 * Updates an existing style. This method supports patch semantics. | 693 * Updates an existing style. This method supports patch semantics. |
673 * | 694 * |
674 * [request] - The metadata request object. | 695 * [request] - The metadata request object. |
675 * | 696 * |
676 * Request parameters: | 697 * Request parameters: |
677 * | 698 * |
678 * [tableId] - Table whose style is being updated. | 699 * [tableId] - Table whose style is being updated. |
679 * | 700 * |
680 * [styleId] - Identifier (within a table) for the style being updated. | 701 * [styleId] - Identifier (within a table) for the style being updated. |
681 * | 702 * |
682 * Completes with a [StyleSetting]. | 703 * Completes with a [StyleSetting]. |
683 * | 704 * |
684 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 705 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
685 * error. | 706 * error. |
686 * | 707 * |
687 * If the used [http.Client] completes with an error when making a REST call, | 708 * If the used [http.Client] completes with an error when making a REST call, |
688 * this method will complete with the same error. | 709 * this method will complete with the same error. |
689 */ | 710 */ |
690 async.Future<StyleSetting> patch(StyleSetting request, core.String tableId, co
re.int styleId) { | 711 async.Future<StyleSetting> patch(StyleSetting request, core.String tableId, co
re.int styleId) { |
691 var _url = null; | 712 var _url = null; |
692 var _queryParams = new core.Map(); | 713 var _queryParams = new core.Map(); |
693 var _uploadMedia = null; | 714 var _uploadMedia = null; |
694 var _uploadOptions = null; | 715 var _uploadOptions = null; |
695 var _downloadOptions = common.DownloadOptions.Metadata; | 716 var _downloadOptions = commons.DownloadOptions.Metadata; |
696 var _body = null; | 717 var _body = null; |
697 | 718 |
698 if (request != null) { | 719 if (request != null) { |
699 _body = convert.JSON.encode((request).toJson()); | 720 _body = convert.JSON.encode((request).toJson()); |
700 } | 721 } |
701 if (tableId == null) { | 722 if (tableId == null) { |
702 throw new core.ArgumentError("Parameter tableId is required."); | 723 throw new core.ArgumentError("Parameter tableId is required."); |
703 } | 724 } |
704 if (styleId == null) { | 725 if (styleId == null) { |
705 throw new core.ArgumentError("Parameter styleId is required."); | 726 throw new core.ArgumentError("Parameter styleId is required."); |
706 } | 727 } |
707 | 728 |
708 | 729 |
709 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/sty
les/' + common_internal.Escaper.ecapeVariable('$styleId'); | 730 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/styles/' +
commons.Escaper.ecapeVariable('$styleId'); |
710 | 731 |
711 var _response = _requester.request(_url, | 732 var _response = _requester.request(_url, |
712 "PATCH", | 733 "PATCH", |
713 body: _body, | 734 body: _body, |
714 queryParams: _queryParams, | 735 queryParams: _queryParams, |
715 uploadOptions: _uploadOptions, | 736 uploadOptions: _uploadOptions, |
716 uploadMedia: _uploadMedia, | 737 uploadMedia: _uploadMedia, |
717 downloadOptions: _downloadOptions); | 738 downloadOptions: _downloadOptions); |
718 return _response.then((data) => new StyleSetting.fromJson(data)); | 739 return _response.then((data) => new StyleSetting.fromJson(data)); |
719 } | 740 } |
720 | 741 |
721 /** | 742 /** |
722 * Updates an existing style. | 743 * Updates an existing style. |
723 * | 744 * |
724 * [request] - The metadata request object. | 745 * [request] - The metadata request object. |
725 * | 746 * |
726 * Request parameters: | 747 * Request parameters: |
727 * | 748 * |
728 * [tableId] - Table whose style is being updated. | 749 * [tableId] - Table whose style is being updated. |
729 * | 750 * |
730 * [styleId] - Identifier (within a table) for the style being updated. | 751 * [styleId] - Identifier (within a table) for the style being updated. |
731 * | 752 * |
732 * Completes with a [StyleSetting]. | 753 * Completes with a [StyleSetting]. |
733 * | 754 * |
734 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 755 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
735 * error. | 756 * error. |
736 * | 757 * |
737 * If the used [http.Client] completes with an error when making a REST call, | 758 * If the used [http.Client] completes with an error when making a REST call, |
738 * this method will complete with the same error. | 759 * this method will complete with the same error. |
739 */ | 760 */ |
740 async.Future<StyleSetting> update(StyleSetting request, core.String tableId, c
ore.int styleId) { | 761 async.Future<StyleSetting> update(StyleSetting request, core.String tableId, c
ore.int styleId) { |
741 var _url = null; | 762 var _url = null; |
742 var _queryParams = new core.Map(); | 763 var _queryParams = new core.Map(); |
743 var _uploadMedia = null; | 764 var _uploadMedia = null; |
744 var _uploadOptions = null; | 765 var _uploadOptions = null; |
745 var _downloadOptions = common.DownloadOptions.Metadata; | 766 var _downloadOptions = commons.DownloadOptions.Metadata; |
746 var _body = null; | 767 var _body = null; |
747 | 768 |
748 if (request != null) { | 769 if (request != null) { |
749 _body = convert.JSON.encode((request).toJson()); | 770 _body = convert.JSON.encode((request).toJson()); |
750 } | 771 } |
751 if (tableId == null) { | 772 if (tableId == null) { |
752 throw new core.ArgumentError("Parameter tableId is required."); | 773 throw new core.ArgumentError("Parameter tableId is required."); |
753 } | 774 } |
754 if (styleId == null) { | 775 if (styleId == null) { |
755 throw new core.ArgumentError("Parameter styleId is required."); | 776 throw new core.ArgumentError("Parameter styleId is required."); |
756 } | 777 } |
757 | 778 |
758 | 779 |
759 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/sty
les/' + common_internal.Escaper.ecapeVariable('$styleId'); | 780 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/styles/' +
commons.Escaper.ecapeVariable('$styleId'); |
760 | 781 |
761 var _response = _requester.request(_url, | 782 var _response = _requester.request(_url, |
762 "PUT", | 783 "PUT", |
763 body: _body, | 784 body: _body, |
764 queryParams: _queryParams, | 785 queryParams: _queryParams, |
765 uploadOptions: _uploadOptions, | 786 uploadOptions: _uploadOptions, |
766 uploadMedia: _uploadMedia, | 787 uploadMedia: _uploadMedia, |
767 downloadOptions: _downloadOptions); | 788 downloadOptions: _downloadOptions); |
768 return _response.then((data) => new StyleSetting.fromJson(data)); | 789 return _response.then((data) => new StyleSetting.fromJson(data)); |
769 } | 790 } |
770 | 791 |
771 } | 792 } |
772 | 793 |
773 | 794 |
774 /** Not documented yet. */ | |
775 class TableResourceApi { | 795 class TableResourceApi { |
776 final common_internal.ApiRequester _requester; | 796 final commons.ApiRequester _requester; |
777 | 797 |
778 TableResourceApi(common_internal.ApiRequester client) : | 798 TableResourceApi(commons.ApiRequester client) : |
779 _requester = client; | 799 _requester = client; |
780 | 800 |
781 /** | 801 /** |
782 * Copies a table. | 802 * Copies a table. |
783 * | 803 * |
784 * Request parameters: | 804 * Request parameters: |
785 * | 805 * |
786 * [tableId] - ID of the table that is being copied. | 806 * [tableId] - ID of the table that is being copied. |
787 * | 807 * |
788 * [copyPresentation] - Whether to also copy tabs, styles, and templates. | 808 * [copyPresentation] - Whether to also copy tabs, styles, and templates. |
789 * Default is false. | 809 * Default is false. |
790 * | 810 * |
791 * Completes with a [Table]. | 811 * Completes with a [Table]. |
792 * | 812 * |
793 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 813 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
794 * error. | 814 * error. |
795 * | 815 * |
796 * If the used [http.Client] completes with an error when making a REST call, | 816 * If the used [http.Client] completes with an error when making a REST call, |
797 * this method will complete with the same error. | 817 * this method will complete with the same error. |
798 */ | 818 */ |
799 async.Future<Table> copy(core.String tableId, {core.bool copyPresentation}) { | 819 async.Future<Table> copy(core.String tableId, {core.bool copyPresentation}) { |
800 var _url = null; | 820 var _url = null; |
801 var _queryParams = new core.Map(); | 821 var _queryParams = new core.Map(); |
802 var _uploadMedia = null; | 822 var _uploadMedia = null; |
803 var _uploadOptions = null; | 823 var _uploadOptions = null; |
804 var _downloadOptions = common.DownloadOptions.Metadata; | 824 var _downloadOptions = commons.DownloadOptions.Metadata; |
805 var _body = null; | 825 var _body = null; |
806 | 826 |
807 if (tableId == null) { | 827 if (tableId == null) { |
808 throw new core.ArgumentError("Parameter tableId is required."); | 828 throw new core.ArgumentError("Parameter tableId is required."); |
809 } | 829 } |
810 if (copyPresentation != null) { | 830 if (copyPresentation != null) { |
811 _queryParams["copyPresentation"] = ["${copyPresentation}"]; | 831 _queryParams["copyPresentation"] = ["${copyPresentation}"]; |
812 } | 832 } |
813 | 833 |
814 | 834 |
815 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/cop
y'; | 835 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/copy'; |
816 | 836 |
817 var _response = _requester.request(_url, | 837 var _response = _requester.request(_url, |
818 "POST", | 838 "POST", |
819 body: _body, | 839 body: _body, |
820 queryParams: _queryParams, | 840 queryParams: _queryParams, |
821 uploadOptions: _uploadOptions, | 841 uploadOptions: _uploadOptions, |
822 uploadMedia: _uploadMedia, | 842 uploadMedia: _uploadMedia, |
823 downloadOptions: _downloadOptions); | 843 downloadOptions: _downloadOptions); |
824 return _response.then((data) => new Table.fromJson(data)); | 844 return _response.then((data) => new Table.fromJson(data)); |
825 } | 845 } |
826 | 846 |
827 /** | 847 /** |
828 * Deletes a table. | 848 * Deletes a table. |
829 * | 849 * |
830 * Request parameters: | 850 * Request parameters: |
831 * | 851 * |
832 * [tableId] - ID of the table that is being deleted. | 852 * [tableId] - ID of the table to be deleted. |
833 * | 853 * |
834 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 854 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
835 * error. | 855 * error. |
836 * | 856 * |
837 * If the used [http.Client] completes with an error when making a REST call, | 857 * If the used [http.Client] completes with an error when making a REST call, |
838 * this method will complete with the same error. | 858 * this method will complete with the same error. |
839 */ | 859 */ |
840 async.Future delete(core.String tableId) { | 860 async.Future delete(core.String tableId) { |
841 var _url = null; | 861 var _url = null; |
842 var _queryParams = new core.Map(); | 862 var _queryParams = new core.Map(); |
843 var _uploadMedia = null; | 863 var _uploadMedia = null; |
844 var _uploadOptions = null; | 864 var _uploadOptions = null; |
845 var _downloadOptions = common.DownloadOptions.Metadata; | 865 var _downloadOptions = commons.DownloadOptions.Metadata; |
846 var _body = null; | 866 var _body = null; |
847 | 867 |
848 if (tableId == null) { | 868 if (tableId == null) { |
849 throw new core.ArgumentError("Parameter tableId is required."); | 869 throw new core.ArgumentError("Parameter tableId is required."); |
850 } | 870 } |
851 | 871 |
852 _downloadOptions = null; | 872 _downloadOptions = null; |
853 | 873 |
854 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId'); | 874 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId'); |
855 | 875 |
856 var _response = _requester.request(_url, | 876 var _response = _requester.request(_url, |
857 "DELETE", | 877 "DELETE", |
858 body: _body, | 878 body: _body, |
859 queryParams: _queryParams, | 879 queryParams: _queryParams, |
860 uploadOptions: _uploadOptions, | 880 uploadOptions: _uploadOptions, |
861 uploadMedia: _uploadMedia, | 881 uploadMedia: _uploadMedia, |
862 downloadOptions: _downloadOptions); | 882 downloadOptions: _downloadOptions); |
863 return _response.then((data) => null); | 883 return _response.then((data) => null); |
864 } | 884 } |
865 | 885 |
866 /** | 886 /** |
867 * Retrieves a specific table by its id. | 887 * Retrieves a specific table by its ID. |
868 * | 888 * |
869 * Request parameters: | 889 * Request parameters: |
870 * | 890 * |
871 * [tableId] - Identifier(ID) for the table being requested. | 891 * [tableId] - Identifier for the table being requested. |
872 * | 892 * |
873 * Completes with a [Table]. | 893 * Completes with a [Table]. |
874 * | 894 * |
875 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 895 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
876 * error. | 896 * error. |
877 * | 897 * |
878 * If the used [http.Client] completes with an error when making a REST call, | 898 * If the used [http.Client] completes with an error when making a REST call, |
879 * this method will complete with the same error. | 899 * this method will complete with the same error. |
880 */ | 900 */ |
881 async.Future<Table> get(core.String tableId) { | 901 async.Future<Table> get(core.String tableId) { |
882 var _url = null; | 902 var _url = null; |
883 var _queryParams = new core.Map(); | 903 var _queryParams = new core.Map(); |
884 var _uploadMedia = null; | 904 var _uploadMedia = null; |
885 var _uploadOptions = null; | 905 var _uploadOptions = null; |
886 var _downloadOptions = common.DownloadOptions.Metadata; | 906 var _downloadOptions = commons.DownloadOptions.Metadata; |
887 var _body = null; | 907 var _body = null; |
888 | 908 |
889 if (tableId == null) { | 909 if (tableId == null) { |
890 throw new core.ArgumentError("Parameter tableId is required."); | 910 throw new core.ArgumentError("Parameter tableId is required."); |
891 } | 911 } |
892 | 912 |
893 | 913 |
894 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId'); | 914 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId'); |
895 | 915 |
896 var _response = _requester.request(_url, | 916 var _response = _requester.request(_url, |
897 "GET", | 917 "GET", |
898 body: _body, | 918 body: _body, |
899 queryParams: _queryParams, | 919 queryParams: _queryParams, |
900 uploadOptions: _uploadOptions, | 920 uploadOptions: _uploadOptions, |
901 uploadMedia: _uploadMedia, | 921 uploadMedia: _uploadMedia, |
902 downloadOptions: _downloadOptions); | 922 downloadOptions: _downloadOptions); |
903 return _response.then((data) => new Table.fromJson(data)); | 923 return _response.then((data) => new Table.fromJson(data)); |
904 } | 924 } |
905 | 925 |
906 /** | 926 /** |
907 * Import more rows into a table. | 927 * Imports more rows into a table. |
908 * | 928 * |
909 * Request parameters: | 929 * Request parameters: |
910 * | 930 * |
911 * [tableId] - The table into which new rows are being imported. | 931 * [tableId] - The table into which new rows are being imported. |
912 * | 932 * |
913 * [delimiter] - The delimiter used to separate cell values. This can only | 933 * [delimiter] - The delimiter used to separate cell values. This can only |
914 * consist of a single character. Default is ','. | 934 * consist of a single character. Default is ,. |
915 * | 935 * |
916 * [encoding] - The encoding of the content. Default is UTF-8. Use | 936 * [encoding] - The encoding of the content. Default is UTF-8. Use auto-detect |
917 * 'auto-detect' if you are unsure of the encoding. | 937 * if you are unsure of the encoding. |
918 * | 938 * |
919 * [endLine] - The index of the last line from which to start importing, | 939 * [endLine] - The index of the line up to which data will be imported. |
920 * exclusive. Thus, the number of imported lines is endLine - startLine. If | 940 * Default is to import the entire file. If endLine is negative, it is an |
921 * this parameter is not provided, the file will be imported until the last | 941 * offset from the end of the file; the imported content will exclude the last |
922 * line of the file. If endLine is negative, then the imported content will | 942 * endLine lines. |
923 * exclude the last endLine lines. That is, if endline is negative, no line | |
924 * will be imported whose index is greater than N + endLine where N is the | |
925 * number of lines in the file, and the number of imported lines will be N + | |
926 * endLine - startLine. | |
927 * | 943 * |
928 * [isStrict] - Whether the CSV must have the same number of values for each | 944 * [isStrict] - Whether the imported CSV must have the same number of values |
929 * row. If false, rows with fewer values will be padded with empty values. | 945 * for each row. If false, rows with fewer values will be padded with empty |
930 * Default is true. | 946 * values. Default is true. |
931 * | 947 * |
932 * [startLine] - The index of the first line from which to start importing, | 948 * [startLine] - The index of the first line from which to start importing, |
933 * inclusive. Default is 0. | 949 * inclusive. Default is 0. |
934 * | 950 * |
935 * [uploadMedia] - The media to upload. | 951 * [uploadMedia] - The media to upload. |
936 * | 952 * |
937 * [uploadOptions] - Options for the media upload. Streaming Media without the | 953 * [uploadOptions] - Options for the media upload. Streaming Media without the |
938 * length being known ahead of time is only supported via resumable uploads. | 954 * length being known ahead of time is only supported via resumable uploads. |
939 * | 955 * |
940 * Completes with a [Import]. | 956 * Completes with a [Import]. |
941 * | 957 * |
942 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 958 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
943 * error. | 959 * error. |
944 * | 960 * |
945 * If the used [http.Client] completes with an error when making a REST call, | 961 * If the used [http.Client] completes with an error when making a REST call, |
946 * this method will complete with the same error. | 962 * this method will complete with the same error. |
947 */ | 963 */ |
948 async.Future<Import> importRows(core.String tableId, {core.String delimiter, c
ore.String encoding, core.int endLine, core.bool isStrict, core.int startLine, c
ommon.UploadOptions uploadOptions : common.UploadOptions.Default, common.Media u
ploadMedia}) { | 964 async.Future<Import> importRows(core.String tableId, {core.String delimiter, c
ore.String encoding, core.int endLine, core.bool isStrict, core.int startLine, c
ommons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Medi
a uploadMedia}) { |
949 var _url = null; | 965 var _url = null; |
950 var _queryParams = new core.Map(); | 966 var _queryParams = new core.Map(); |
951 var _uploadMedia = null; | 967 var _uploadMedia = null; |
952 var _uploadOptions = null; | 968 var _uploadOptions = null; |
953 var _downloadOptions = common.DownloadOptions.Metadata; | 969 var _downloadOptions = commons.DownloadOptions.Metadata; |
954 var _body = null; | 970 var _body = null; |
955 | 971 |
956 if (tableId == null) { | 972 if (tableId == null) { |
957 throw new core.ArgumentError("Parameter tableId is required."); | 973 throw new core.ArgumentError("Parameter tableId is required."); |
958 } | 974 } |
959 if (delimiter != null) { | 975 if (delimiter != null) { |
960 _queryParams["delimiter"] = [delimiter]; | 976 _queryParams["delimiter"] = [delimiter]; |
961 } | 977 } |
962 if (encoding != null) { | 978 if (encoding != null) { |
963 _queryParams["encoding"] = [encoding]; | 979 _queryParams["encoding"] = [encoding]; |
964 } | 980 } |
965 if (endLine != null) { | 981 if (endLine != null) { |
966 _queryParams["endLine"] = ["${endLine}"]; | 982 _queryParams["endLine"] = ["${endLine}"]; |
967 } | 983 } |
968 if (isStrict != null) { | 984 if (isStrict != null) { |
969 _queryParams["isStrict"] = ["${isStrict}"]; | 985 _queryParams["isStrict"] = ["${isStrict}"]; |
970 } | 986 } |
971 if (startLine != null) { | 987 if (startLine != null) { |
972 _queryParams["startLine"] = ["${startLine}"]; | 988 _queryParams["startLine"] = ["${startLine}"]; |
973 } | 989 } |
974 | 990 |
975 _uploadMedia = uploadMedia; | 991 _uploadMedia = uploadMedia; |
976 _uploadOptions = uploadOptions; | 992 _uploadOptions = uploadOptions; |
977 | 993 |
978 if (_uploadMedia == null) { | 994 if (_uploadMedia == null) { |
979 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/i
mport'; | 995 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/import'; |
980 } else if (_uploadOptions is common.ResumableUploadOptions) { | 996 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
981 _url = '/resumable/upload/fusiontables/v2/tables/' + common_internal.Escap
er.ecapeVariable('$tableId') + '/import'; | 997 _url = '/resumable/upload/fusiontables/v2/tables/' + commons.Escaper.ecape
Variable('$tableId') + '/import'; |
982 } else { | 998 } else { |
983 _url = '/upload/fusiontables/v2/tables/' + common_internal.Escaper.ecapeVa
riable('$tableId') + '/import'; | 999 _url = '/upload/fusiontables/v2/tables/' + commons.Escaper.ecapeVariable('
$tableId') + '/import'; |
984 } | 1000 } |
985 | 1001 |
986 | 1002 |
987 var _response = _requester.request(_url, | 1003 var _response = _requester.request(_url, |
988 "POST", | 1004 "POST", |
989 body: _body, | 1005 body: _body, |
990 queryParams: _queryParams, | 1006 queryParams: _queryParams, |
991 uploadOptions: _uploadOptions, | 1007 uploadOptions: _uploadOptions, |
992 uploadMedia: _uploadMedia, | 1008 uploadMedia: _uploadMedia, |
993 downloadOptions: _downloadOptions); | 1009 downloadOptions: _downloadOptions); |
994 return _response.then((data) => new Import.fromJson(data)); | 1010 return _response.then((data) => new Import.fromJson(data)); |
995 } | 1011 } |
996 | 1012 |
997 /** | 1013 /** |
998 * Import a new table. | 1014 * Imports a new table. |
999 * | 1015 * |
1000 * Request parameters: | 1016 * Request parameters: |
1001 * | 1017 * |
1002 * [name] - The name to be assigned to the new table. | 1018 * [name] - The name to be assigned to the new table. |
1003 * | 1019 * |
1004 * [delimiter] - The delimiter used to separate cell values. This can only | 1020 * [delimiter] - The delimiter used to separate cell values. This can only |
1005 * consist of a single character. Default is ','. | 1021 * consist of a single character. Default is ,. |
1006 * | 1022 * |
1007 * [encoding] - The encoding of the content. Default is UTF-8. Use | 1023 * [encoding] - The encoding of the content. Default is UTF-8. Use auto-detect |
1008 * 'auto-detect' if you are unsure of the encoding. | 1024 * if you are unsure of the encoding. |
1009 * | 1025 * |
1010 * [uploadMedia] - The media to upload. | 1026 * [uploadMedia] - The media to upload. |
1011 * | 1027 * |
1012 * [uploadOptions] - Options for the media upload. Streaming Media without the | 1028 * [uploadOptions] - Options for the media upload. Streaming Media without the |
1013 * length being known ahead of time is only supported via resumable uploads. | 1029 * length being known ahead of time is only supported via resumable uploads. |
1014 * | 1030 * |
1015 * Completes with a [Table]. | 1031 * Completes with a [Table]. |
1016 * | 1032 * |
1017 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1033 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1018 * error. | 1034 * error. |
1019 * | 1035 * |
1020 * If the used [http.Client] completes with an error when making a REST call, | 1036 * If the used [http.Client] completes with an error when making a REST call, |
1021 * this method will complete with the same error. | 1037 * this method will complete with the same error. |
1022 */ | 1038 */ |
1023 async.Future<Table> importTable(core.String name, {core.String delimiter, core
.String encoding, common.UploadOptions uploadOptions : common.UploadOptions.Defa
ult, common.Media uploadMedia}) { | 1039 async.Future<Table> importTable(core.String name, {core.String delimiter, core
.String encoding, commons.UploadOptions uploadOptions : commons.UploadOptions.De
fault, commons.Media uploadMedia}) { |
1024 var _url = null; | 1040 var _url = null; |
1025 var _queryParams = new core.Map(); | 1041 var _queryParams = new core.Map(); |
1026 var _uploadMedia = null; | 1042 var _uploadMedia = null; |
1027 var _uploadOptions = null; | 1043 var _uploadOptions = null; |
1028 var _downloadOptions = common.DownloadOptions.Metadata; | 1044 var _downloadOptions = commons.DownloadOptions.Metadata; |
1029 var _body = null; | 1045 var _body = null; |
1030 | 1046 |
1031 if (name == null) { | 1047 if (name == null) { |
1032 throw new core.ArgumentError("Parameter name is required."); | 1048 throw new core.ArgumentError("Parameter name is required."); |
1033 } | 1049 } |
1034 _queryParams["name"] = [name]; | 1050 _queryParams["name"] = [name]; |
1035 if (delimiter != null) { | 1051 if (delimiter != null) { |
1036 _queryParams["delimiter"] = [delimiter]; | 1052 _queryParams["delimiter"] = [delimiter]; |
1037 } | 1053 } |
1038 if (encoding != null) { | 1054 if (encoding != null) { |
1039 _queryParams["encoding"] = [encoding]; | 1055 _queryParams["encoding"] = [encoding]; |
1040 } | 1056 } |
1041 | 1057 |
1042 _uploadMedia = uploadMedia; | 1058 _uploadMedia = uploadMedia; |
1043 _uploadOptions = uploadOptions; | 1059 _uploadOptions = uploadOptions; |
1044 | 1060 |
1045 if (_uploadMedia == null) { | 1061 if (_uploadMedia == null) { |
1046 _url = 'tables/import'; | 1062 _url = 'tables/import'; |
1047 } else if (_uploadOptions is common.ResumableUploadOptions) { | 1063 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
1048 _url = '/resumable/upload/fusiontables/v2/tables/import'; | 1064 _url = '/resumable/upload/fusiontables/v2/tables/import'; |
1049 } else { | 1065 } else { |
1050 _url = '/upload/fusiontables/v2/tables/import'; | 1066 _url = '/upload/fusiontables/v2/tables/import'; |
1051 } | 1067 } |
1052 | 1068 |
1053 | 1069 |
1054 var _response = _requester.request(_url, | 1070 var _response = _requester.request(_url, |
1055 "POST", | 1071 "POST", |
1056 body: _body, | 1072 body: _body, |
1057 queryParams: _queryParams, | 1073 queryParams: _queryParams, |
1058 uploadOptions: _uploadOptions, | 1074 uploadOptions: _uploadOptions, |
1059 uploadMedia: _uploadMedia, | 1075 uploadMedia: _uploadMedia, |
1060 downloadOptions: _downloadOptions); | 1076 downloadOptions: _downloadOptions); |
1061 return _response.then((data) => new Table.fromJson(data)); | 1077 return _response.then((data) => new Table.fromJson(data)); |
1062 } | 1078 } |
1063 | 1079 |
1064 /** | 1080 /** |
1065 * Creates a new table. | 1081 * Creates a new table. |
1066 * | 1082 * |
1067 * [request] - The metadata request object. | 1083 * [request] - The metadata request object. |
1068 * | 1084 * |
1069 * Request parameters: | 1085 * Request parameters: |
1070 * | 1086 * |
1071 * Completes with a [Table]. | 1087 * Completes with a [Table]. |
1072 * | 1088 * |
1073 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1089 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1074 * error. | 1090 * error. |
1075 * | 1091 * |
1076 * If the used [http.Client] completes with an error when making a REST call, | 1092 * If the used [http.Client] completes with an error when making a REST call, |
1077 * this method will complete with the same error. | 1093 * this method will complete with the same error. |
1078 */ | 1094 */ |
1079 async.Future<Table> insert(Table request) { | 1095 async.Future<Table> insert(Table request) { |
1080 var _url = null; | 1096 var _url = null; |
1081 var _queryParams = new core.Map(); | 1097 var _queryParams = new core.Map(); |
1082 var _uploadMedia = null; | 1098 var _uploadMedia = null; |
1083 var _uploadOptions = null; | 1099 var _uploadOptions = null; |
1084 var _downloadOptions = common.DownloadOptions.Metadata; | 1100 var _downloadOptions = commons.DownloadOptions.Metadata; |
1085 var _body = null; | 1101 var _body = null; |
1086 | 1102 |
1087 if (request != null) { | 1103 if (request != null) { |
1088 _body = convert.JSON.encode((request).toJson()); | 1104 _body = convert.JSON.encode((request).toJson()); |
1089 } | 1105 } |
1090 | 1106 |
1091 | 1107 |
1092 _url = 'tables'; | 1108 _url = 'tables'; |
1093 | 1109 |
1094 var _response = _requester.request(_url, | 1110 var _response = _requester.request(_url, |
1095 "POST", | 1111 "POST", |
1096 body: _body, | 1112 body: _body, |
1097 queryParams: _queryParams, | 1113 queryParams: _queryParams, |
1098 uploadOptions: _uploadOptions, | 1114 uploadOptions: _uploadOptions, |
1099 uploadMedia: _uploadMedia, | 1115 uploadMedia: _uploadMedia, |
1100 downloadOptions: _downloadOptions); | 1116 downloadOptions: _downloadOptions); |
1101 return _response.then((data) => new Table.fromJson(data)); | 1117 return _response.then((data) => new Table.fromJson(data)); |
1102 } | 1118 } |
1103 | 1119 |
1104 /** | 1120 /** |
1105 * Retrieves a list of tables a user owns. | 1121 * Retrieves a list of tables a user owns. |
1106 * | 1122 * |
1107 * Request parameters: | 1123 * Request parameters: |
1108 * | 1124 * |
1109 * [maxResults] - Maximum number of styles to return. Optional. Default is 5. | 1125 * [maxResults] - Maximum number of tables to return. Default is 5. |
1110 * | 1126 * |
1111 * [pageToken] - Continuation token specifying which result page to return. | 1127 * [pageToken] - Continuation token specifying which result page to return. |
1112 * Optional. | |
1113 * | 1128 * |
1114 * Completes with a [TableList]. | 1129 * Completes with a [TableList]. |
1115 * | 1130 * |
1116 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1131 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1117 * error. | 1132 * error. |
1118 * | 1133 * |
1119 * If the used [http.Client] completes with an error when making a REST call, | 1134 * If the used [http.Client] completes with an error when making a REST call, |
1120 * this method will complete with the same error. | 1135 * this method will complete with the same error. |
1121 */ | 1136 */ |
1122 async.Future<TableList> list({core.int maxResults, core.String pageToken}) { | 1137 async.Future<TableList> list({core.int maxResults, core.String pageToken}) { |
1123 var _url = null; | 1138 var _url = null; |
1124 var _queryParams = new core.Map(); | 1139 var _queryParams = new core.Map(); |
1125 var _uploadMedia = null; | 1140 var _uploadMedia = null; |
1126 var _uploadOptions = null; | 1141 var _uploadOptions = null; |
1127 var _downloadOptions = common.DownloadOptions.Metadata; | 1142 var _downloadOptions = commons.DownloadOptions.Metadata; |
1128 var _body = null; | 1143 var _body = null; |
1129 | 1144 |
1130 if (maxResults != null) { | 1145 if (maxResults != null) { |
1131 _queryParams["maxResults"] = ["${maxResults}"]; | 1146 _queryParams["maxResults"] = ["${maxResults}"]; |
1132 } | 1147 } |
1133 if (pageToken != null) { | 1148 if (pageToken != null) { |
1134 _queryParams["pageToken"] = [pageToken]; | 1149 _queryParams["pageToken"] = [pageToken]; |
1135 } | 1150 } |
1136 | 1151 |
1137 | 1152 |
(...skipping 13 matching lines...) Expand all Loading... |
1151 * Updates an existing table. Unless explicitly requested, only the name, | 1166 * Updates an existing table. Unless explicitly requested, only the name, |
1152 * description, and attribution will be updated. This method supports patch | 1167 * description, and attribution will be updated. This method supports patch |
1153 * semantics. | 1168 * semantics. |
1154 * | 1169 * |
1155 * [request] - The metadata request object. | 1170 * [request] - The metadata request object. |
1156 * | 1171 * |
1157 * Request parameters: | 1172 * Request parameters: |
1158 * | 1173 * |
1159 * [tableId] - ID of the table that is being updated. | 1174 * [tableId] - ID of the table that is being updated. |
1160 * | 1175 * |
1161 * [replaceViewDefinition] - Should the view definition also be updated? The | 1176 * [replaceViewDefinition] - Whether the view definition is also updated. The |
1162 * specified view definition replaces the existing one. Only a view can be | 1177 * specified view definition replaces the existing one. Only a view can be |
1163 * updated with a new definition. | 1178 * updated with a new definition. |
1164 * | 1179 * |
1165 * Completes with a [Table]. | 1180 * Completes with a [Table]. |
1166 * | 1181 * |
1167 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1182 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1168 * error. | 1183 * error. |
1169 * | 1184 * |
1170 * If the used [http.Client] completes with an error when making a REST call, | 1185 * If the used [http.Client] completes with an error when making a REST call, |
1171 * this method will complete with the same error. | 1186 * this method will complete with the same error. |
1172 */ | 1187 */ |
1173 async.Future<Table> patch(Table request, core.String tableId, {core.bool repla
ceViewDefinition}) { | 1188 async.Future<Table> patch(Table request, core.String tableId, {core.bool repla
ceViewDefinition}) { |
1174 var _url = null; | 1189 var _url = null; |
1175 var _queryParams = new core.Map(); | 1190 var _queryParams = new core.Map(); |
1176 var _uploadMedia = null; | 1191 var _uploadMedia = null; |
1177 var _uploadOptions = null; | 1192 var _uploadOptions = null; |
1178 var _downloadOptions = common.DownloadOptions.Metadata; | 1193 var _downloadOptions = commons.DownloadOptions.Metadata; |
1179 var _body = null; | 1194 var _body = null; |
1180 | 1195 |
1181 if (request != null) { | 1196 if (request != null) { |
1182 _body = convert.JSON.encode((request).toJson()); | 1197 _body = convert.JSON.encode((request).toJson()); |
1183 } | 1198 } |
1184 if (tableId == null) { | 1199 if (tableId == null) { |
1185 throw new core.ArgumentError("Parameter tableId is required."); | 1200 throw new core.ArgumentError("Parameter tableId is required."); |
1186 } | 1201 } |
1187 if (replaceViewDefinition != null) { | 1202 if (replaceViewDefinition != null) { |
1188 _queryParams["replaceViewDefinition"] = ["${replaceViewDefinition}"]; | 1203 _queryParams["replaceViewDefinition"] = ["${replaceViewDefinition}"]; |
1189 } | 1204 } |
1190 | 1205 |
1191 | 1206 |
1192 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId'); | 1207 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId'); |
1193 | 1208 |
1194 var _response = _requester.request(_url, | 1209 var _response = _requester.request(_url, |
1195 "PATCH", | 1210 "PATCH", |
1196 body: _body, | 1211 body: _body, |
1197 queryParams: _queryParams, | 1212 queryParams: _queryParams, |
1198 uploadOptions: _uploadOptions, | 1213 uploadOptions: _uploadOptions, |
1199 uploadMedia: _uploadMedia, | 1214 uploadMedia: _uploadMedia, |
1200 downloadOptions: _downloadOptions); | 1215 downloadOptions: _downloadOptions); |
1201 return _response.then((data) => new Table.fromJson(data)); | 1216 return _response.then((data) => new Table.fromJson(data)); |
1202 } | 1217 } |
1203 | 1218 |
1204 /** | 1219 /** |
1205 * Replaces rows of an existing table. Current rows remain visible until all | 1220 * Replaces rows of an existing table. Current rows remain visible until all |
1206 * replacement rows are ready. | 1221 * replacement rows are ready. |
1207 * | 1222 * |
1208 * Request parameters: | 1223 * Request parameters: |
1209 * | 1224 * |
1210 * [tableId] - Table whose rows will be replaced. | 1225 * [tableId] - Table whose rows will be replaced. |
1211 * | 1226 * |
1212 * [delimiter] - The delimiter used to separate cell values. This can only | 1227 * [delimiter] - The delimiter used to separate cell values. This can only |
1213 * consist of a single character. Default is ','. | 1228 * consist of a single character. Default is ,. |
1214 * | 1229 * |
1215 * [encoding] - The encoding of the content. Default is UTF-8. Use | 1230 * [encoding] - The encoding of the content. Default is UTF-8. Use |
1216 * 'auto-detect' if you are unsure of the encoding. | 1231 * 'auto-detect' if you are unsure of the encoding. |
1217 * | 1232 * |
1218 * [endLine] - The index of the last line to import, exclusive. 'endLine - | 1233 * [endLine] - The index of the line up to which data will be imported. |
1219 * startLine' rows will be imported. Default is to import through the end of | 1234 * Default is to import the entire file. If endLine is negative, it is an |
1220 * the file. If endLine is negative, it is an offset from the end of the file; | 1235 * offset from the end of the file; the imported content will exclude the last |
1221 * the imported content will exclude the last endLine lines. | 1236 * endLine lines. |
1222 * | 1237 * |
1223 * [isStrict] - Whether the CSV must have the same number of column values for | 1238 * [isStrict] - Whether the imported CSV must have the same number of column |
1224 * each row. If true, throws an exception if the CSV does not not have the | 1239 * values for each row. If true, throws an exception if the CSV does not have |
1225 * same number of columns. If false, rows with fewer column values will be | 1240 * the same number of columns. If false, rows with fewer column values will be |
1226 * padded with empty values. Default is true. | 1241 * padded with empty values. Default is true. |
1227 * | 1242 * |
1228 * [startLine] - The index of the first line from which to start importing, | 1243 * [startLine] - The index of the first line from which to start importing, |
1229 * inclusive. Default is 0. | 1244 * inclusive. Default is 0. |
1230 * | 1245 * |
1231 * [uploadMedia] - The media to upload. | 1246 * [uploadMedia] - The media to upload. |
1232 * | 1247 * |
1233 * [uploadOptions] - Options for the media upload. Streaming Media without the | 1248 * [uploadOptions] - Options for the media upload. Streaming Media without the |
1234 * length being known ahead of time is only supported via resumable uploads. | 1249 * length being known ahead of time is only supported via resumable uploads. |
1235 * | 1250 * |
1236 * Completes with a [Task]. | 1251 * Completes with a [Task]. |
1237 * | 1252 * |
1238 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1253 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1239 * error. | 1254 * error. |
1240 * | 1255 * |
1241 * If the used [http.Client] completes with an error when making a REST call, | 1256 * If the used [http.Client] completes with an error when making a REST call, |
1242 * this method will complete with the same error. | 1257 * this method will complete with the same error. |
1243 */ | 1258 */ |
1244 async.Future<Task> replaceRows(core.String tableId, {core.String delimiter, co
re.String encoding, core.int endLine, core.bool isStrict, core.int startLine, co
mmon.UploadOptions uploadOptions : common.UploadOptions.Default, common.Media up
loadMedia}) { | 1259 async.Future<Task> replaceRows(core.String tableId, {core.String delimiter, co
re.String encoding, core.int endLine, core.bool isStrict, core.int startLine, co
mmons.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media
uploadMedia}) { |
1245 var _url = null; | 1260 var _url = null; |
1246 var _queryParams = new core.Map(); | 1261 var _queryParams = new core.Map(); |
1247 var _uploadMedia = null; | 1262 var _uploadMedia = null; |
1248 var _uploadOptions = null; | 1263 var _uploadOptions = null; |
1249 var _downloadOptions = common.DownloadOptions.Metadata; | 1264 var _downloadOptions = commons.DownloadOptions.Metadata; |
1250 var _body = null; | 1265 var _body = null; |
1251 | 1266 |
1252 if (tableId == null) { | 1267 if (tableId == null) { |
1253 throw new core.ArgumentError("Parameter tableId is required."); | 1268 throw new core.ArgumentError("Parameter tableId is required."); |
1254 } | 1269 } |
1255 if (delimiter != null) { | 1270 if (delimiter != null) { |
1256 _queryParams["delimiter"] = [delimiter]; | 1271 _queryParams["delimiter"] = [delimiter]; |
1257 } | 1272 } |
1258 if (encoding != null) { | 1273 if (encoding != null) { |
1259 _queryParams["encoding"] = [encoding]; | 1274 _queryParams["encoding"] = [encoding]; |
1260 } | 1275 } |
1261 if (endLine != null) { | 1276 if (endLine != null) { |
1262 _queryParams["endLine"] = ["${endLine}"]; | 1277 _queryParams["endLine"] = ["${endLine}"]; |
1263 } | 1278 } |
1264 if (isStrict != null) { | 1279 if (isStrict != null) { |
1265 _queryParams["isStrict"] = ["${isStrict}"]; | 1280 _queryParams["isStrict"] = ["${isStrict}"]; |
1266 } | 1281 } |
1267 if (startLine != null) { | 1282 if (startLine != null) { |
1268 _queryParams["startLine"] = ["${startLine}"]; | 1283 _queryParams["startLine"] = ["${startLine}"]; |
1269 } | 1284 } |
1270 | 1285 |
1271 _uploadMedia = uploadMedia; | 1286 _uploadMedia = uploadMedia; |
1272 _uploadOptions = uploadOptions; | 1287 _uploadOptions = uploadOptions; |
1273 | 1288 |
1274 if (_uploadMedia == null) { | 1289 if (_uploadMedia == null) { |
1275 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/r
eplace'; | 1290 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/replace'; |
1276 } else if (_uploadOptions is common.ResumableUploadOptions) { | 1291 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
1277 _url = '/resumable/upload/fusiontables/v2/tables/' + common_internal.Escap
er.ecapeVariable('$tableId') + '/replace'; | 1292 _url = '/resumable/upload/fusiontables/v2/tables/' + commons.Escaper.ecape
Variable('$tableId') + '/replace'; |
1278 } else { | 1293 } else { |
1279 _url = '/upload/fusiontables/v2/tables/' + common_internal.Escaper.ecapeVa
riable('$tableId') + '/replace'; | 1294 _url = '/upload/fusiontables/v2/tables/' + commons.Escaper.ecapeVariable('
$tableId') + '/replace'; |
1280 } | 1295 } |
1281 | 1296 |
1282 | 1297 |
1283 var _response = _requester.request(_url, | 1298 var _response = _requester.request(_url, |
1284 "POST", | 1299 "POST", |
1285 body: _body, | 1300 body: _body, |
1286 queryParams: _queryParams, | 1301 queryParams: _queryParams, |
1287 uploadOptions: _uploadOptions, | 1302 uploadOptions: _uploadOptions, |
1288 uploadMedia: _uploadMedia, | 1303 uploadMedia: _uploadMedia, |
1289 downloadOptions: _downloadOptions); | 1304 downloadOptions: _downloadOptions); |
1290 return _response.then((data) => new Task.fromJson(data)); | 1305 return _response.then((data) => new Task.fromJson(data)); |
1291 } | 1306 } |
1292 | 1307 |
1293 /** | 1308 /** |
1294 * Updates an existing table. Unless explicitly requested, only the name, | 1309 * Updates an existing table. Unless explicitly requested, only the name, |
1295 * description, and attribution will be updated. | 1310 * description, and attribution will be updated. |
1296 * | 1311 * |
1297 * [request] - The metadata request object. | 1312 * [request] - The metadata request object. |
1298 * | 1313 * |
1299 * Request parameters: | 1314 * Request parameters: |
1300 * | 1315 * |
1301 * [tableId] - ID of the table that is being updated. | 1316 * [tableId] - ID of the table that is being updated. |
1302 * | 1317 * |
1303 * [replaceViewDefinition] - Should the view definition also be updated? The | 1318 * [replaceViewDefinition] - Whether the view definition is also updated. The |
1304 * specified view definition replaces the existing one. Only a view can be | 1319 * specified view definition replaces the existing one. Only a view can be |
1305 * updated with a new definition. | 1320 * updated with a new definition. |
1306 * | 1321 * |
1307 * Completes with a [Table]. | 1322 * Completes with a [Table]. |
1308 * | 1323 * |
1309 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1324 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1310 * error. | 1325 * error. |
1311 * | 1326 * |
1312 * If the used [http.Client] completes with an error when making a REST call, | 1327 * If the used [http.Client] completes with an error when making a REST call, |
1313 * this method will complete with the same error. | 1328 * this method will complete with the same error. |
1314 */ | 1329 */ |
1315 async.Future<Table> update(Table request, core.String tableId, {core.bool repl
aceViewDefinition}) { | 1330 async.Future<Table> update(Table request, core.String tableId, {core.bool repl
aceViewDefinition}) { |
1316 var _url = null; | 1331 var _url = null; |
1317 var _queryParams = new core.Map(); | 1332 var _queryParams = new core.Map(); |
1318 var _uploadMedia = null; | 1333 var _uploadMedia = null; |
1319 var _uploadOptions = null; | 1334 var _uploadOptions = null; |
1320 var _downloadOptions = common.DownloadOptions.Metadata; | 1335 var _downloadOptions = commons.DownloadOptions.Metadata; |
1321 var _body = null; | 1336 var _body = null; |
1322 | 1337 |
1323 if (request != null) { | 1338 if (request != null) { |
1324 _body = convert.JSON.encode((request).toJson()); | 1339 _body = convert.JSON.encode((request).toJson()); |
1325 } | 1340 } |
1326 if (tableId == null) { | 1341 if (tableId == null) { |
1327 throw new core.ArgumentError("Parameter tableId is required."); | 1342 throw new core.ArgumentError("Parameter tableId is required."); |
1328 } | 1343 } |
1329 if (replaceViewDefinition != null) { | 1344 if (replaceViewDefinition != null) { |
1330 _queryParams["replaceViewDefinition"] = ["${replaceViewDefinition}"]; | 1345 _queryParams["replaceViewDefinition"] = ["${replaceViewDefinition}"]; |
1331 } | 1346 } |
1332 | 1347 |
1333 | 1348 |
1334 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId'); | 1349 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId'); |
1335 | 1350 |
1336 var _response = _requester.request(_url, | 1351 var _response = _requester.request(_url, |
1337 "PUT", | 1352 "PUT", |
1338 body: _body, | 1353 body: _body, |
1339 queryParams: _queryParams, | 1354 queryParams: _queryParams, |
1340 uploadOptions: _uploadOptions, | 1355 uploadOptions: _uploadOptions, |
1341 uploadMedia: _uploadMedia, | 1356 uploadMedia: _uploadMedia, |
1342 downloadOptions: _downloadOptions); | 1357 downloadOptions: _downloadOptions); |
1343 return _response.then((data) => new Table.fromJson(data)); | 1358 return _response.then((data) => new Table.fromJson(data)); |
1344 } | 1359 } |
1345 | 1360 |
1346 } | 1361 } |
1347 | 1362 |
1348 | 1363 |
1349 /** Not documented yet. */ | |
1350 class TaskResourceApi { | 1364 class TaskResourceApi { |
1351 final common_internal.ApiRequester _requester; | 1365 final commons.ApiRequester _requester; |
1352 | 1366 |
1353 TaskResourceApi(common_internal.ApiRequester client) : | 1367 TaskResourceApi(commons.ApiRequester client) : |
1354 _requester = client; | 1368 _requester = client; |
1355 | 1369 |
1356 /** | 1370 /** |
1357 * Deletes the task, unless already started. | 1371 * Deletes a specific task by its ID, unless that task has already started |
| 1372 * running. |
1358 * | 1373 * |
1359 * Request parameters: | 1374 * Request parameters: |
1360 * | 1375 * |
1361 * [tableId] - Table from which the task is being deleted. | 1376 * [tableId] - Table from which the task is being deleted. |
1362 * | 1377 * |
1363 * [taskId] - null | 1378 * [taskId] - The identifier of the task to delete. |
1364 * | 1379 * |
1365 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1380 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1366 * error. | 1381 * error. |
1367 * | 1382 * |
1368 * If the used [http.Client] completes with an error when making a REST call, | 1383 * If the used [http.Client] completes with an error when making a REST call, |
1369 * this method will complete with the same error. | 1384 * this method will complete with the same error. |
1370 */ | 1385 */ |
1371 async.Future delete(core.String tableId, core.String taskId) { | 1386 async.Future delete(core.String tableId, core.String taskId) { |
1372 var _url = null; | 1387 var _url = null; |
1373 var _queryParams = new core.Map(); | 1388 var _queryParams = new core.Map(); |
1374 var _uploadMedia = null; | 1389 var _uploadMedia = null; |
1375 var _uploadOptions = null; | 1390 var _uploadOptions = null; |
1376 var _downloadOptions = common.DownloadOptions.Metadata; | 1391 var _downloadOptions = commons.DownloadOptions.Metadata; |
1377 var _body = null; | 1392 var _body = null; |
1378 | 1393 |
1379 if (tableId == null) { | 1394 if (tableId == null) { |
1380 throw new core.ArgumentError("Parameter tableId is required."); | 1395 throw new core.ArgumentError("Parameter tableId is required."); |
1381 } | 1396 } |
1382 if (taskId == null) { | 1397 if (taskId == null) { |
1383 throw new core.ArgumentError("Parameter taskId is required."); | 1398 throw new core.ArgumentError("Parameter taskId is required."); |
1384 } | 1399 } |
1385 | 1400 |
1386 _downloadOptions = null; | 1401 _downloadOptions = null; |
1387 | 1402 |
1388 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tas
ks/' + common_internal.Escaper.ecapeVariable('$taskId'); | 1403 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/tasks/' + c
ommons.Escaper.ecapeVariable('$taskId'); |
1389 | 1404 |
1390 var _response = _requester.request(_url, | 1405 var _response = _requester.request(_url, |
1391 "DELETE", | 1406 "DELETE", |
1392 body: _body, | 1407 body: _body, |
1393 queryParams: _queryParams, | 1408 queryParams: _queryParams, |
1394 uploadOptions: _uploadOptions, | 1409 uploadOptions: _uploadOptions, |
1395 uploadMedia: _uploadMedia, | 1410 uploadMedia: _uploadMedia, |
1396 downloadOptions: _downloadOptions); | 1411 downloadOptions: _downloadOptions); |
1397 return _response.then((data) => null); | 1412 return _response.then((data) => null); |
1398 } | 1413 } |
1399 | 1414 |
1400 /** | 1415 /** |
1401 * Retrieves a specific task by its id. | 1416 * Retrieves a specific task by its ID. |
1402 * | 1417 * |
1403 * Request parameters: | 1418 * Request parameters: |
1404 * | 1419 * |
1405 * [tableId] - Table to which the task belongs. | 1420 * [tableId] - Table to which the task belongs. |
1406 * | 1421 * |
1407 * [taskId] - null | 1422 * [taskId] - The identifier of the task to get. |
1408 * | 1423 * |
1409 * Completes with a [Task]. | 1424 * Completes with a [Task]. |
1410 * | 1425 * |
1411 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1426 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1412 * error. | 1427 * error. |
1413 * | 1428 * |
1414 * If the used [http.Client] completes with an error when making a REST call, | 1429 * If the used [http.Client] completes with an error when making a REST call, |
1415 * this method will complete with the same error. | 1430 * this method will complete with the same error. |
1416 */ | 1431 */ |
1417 async.Future<Task> get(core.String tableId, core.String taskId) { | 1432 async.Future<Task> get(core.String tableId, core.String taskId) { |
1418 var _url = null; | 1433 var _url = null; |
1419 var _queryParams = new core.Map(); | 1434 var _queryParams = new core.Map(); |
1420 var _uploadMedia = null; | 1435 var _uploadMedia = null; |
1421 var _uploadOptions = null; | 1436 var _uploadOptions = null; |
1422 var _downloadOptions = common.DownloadOptions.Metadata; | 1437 var _downloadOptions = commons.DownloadOptions.Metadata; |
1423 var _body = null; | 1438 var _body = null; |
1424 | 1439 |
1425 if (tableId == null) { | 1440 if (tableId == null) { |
1426 throw new core.ArgumentError("Parameter tableId is required."); | 1441 throw new core.ArgumentError("Parameter tableId is required."); |
1427 } | 1442 } |
1428 if (taskId == null) { | 1443 if (taskId == null) { |
1429 throw new core.ArgumentError("Parameter taskId is required."); | 1444 throw new core.ArgumentError("Parameter taskId is required."); |
1430 } | 1445 } |
1431 | 1446 |
1432 | 1447 |
1433 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tas
ks/' + common_internal.Escaper.ecapeVariable('$taskId'); | 1448 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/tasks/' + c
ommons.Escaper.ecapeVariable('$taskId'); |
1434 | 1449 |
1435 var _response = _requester.request(_url, | 1450 var _response = _requester.request(_url, |
1436 "GET", | 1451 "GET", |
1437 body: _body, | 1452 body: _body, |
1438 queryParams: _queryParams, | 1453 queryParams: _queryParams, |
1439 uploadOptions: _uploadOptions, | 1454 uploadOptions: _uploadOptions, |
1440 uploadMedia: _uploadMedia, | 1455 uploadMedia: _uploadMedia, |
1441 downloadOptions: _downloadOptions); | 1456 downloadOptions: _downloadOptions); |
1442 return _response.then((data) => new Task.fromJson(data)); | 1457 return _response.then((data) => new Task.fromJson(data)); |
1443 } | 1458 } |
1444 | 1459 |
1445 /** | 1460 /** |
1446 * Retrieves a list of tasks. | 1461 * Retrieves a list of tasks. |
1447 * | 1462 * |
1448 * Request parameters: | 1463 * Request parameters: |
1449 * | 1464 * |
1450 * [tableId] - Table whose tasks are being listed. | 1465 * [tableId] - Table whose tasks are being listed. |
1451 * | 1466 * |
1452 * [maxResults] - Maximum number of tasks to return. Default is 5. | 1467 * [maxResults] - Maximum number of tasks to return. Default is 5. |
1453 * | 1468 * |
1454 * [pageToken] - Continuation token specifying which result page to return. | 1469 * [pageToken] - Continuation token specifying which result page to return. |
1455 * | 1470 * |
1456 * [startIndex] - Index of the first result returned in the current page. | 1471 * [startIndex] - Index of the first result returned in the current page. |
1457 * | 1472 * |
1458 * Completes with a [TaskList]. | 1473 * Completes with a [TaskList]. |
1459 * | 1474 * |
1460 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1475 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1461 * error. | 1476 * error. |
1462 * | 1477 * |
1463 * If the used [http.Client] completes with an error when making a REST call, | 1478 * If the used [http.Client] completes with an error when making a REST call, |
1464 * this method will complete with the same error. | 1479 * this method will complete with the same error. |
1465 */ | 1480 */ |
1466 async.Future<TaskList> list(core.String tableId, {core.int maxResults, core.St
ring pageToken, core.int startIndex}) { | 1481 async.Future<TaskList> list(core.String tableId, {core.int maxResults, core.St
ring pageToken, core.int startIndex}) { |
1467 var _url = null; | 1482 var _url = null; |
1468 var _queryParams = new core.Map(); | 1483 var _queryParams = new core.Map(); |
1469 var _uploadMedia = null; | 1484 var _uploadMedia = null; |
1470 var _uploadOptions = null; | 1485 var _uploadOptions = null; |
1471 var _downloadOptions = common.DownloadOptions.Metadata; | 1486 var _downloadOptions = commons.DownloadOptions.Metadata; |
1472 var _body = null; | 1487 var _body = null; |
1473 | 1488 |
1474 if (tableId == null) { | 1489 if (tableId == null) { |
1475 throw new core.ArgumentError("Parameter tableId is required."); | 1490 throw new core.ArgumentError("Parameter tableId is required."); |
1476 } | 1491 } |
1477 if (maxResults != null) { | 1492 if (maxResults != null) { |
1478 _queryParams["maxResults"] = ["${maxResults}"]; | 1493 _queryParams["maxResults"] = ["${maxResults}"]; |
1479 } | 1494 } |
1480 if (pageToken != null) { | 1495 if (pageToken != null) { |
1481 _queryParams["pageToken"] = [pageToken]; | 1496 _queryParams["pageToken"] = [pageToken]; |
1482 } | 1497 } |
1483 if (startIndex != null) { | 1498 if (startIndex != null) { |
1484 _queryParams["startIndex"] = ["${startIndex}"]; | 1499 _queryParams["startIndex"] = ["${startIndex}"]; |
1485 } | 1500 } |
1486 | 1501 |
1487 | 1502 |
1488 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tas
ks'; | 1503 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/tasks'; |
1489 | 1504 |
1490 var _response = _requester.request(_url, | 1505 var _response = _requester.request(_url, |
1491 "GET", | 1506 "GET", |
1492 body: _body, | 1507 body: _body, |
1493 queryParams: _queryParams, | 1508 queryParams: _queryParams, |
1494 uploadOptions: _uploadOptions, | 1509 uploadOptions: _uploadOptions, |
1495 uploadMedia: _uploadMedia, | 1510 uploadMedia: _uploadMedia, |
1496 downloadOptions: _downloadOptions); | 1511 downloadOptions: _downloadOptions); |
1497 return _response.then((data) => new TaskList.fromJson(data)); | 1512 return _response.then((data) => new TaskList.fromJson(data)); |
1498 } | 1513 } |
1499 | 1514 |
1500 } | 1515 } |
1501 | 1516 |
1502 | 1517 |
1503 /** Not documented yet. */ | |
1504 class TemplateResourceApi { | 1518 class TemplateResourceApi { |
1505 final common_internal.ApiRequester _requester; | 1519 final commons.ApiRequester _requester; |
1506 | 1520 |
1507 TemplateResourceApi(common_internal.ApiRequester client) : | 1521 TemplateResourceApi(commons.ApiRequester client) : |
1508 _requester = client; | 1522 _requester = client; |
1509 | 1523 |
1510 /** | 1524 /** |
1511 * Deletes a template | 1525 * Deletes a template |
1512 * | 1526 * |
1513 * Request parameters: | 1527 * Request parameters: |
1514 * | 1528 * |
1515 * [tableId] - Table from which the template is being deleted | 1529 * [tableId] - Table from which the template is being deleted |
1516 * | 1530 * |
1517 * [templateId] - Identifier for the template which is being deleted | 1531 * [templateId] - Identifier for the template which is being deleted |
1518 * | 1532 * |
1519 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1520 * error. | 1534 * error. |
1521 * | 1535 * |
1522 * If the used [http.Client] completes with an error when making a REST call, | 1536 * If the used [http.Client] completes with an error when making a REST call, |
1523 * this method will complete with the same error. | 1537 * this method will complete with the same error. |
1524 */ | 1538 */ |
1525 async.Future delete(core.String tableId, core.int templateId) { | 1539 async.Future delete(core.String tableId, core.int templateId) { |
1526 var _url = null; | 1540 var _url = null; |
1527 var _queryParams = new core.Map(); | 1541 var _queryParams = new core.Map(); |
1528 var _uploadMedia = null; | 1542 var _uploadMedia = null; |
1529 var _uploadOptions = null; | 1543 var _uploadOptions = null; |
1530 var _downloadOptions = common.DownloadOptions.Metadata; | 1544 var _downloadOptions = commons.DownloadOptions.Metadata; |
1531 var _body = null; | 1545 var _body = null; |
1532 | 1546 |
1533 if (tableId == null) { | 1547 if (tableId == null) { |
1534 throw new core.ArgumentError("Parameter tableId is required."); | 1548 throw new core.ArgumentError("Parameter tableId is required."); |
1535 } | 1549 } |
1536 if (templateId == null) { | 1550 if (templateId == null) { |
1537 throw new core.ArgumentError("Parameter templateId is required."); | 1551 throw new core.ArgumentError("Parameter templateId is required."); |
1538 } | 1552 } |
1539 | 1553 |
1540 _downloadOptions = null; | 1554 _downloadOptions = null; |
1541 | 1555 |
1542 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tem
plates/' + common_internal.Escaper.ecapeVariable('$templateId'); | 1556 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/templates/'
+ commons.Escaper.ecapeVariable('$templateId'); |
1543 | 1557 |
1544 var _response = _requester.request(_url, | 1558 var _response = _requester.request(_url, |
1545 "DELETE", | 1559 "DELETE", |
1546 body: _body, | 1560 body: _body, |
1547 queryParams: _queryParams, | 1561 queryParams: _queryParams, |
1548 uploadOptions: _uploadOptions, | 1562 uploadOptions: _uploadOptions, |
1549 uploadMedia: _uploadMedia, | 1563 uploadMedia: _uploadMedia, |
1550 downloadOptions: _downloadOptions); | 1564 downloadOptions: _downloadOptions); |
1551 return _response.then((data) => null); | 1565 return _response.then((data) => null); |
1552 } | 1566 } |
1553 | 1567 |
1554 /** | 1568 /** |
1555 * Retrieves a specific template by its id | 1569 * Retrieves a specific template by its id |
1556 * | 1570 * |
1557 * Request parameters: | 1571 * Request parameters: |
1558 * | 1572 * |
1559 * [tableId] - Table to which the template belongs | 1573 * [tableId] - Table to which the template belongs |
1560 * | 1574 * |
1561 * [templateId] - Identifier for the template that is being requested | 1575 * [templateId] - Identifier for the template that is being requested |
1562 * | 1576 * |
1563 * Completes with a [Template]. | 1577 * Completes with a [Template]. |
1564 * | 1578 * |
1565 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1579 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1566 * error. | 1580 * error. |
1567 * | 1581 * |
1568 * If the used [http.Client] completes with an error when making a REST call, | 1582 * If the used [http.Client] completes with an error when making a REST call, |
1569 * this method will complete with the same error. | 1583 * this method will complete with the same error. |
1570 */ | 1584 */ |
1571 async.Future<Template> get(core.String tableId, core.int templateId) { | 1585 async.Future<Template> get(core.String tableId, core.int templateId) { |
1572 var _url = null; | 1586 var _url = null; |
1573 var _queryParams = new core.Map(); | 1587 var _queryParams = new core.Map(); |
1574 var _uploadMedia = null; | 1588 var _uploadMedia = null; |
1575 var _uploadOptions = null; | 1589 var _uploadOptions = null; |
1576 var _downloadOptions = common.DownloadOptions.Metadata; | 1590 var _downloadOptions = commons.DownloadOptions.Metadata; |
1577 var _body = null; | 1591 var _body = null; |
1578 | 1592 |
1579 if (tableId == null) { | 1593 if (tableId == null) { |
1580 throw new core.ArgumentError("Parameter tableId is required."); | 1594 throw new core.ArgumentError("Parameter tableId is required."); |
1581 } | 1595 } |
1582 if (templateId == null) { | 1596 if (templateId == null) { |
1583 throw new core.ArgumentError("Parameter templateId is required."); | 1597 throw new core.ArgumentError("Parameter templateId is required."); |
1584 } | 1598 } |
1585 | 1599 |
1586 | 1600 |
1587 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tem
plates/' + common_internal.Escaper.ecapeVariable('$templateId'); | 1601 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/templates/'
+ commons.Escaper.ecapeVariable('$templateId'); |
1588 | 1602 |
1589 var _response = _requester.request(_url, | 1603 var _response = _requester.request(_url, |
1590 "GET", | 1604 "GET", |
1591 body: _body, | 1605 body: _body, |
1592 queryParams: _queryParams, | 1606 queryParams: _queryParams, |
1593 uploadOptions: _uploadOptions, | 1607 uploadOptions: _uploadOptions, |
1594 uploadMedia: _uploadMedia, | 1608 uploadMedia: _uploadMedia, |
1595 downloadOptions: _downloadOptions); | 1609 downloadOptions: _downloadOptions); |
1596 return _response.then((data) => new Template.fromJson(data)); | 1610 return _response.then((data) => new Template.fromJson(data)); |
1597 } | 1611 } |
1598 | 1612 |
1599 /** | 1613 /** |
1600 * Creates a new template for the table. | 1614 * Creates a new template for the table. |
1601 * | 1615 * |
1602 * [request] - The metadata request object. | 1616 * [request] - The metadata request object. |
1603 * | 1617 * |
1604 * Request parameters: | 1618 * Request parameters: |
1605 * | 1619 * |
1606 * [tableId] - Table for which a new template is being created | 1620 * [tableId] - Table for which a new template is being created |
1607 * | 1621 * |
1608 * Completes with a [Template]. | 1622 * Completes with a [Template]. |
1609 * | 1623 * |
1610 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1624 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1611 * error. | 1625 * error. |
1612 * | 1626 * |
1613 * If the used [http.Client] completes with an error when making a REST call, | 1627 * If the used [http.Client] completes with an error when making a REST call, |
1614 * this method will complete with the same error. | 1628 * this method will complete with the same error. |
1615 */ | 1629 */ |
1616 async.Future<Template> insert(Template request, core.String tableId) { | 1630 async.Future<Template> insert(Template request, core.String tableId) { |
1617 var _url = null; | 1631 var _url = null; |
1618 var _queryParams = new core.Map(); | 1632 var _queryParams = new core.Map(); |
1619 var _uploadMedia = null; | 1633 var _uploadMedia = null; |
1620 var _uploadOptions = null; | 1634 var _uploadOptions = null; |
1621 var _downloadOptions = common.DownloadOptions.Metadata; | 1635 var _downloadOptions = commons.DownloadOptions.Metadata; |
1622 var _body = null; | 1636 var _body = null; |
1623 | 1637 |
1624 if (request != null) { | 1638 if (request != null) { |
1625 _body = convert.JSON.encode((request).toJson()); | 1639 _body = convert.JSON.encode((request).toJson()); |
1626 } | 1640 } |
1627 if (tableId == null) { | 1641 if (tableId == null) { |
1628 throw new core.ArgumentError("Parameter tableId is required."); | 1642 throw new core.ArgumentError("Parameter tableId is required."); |
1629 } | 1643 } |
1630 | 1644 |
1631 | 1645 |
1632 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tem
plates'; | 1646 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/templates'; |
1633 | 1647 |
1634 var _response = _requester.request(_url, | 1648 var _response = _requester.request(_url, |
1635 "POST", | 1649 "POST", |
1636 body: _body, | 1650 body: _body, |
1637 queryParams: _queryParams, | 1651 queryParams: _queryParams, |
1638 uploadOptions: _uploadOptions, | 1652 uploadOptions: _uploadOptions, |
1639 uploadMedia: _uploadMedia, | 1653 uploadMedia: _uploadMedia, |
1640 downloadOptions: _downloadOptions); | 1654 downloadOptions: _downloadOptions); |
1641 return _response.then((data) => new Template.fromJson(data)); | 1655 return _response.then((data) => new Template.fromJson(data)); |
1642 } | 1656 } |
1643 | 1657 |
1644 /** | 1658 /** |
1645 * Retrieves a list of templates. | 1659 * Retrieves a list of templates. |
1646 * | 1660 * |
1647 * Request parameters: | 1661 * Request parameters: |
1648 * | 1662 * |
1649 * [tableId] - Identifier for the table whose templates are being requested | 1663 * [tableId] - Identifier for the table whose templates are being requested |
1650 * | 1664 * |
1651 * [maxResults] - Maximum number of templates to return. Optional. Default is | 1665 * [maxResults] - Maximum number of templates to return. Optional. Default is |
1652 * 5. | 1666 * 5. |
1653 * | 1667 * |
1654 * [pageToken] - Continuation token specifying which results page to return. | 1668 * [pageToken] - Continuation token specifying which results page to return. |
1655 * Optional. | 1669 * Optional. |
1656 * | 1670 * |
1657 * Completes with a [TemplateList]. | 1671 * Completes with a [TemplateList]. |
1658 * | 1672 * |
1659 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1673 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1660 * error. | 1674 * error. |
1661 * | 1675 * |
1662 * If the used [http.Client] completes with an error when making a REST call, | 1676 * If the used [http.Client] completes with an error when making a REST call, |
1663 * this method will complete with the same error. | 1677 * this method will complete with the same error. |
1664 */ | 1678 */ |
1665 async.Future<TemplateList> list(core.String tableId, {core.int maxResults, cor
e.String pageToken}) { | 1679 async.Future<TemplateList> list(core.String tableId, {core.int maxResults, cor
e.String pageToken}) { |
1666 var _url = null; | 1680 var _url = null; |
1667 var _queryParams = new core.Map(); | 1681 var _queryParams = new core.Map(); |
1668 var _uploadMedia = null; | 1682 var _uploadMedia = null; |
1669 var _uploadOptions = null; | 1683 var _uploadOptions = null; |
1670 var _downloadOptions = common.DownloadOptions.Metadata; | 1684 var _downloadOptions = commons.DownloadOptions.Metadata; |
1671 var _body = null; | 1685 var _body = null; |
1672 | 1686 |
1673 if (tableId == null) { | 1687 if (tableId == null) { |
1674 throw new core.ArgumentError("Parameter tableId is required."); | 1688 throw new core.ArgumentError("Parameter tableId is required."); |
1675 } | 1689 } |
1676 if (maxResults != null) { | 1690 if (maxResults != null) { |
1677 _queryParams["maxResults"] = ["${maxResults}"]; | 1691 _queryParams["maxResults"] = ["${maxResults}"]; |
1678 } | 1692 } |
1679 if (pageToken != null) { | 1693 if (pageToken != null) { |
1680 _queryParams["pageToken"] = [pageToken]; | 1694 _queryParams["pageToken"] = [pageToken]; |
1681 } | 1695 } |
1682 | 1696 |
1683 | 1697 |
1684 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tem
plates'; | 1698 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/templates'; |
1685 | 1699 |
1686 var _response = _requester.request(_url, | 1700 var _response = _requester.request(_url, |
1687 "GET", | 1701 "GET", |
1688 body: _body, | 1702 body: _body, |
1689 queryParams: _queryParams, | 1703 queryParams: _queryParams, |
1690 uploadOptions: _uploadOptions, | 1704 uploadOptions: _uploadOptions, |
1691 uploadMedia: _uploadMedia, | 1705 uploadMedia: _uploadMedia, |
1692 downloadOptions: _downloadOptions); | 1706 downloadOptions: _downloadOptions); |
1693 return _response.then((data) => new TemplateList.fromJson(data)); | 1707 return _response.then((data) => new TemplateList.fromJson(data)); |
1694 } | 1708 } |
1695 | 1709 |
1696 /** | 1710 /** |
1697 * Updates an existing template. This method supports patch semantics. | 1711 * Updates an existing template. This method supports patch semantics. |
1698 * | 1712 * |
1699 * [request] - The metadata request object. | 1713 * [request] - The metadata request object. |
1700 * | 1714 * |
1701 * Request parameters: | 1715 * Request parameters: |
1702 * | 1716 * |
1703 * [tableId] - Table to which the updated template belongs | 1717 * [tableId] - Table to which the updated template belongs |
1704 * | 1718 * |
1705 * [templateId] - Identifier for the template that is being updated | 1719 * [templateId] - Identifier for the template that is being updated |
1706 * | 1720 * |
1707 * Completes with a [Template]. | 1721 * Completes with a [Template]. |
1708 * | 1722 * |
1709 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1723 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1710 * error. | 1724 * error. |
1711 * | 1725 * |
1712 * If the used [http.Client] completes with an error when making a REST call, | 1726 * If the used [http.Client] completes with an error when making a REST call, |
1713 * this method will complete with the same error. | 1727 * this method will complete with the same error. |
1714 */ | 1728 */ |
1715 async.Future<Template> patch(Template request, core.String tableId, core.int t
emplateId) { | 1729 async.Future<Template> patch(Template request, core.String tableId, core.int t
emplateId) { |
1716 var _url = null; | 1730 var _url = null; |
1717 var _queryParams = new core.Map(); | 1731 var _queryParams = new core.Map(); |
1718 var _uploadMedia = null; | 1732 var _uploadMedia = null; |
1719 var _uploadOptions = null; | 1733 var _uploadOptions = null; |
1720 var _downloadOptions = common.DownloadOptions.Metadata; | 1734 var _downloadOptions = commons.DownloadOptions.Metadata; |
1721 var _body = null; | 1735 var _body = null; |
1722 | 1736 |
1723 if (request != null) { | 1737 if (request != null) { |
1724 _body = convert.JSON.encode((request).toJson()); | 1738 _body = convert.JSON.encode((request).toJson()); |
1725 } | 1739 } |
1726 if (tableId == null) { | 1740 if (tableId == null) { |
1727 throw new core.ArgumentError("Parameter tableId is required."); | 1741 throw new core.ArgumentError("Parameter tableId is required."); |
1728 } | 1742 } |
1729 if (templateId == null) { | 1743 if (templateId == null) { |
1730 throw new core.ArgumentError("Parameter templateId is required."); | 1744 throw new core.ArgumentError("Parameter templateId is required."); |
1731 } | 1745 } |
1732 | 1746 |
1733 | 1747 |
1734 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tem
plates/' + common_internal.Escaper.ecapeVariable('$templateId'); | 1748 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/templates/'
+ commons.Escaper.ecapeVariable('$templateId'); |
1735 | 1749 |
1736 var _response = _requester.request(_url, | 1750 var _response = _requester.request(_url, |
1737 "PATCH", | 1751 "PATCH", |
1738 body: _body, | 1752 body: _body, |
1739 queryParams: _queryParams, | 1753 queryParams: _queryParams, |
1740 uploadOptions: _uploadOptions, | 1754 uploadOptions: _uploadOptions, |
1741 uploadMedia: _uploadMedia, | 1755 uploadMedia: _uploadMedia, |
1742 downloadOptions: _downloadOptions); | 1756 downloadOptions: _downloadOptions); |
1743 return _response.then((data) => new Template.fromJson(data)); | 1757 return _response.then((data) => new Template.fromJson(data)); |
1744 } | 1758 } |
1745 | 1759 |
1746 /** | 1760 /** |
1747 * Updates an existing template | 1761 * Updates an existing template |
1748 * | 1762 * |
1749 * [request] - The metadata request object. | 1763 * [request] - The metadata request object. |
1750 * | 1764 * |
1751 * Request parameters: | 1765 * Request parameters: |
1752 * | 1766 * |
1753 * [tableId] - Table to which the updated template belongs | 1767 * [tableId] - Table to which the updated template belongs |
1754 * | 1768 * |
1755 * [templateId] - Identifier for the template that is being updated | 1769 * [templateId] - Identifier for the template that is being updated |
1756 * | 1770 * |
1757 * Completes with a [Template]. | 1771 * Completes with a [Template]. |
1758 * | 1772 * |
1759 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1773 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1760 * error. | 1774 * error. |
1761 * | 1775 * |
1762 * If the used [http.Client] completes with an error when making a REST call, | 1776 * If the used [http.Client] completes with an error when making a REST call, |
1763 * this method will complete with the same error. | 1777 * this method will complete with the same error. |
1764 */ | 1778 */ |
1765 async.Future<Template> update(Template request, core.String tableId, core.int
templateId) { | 1779 async.Future<Template> update(Template request, core.String tableId, core.int
templateId) { |
1766 var _url = null; | 1780 var _url = null; |
1767 var _queryParams = new core.Map(); | 1781 var _queryParams = new core.Map(); |
1768 var _uploadMedia = null; | 1782 var _uploadMedia = null; |
1769 var _uploadOptions = null; | 1783 var _uploadOptions = null; |
1770 var _downloadOptions = common.DownloadOptions.Metadata; | 1784 var _downloadOptions = commons.DownloadOptions.Metadata; |
1771 var _body = null; | 1785 var _body = null; |
1772 | 1786 |
1773 if (request != null) { | 1787 if (request != null) { |
1774 _body = convert.JSON.encode((request).toJson()); | 1788 _body = convert.JSON.encode((request).toJson()); |
1775 } | 1789 } |
1776 if (tableId == null) { | 1790 if (tableId == null) { |
1777 throw new core.ArgumentError("Parameter tableId is required."); | 1791 throw new core.ArgumentError("Parameter tableId is required."); |
1778 } | 1792 } |
1779 if (templateId == null) { | 1793 if (templateId == null) { |
1780 throw new core.ArgumentError("Parameter templateId is required."); | 1794 throw new core.ArgumentError("Parameter templateId is required."); |
1781 } | 1795 } |
1782 | 1796 |
1783 | 1797 |
1784 _url = 'tables/' + common_internal.Escaper.ecapeVariable('$tableId') + '/tem
plates/' + common_internal.Escaper.ecapeVariable('$templateId'); | 1798 _url = 'tables/' + commons.Escaper.ecapeVariable('$tableId') + '/templates/'
+ commons.Escaper.ecapeVariable('$templateId'); |
1785 | 1799 |
1786 var _response = _requester.request(_url, | 1800 var _response = _requester.request(_url, |
1787 "PUT", | 1801 "PUT", |
1788 body: _body, | 1802 body: _body, |
1789 queryParams: _queryParams, | 1803 queryParams: _queryParams, |
1790 uploadOptions: _uploadOptions, | 1804 uploadOptions: _uploadOptions, |
1791 uploadMedia: _uploadMedia, | 1805 uploadMedia: _uploadMedia, |
1792 downloadOptions: _downloadOptions); | 1806 downloadOptions: _downloadOptions); |
1793 return _response.then((data) => new Template.fromJson(data)); | 1807 return _response.then((data) => new Template.fromJson(data)); |
1794 } | 1808 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 | 1942 |
1929 /** JSON schema for interpreting JSON in this column. */ | 1943 /** JSON schema for interpreting JSON in this column. */ |
1930 core.String columnJsonSchema; | 1944 core.String columnJsonSchema; |
1931 | 1945 |
1932 /** JSON object containing custom column properties. */ | 1946 /** JSON object containing custom column properties. */ |
1933 core.String columnPropertiesJson; | 1947 core.String columnPropertiesJson; |
1934 | 1948 |
1935 /** Column description. */ | 1949 /** Column description. */ |
1936 core.String description; | 1950 core.String description; |
1937 | 1951 |
1938 /** Format pattern. */ | 1952 /** |
| 1953 * Format pattern. |
| 1954 * Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 DT_DATE_SHORTfor |
| 1955 * example 12/24/08 DT_DATE_TIME_MEDIUMfor example Dec 24, 2008 8:30:45 PM |
| 1956 * DT_DATE_TIME_SHORTfor example 12/24/08 8:30 PM DT_DAY_MONTH_2_DIGIT_YEARfor |
| 1957 * example 24/12/08 DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24/12/08 20:30 |
| 1958 * DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/08 8:30 PM |
| 1959 * DT_DAY_MONTH_4_DIGIT_YEARfor example 24/12/2008 |
| 1960 * DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor example 24/12/2008 20:30 |
| 1961 * DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/2008 8:30 PM |
| 1962 * DT_ISO_YEAR_MONTH_DAYfor example 2008-12-24 DT_ISO_YEAR_MONTH_DAY_TIMEfor |
| 1963 * example 2008-12-24 20:30:45 DT_MONTH_DAY_4_DIGIT_YEARfor example 12/24/2008 |
| 1964 * DT_TIME_LONGfor example 8:30:45 PM UTC-6 DT_TIME_MEDIUMfor example 8:30:45 |
| 1965 * PM DT_TIME_SHORTfor example 8:30 PM DT_YEAR_ONLYfor example 2008 |
| 1966 * HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does not match the data |
| 1967 * type NONENo formatting (default) NUMBER_CURRENCYfor example $1234.56 |
| 1968 * NUMBER_DEFAULTfor example 1,234.56 NUMBER_INTEGERfor example 1235 |
| 1969 * NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example 123,456% |
| 1970 * NUMBER_SCIENTIFICfor example 1E3 STRING_EIGHT_LINE_IMAGEDisplays thumbnail |
| 1971 * images as tall as eight lines of text STRING_FOUR_LINE_IMAGEDisplays |
| 1972 * thumbnail images as tall as four lines of text STRING_JSON_TEXTAllows JSON |
| 1973 * editing of text in UI STRING_LINKTreats cell as a link (must start with |
| 1974 * http:// or https://) STRING_ONE_LINE_IMAGEDisplays thumbnail images as tall |
| 1975 * as one line of text STRING_VIDEO_OR_MAPDisplay a video or map thumbnail |
| 1976 */ |
1939 core.String formatPattern; | 1977 core.String formatPattern; |
1940 | 1978 |
1941 /** | 1979 /** |
1942 * Column graph predicate. | 1980 * Column graph predicate. |
1943 * Used to map table to graph data model (subject,predicate,object) | 1981 * Used to map table to graph data model (subject,predicate,object) |
1944 * See http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#data-model | 1982 * See W3C Graph-based Data Model. |
1945 */ | 1983 */ |
1946 core.String graphPredicate; | 1984 core.String graphPredicate; |
1947 | 1985 |
1948 /** Type name: a template for an individual column. */ | 1986 /** |
| 1987 * The kind of item this is. For a column, this is always fusiontables#column. |
| 1988 */ |
1949 core.String kind; | 1989 core.String kind; |
1950 | 1990 |
1951 /** Name of the column. */ | 1991 /** Name of the column. */ |
1952 core.String name; | 1992 core.String name; |
1953 | 1993 |
1954 /** Type of the column. */ | 1994 /** Type of the column. */ |
1955 core.String type; | 1995 core.String type; |
1956 | 1996 |
1957 /** | 1997 /** |
1958 * List of valid values used to validate data and supply a drop-down list of | 1998 * List of valid values used to validate data and supply a drop-down list of |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2046 return _json; | 2086 return _json; |
2047 } | 2087 } |
2048 } | 2088 } |
2049 | 2089 |
2050 | 2090 |
2051 /** Represents a list of columns in a table. */ | 2091 /** Represents a list of columns in a table. */ |
2052 class ColumnList { | 2092 class ColumnList { |
2053 /** List of all requested columns. */ | 2093 /** List of all requested columns. */ |
2054 core.List<Column> items; | 2094 core.List<Column> items; |
2055 | 2095 |
2056 /** Type name: a list of all columns. */ | 2096 /** |
| 2097 * The kind of item this is. For a column list, this is always |
| 2098 * fusiontables#columnList. |
| 2099 */ |
2057 core.String kind; | 2100 core.String kind; |
2058 | 2101 |
2059 /** | 2102 /** |
2060 * Token used to access the next page of this result. No token is displayed if | 2103 * Token used to access the next page of this result. No token is displayed if |
2061 * there are no more tokens left. | 2104 * there are no more pages left. |
2062 */ | 2105 */ |
2063 core.String nextPageToken; | 2106 core.String nextPageToken; |
2064 | 2107 |
2065 /** Total number of columns for the table. */ | 2108 /** Total number of columns for the table. */ |
2066 core.int totalItems; | 2109 core.int totalItems; |
2067 | 2110 |
2068 | 2111 |
2069 ColumnList(); | 2112 ColumnList(); |
2070 | 2113 |
2071 ColumnList.fromJson(core.Map _json) { | 2114 ColumnList.fromJson(core.Map _json) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 class Geometry { | 2149 class Geometry { |
2107 /** | 2150 /** |
2108 * The list of geometries in this geometry collection. | 2151 * The list of geometries in this geometry collection. |
2109 * | 2152 * |
2110 * The values for Object must be JSON objects. It can consist of `num`, | 2153 * The values for Object must be JSON objects. It can consist of `num`, |
2111 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2154 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2112 */ | 2155 */ |
2113 core.List<core.Object> geometries; | 2156 core.List<core.Object> geometries; |
2114 | 2157 |
2115 /** | 2158 /** |
2116 * Not documented yet. | 2159 * |
2117 * | 2160 * |
2118 * The values for Object must be JSON objects. It can consist of `num`, | 2161 * The values for Object must be JSON objects. It can consist of `num`, |
2119 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2162 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2120 */ | 2163 */ |
2121 core.Object geometry; | 2164 core.Object geometry; |
2122 | 2165 |
2123 /** Type: A collection of geometries. */ | 2166 /** Type: A collection of geometries. */ |
2124 core.String type; | 2167 core.String type; |
2125 | 2168 |
2126 | 2169 |
(...skipping 22 matching lines...) Expand all Loading... |
2149 if (type != null) { | 2192 if (type != null) { |
2150 _json["type"] = type; | 2193 _json["type"] = type; |
2151 } | 2194 } |
2152 return _json; | 2195 return _json; |
2153 } | 2196 } |
2154 } | 2197 } |
2155 | 2198 |
2156 | 2199 |
2157 /** Represents an import request. */ | 2200 /** Represents an import request. */ |
2158 class Import { | 2201 class Import { |
2159 /** Type name: a template for an import request. */ | 2202 /** |
| 2203 * The kind of item this is. For an import, this is always |
| 2204 * fusiontables#import. |
| 2205 */ |
2160 core.String kind; | 2206 core.String kind; |
2161 | 2207 |
2162 /** The number of rows received from the import request. */ | 2208 /** The number of rows received from the import request. */ |
2163 core.String numRowsReceived; | 2209 core.String numRowsReceived; |
2164 | 2210 |
2165 | 2211 |
2166 Import(); | 2212 Import(); |
2167 | 2213 |
2168 Import.fromJson(core.Map _json) { | 2214 Import.fromJson(core.Map _json) { |
2169 if (_json.containsKey("kind")) { | 2215 if (_json.containsKey("kind")) { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2479 _json["strokeWeight"] = strokeWeight; | 2525 _json["strokeWeight"] = strokeWeight; |
2480 } | 2526 } |
2481 if (strokeWeightStyler != null) { | 2527 if (strokeWeightStyler != null) { |
2482 _json["strokeWeightStyler"] = (strokeWeightStyler).toJson(); | 2528 _json["strokeWeightStyler"] = (strokeWeightStyler).toJson(); |
2483 } | 2529 } |
2484 return _json; | 2530 return _json; |
2485 } | 2531 } |
2486 } | 2532 } |
2487 | 2533 |
2488 | 2534 |
2489 /** Represents a response to an sql statement. */ | 2535 /** Represents a response to a SQL statement. */ |
2490 class Sqlresponse { | 2536 class Sqlresponse { |
2491 /** Columns in the table. */ | 2537 /** Columns in the table. */ |
2492 core.List<core.String> columns; | 2538 core.List<core.String> columns; |
2493 | 2539 |
2494 /** Type name: a template for an individual table. */ | 2540 /** |
| 2541 * The kind of item this is. For responses to SQL queries, this is always |
| 2542 * fusiontables#sqlresponse. |
| 2543 */ |
2495 core.String kind; | 2544 core.String kind; |
2496 | 2545 |
2497 /** | 2546 /** |
2498 * The rows in the table. For each cell we print out whatever cell value | 2547 * The rows in the table. For each cell we print out whatever cell value |
2499 * (e.g., numeric, string) exists. Thus it is important that each cell | 2548 * (e.g., numeric, string) exists. Thus it is important that each cell |
2500 * contains only one value. | 2549 * contains only one value. |
2501 * | 2550 * |
2502 * The values for Object must be JSON objects. It can consist of `num`, | 2551 * The values for Object must be JSON objects. It can consist of `num`, |
2503 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2552 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2504 */ | 2553 */ |
(...skipping 23 matching lines...) Expand all Loading... |
2528 _json["kind"] = kind; | 2577 _json["kind"] = kind; |
2529 } | 2578 } |
2530 if (rows != null) { | 2579 if (rows != null) { |
2531 _json["rows"] = rows; | 2580 _json["rows"] = rows; |
2532 } | 2581 } |
2533 return _json; | 2582 return _json; |
2534 } | 2583 } |
2535 } | 2584 } |
2536 | 2585 |
2537 | 2586 |
2538 /** Not documented yet. */ | |
2539 class StyleFunctionGradientColors { | 2587 class StyleFunctionGradientColors { |
2540 /** Color in #RRGGBB format. */ | 2588 /** Color in #RRGGBB format. */ |
2541 core.String color; | 2589 core.String color; |
2542 | 2590 |
2543 /** Opacity of the color: 0.0 (transparent) to 1.0 (opaque). */ | 2591 /** Opacity of the color: 0.0 (transparent) to 1.0 (opaque). */ |
2544 core.double opacity; | 2592 core.double opacity; |
2545 | 2593 |
2546 | 2594 |
2547 StyleFunctionGradientColors(); | 2595 StyleFunctionGradientColors(); |
2548 | 2596 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 /** Name of the column whose value is used in the style. */ | 2677 /** Name of the column whose value is used in the style. */ |
2630 core.String columnName; | 2678 core.String columnName; |
2631 | 2679 |
2632 /** | 2680 /** |
2633 * Gradient function that interpolates a range of colors based on column | 2681 * Gradient function that interpolates a range of colors based on column |
2634 * value. | 2682 * value. |
2635 */ | 2683 */ |
2636 StyleFunctionGradient gradient; | 2684 StyleFunctionGradient gradient; |
2637 | 2685 |
2638 /** | 2686 /** |
2639 * Stylers can be one of three kinds: "fusiontables#fromColumn" if the column | 2687 * Stylers can be one of three kinds: "fusiontables#fromColumn if the column |
2640 * value is to be used as is, i.e., the column values can have colors in | 2688 * value is to be used as is, i.e., the column values can have colors in |
2641 * #RRGGBBAA format or integer line widths or icon names; | 2689 * #RRGGBBAA format or integer line widths or icon names; |
2642 * "fusiontables#gradient" if the styling of the row is to be based on | 2690 * fusiontables#gradient if the styling of the row is to be based on applying |
2643 * applying the gradient function on the column value; or | 2691 * the gradient function on the column value; or fusiontables#buckets if the |
2644 * "fusiontables#buckets" if the styling is to based on the bucket into which | 2692 * styling is to based on the bucket into which the the column value falls. |
2645 * the the column value falls. | |
2646 */ | 2693 */ |
2647 core.String kind; | 2694 core.String kind; |
2648 | 2695 |
2649 | 2696 |
2650 StyleFunction(); | 2697 StyleFunction(); |
2651 | 2698 |
2652 StyleFunction.fromJson(core.Map _json) { | 2699 StyleFunction.fromJson(core.Map _json) { |
2653 if (_json.containsKey("buckets")) { | 2700 if (_json.containsKey("buckets")) { |
2654 buckets = _json["buckets"].map((value) => new Bucket.fromJson(value)).toLi
st(); | 2701 buckets = _json["buckets"].map((value) => new Bucket.fromJson(value)).toLi
st(); |
2655 } | 2702 } |
(...skipping 26 matching lines...) Expand all Loading... |
2682 } | 2729 } |
2683 } | 2730 } |
2684 | 2731 |
2685 | 2732 |
2686 /** | 2733 /** |
2687 * Represents a complete StyleSettings object. The primary key is a combination | 2734 * Represents a complete StyleSettings object. The primary key is a combination |
2688 * of the tableId and a styleId. | 2735 * of the tableId and a styleId. |
2689 */ | 2736 */ |
2690 class StyleSetting { | 2737 class StyleSetting { |
2691 /** | 2738 /** |
2692 * Type name: an individual style setting. A StyleSetting contains the style | 2739 * The kind of item this is. A StyleSetting contains the style definitions for |
2693 * defintions for points, lines, and polygons in a table. Since a table can | 2740 * points, lines, and polygons in a table. Since a table can have any one or |
2694 * have any one or all of them, a style definition can have point, line and | 2741 * all of them, a style definition can have point, line and polygon style |
2695 * polygon style definitions. | 2742 * definitions. |
2696 */ | 2743 */ |
2697 core.String kind; | 2744 core.String kind; |
2698 | 2745 |
2699 /** Style definition for points in the table. */ | 2746 /** Style definition for points in the table. */ |
2700 PointStyle markerOptions; | 2747 PointStyle markerOptions; |
2701 | 2748 |
2702 /** Optional name for the style setting. */ | 2749 /** Optional name for the style setting. */ |
2703 core.String name; | 2750 core.String name; |
2704 | 2751 |
2705 /** Style definition for polygons in the table. */ | 2752 /** Style definition for polygons in the table. */ |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2767 return _json; | 2814 return _json; |
2768 } | 2815 } |
2769 } | 2816 } |
2770 | 2817 |
2771 | 2818 |
2772 /** Represents a list of styles for a given table. */ | 2819 /** Represents a list of styles for a given table. */ |
2773 class StyleSettingList { | 2820 class StyleSettingList { |
2774 /** All requested style settings. */ | 2821 /** All requested style settings. */ |
2775 core.List<StyleSetting> items; | 2822 core.List<StyleSetting> items; |
2776 | 2823 |
2777 /** Type name: in this case, a list of style settings. */ | 2824 /** |
| 2825 * The kind of item this is. For a style list, this is always |
| 2826 * fusiontables#styleSettingList . |
| 2827 */ |
2778 core.String kind; | 2828 core.String kind; |
2779 | 2829 |
2780 /** | 2830 /** |
2781 * Token used to access the next page of this result. No token is displayed if | 2831 * Token used to access the next page of this result. No token is displayed if |
2782 * there are no more styles left. | 2832 * there are no more styles left. |
2783 */ | 2833 */ |
2784 core.String nextPageToken; | 2834 core.String nextPageToken; |
2785 | 2835 |
2786 /** Total number of styles for the table. */ | 2836 /** Total number of styles for the table. */ |
2787 core.int totalItems; | 2837 core.int totalItems; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2839 | 2889 |
2840 /** Columns in the table. */ | 2890 /** Columns in the table. */ |
2841 core.List<Column> columns; | 2891 core.List<Column> columns; |
2842 | 2892 |
2843 /** Description assigned to the table. */ | 2893 /** Description assigned to the table. */ |
2844 core.String description; | 2894 core.String description; |
2845 | 2895 |
2846 /** Variable for whether table is exportable. */ | 2896 /** Variable for whether table is exportable. */ |
2847 core.bool isExportable; | 2897 core.bool isExportable; |
2848 | 2898 |
2849 /** Type name: a template for an individual table. */ | 2899 /** |
| 2900 * The kind of item this is. For a table, this is always fusiontables#table. |
| 2901 */ |
2850 core.String kind; | 2902 core.String kind; |
2851 | 2903 |
2852 /** Name assigned to a table. */ | 2904 /** Name assigned to a table. */ |
2853 core.String name; | 2905 core.String name; |
2854 | 2906 |
2855 /** SQL that encodes the table definition for derived tables. */ | 2907 /** SQL that encodes the table definition for derived tables. */ |
2856 core.String sql; | 2908 core.String sql; |
2857 | 2909 |
2858 /** Encrypted unique alphanumeric identifier for the table. */ | 2910 /** Encrypted unique alphanumeric identifier for the table. */ |
2859 core.String tableId; | 2911 core.String tableId; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2953 return _json; | 3005 return _json; |
2954 } | 3006 } |
2955 } | 3007 } |
2956 | 3008 |
2957 | 3009 |
2958 /** Represents a list of tables. */ | 3010 /** Represents a list of tables. */ |
2959 class TableList { | 3011 class TableList { |
2960 /** List of all requested tables. */ | 3012 /** List of all requested tables. */ |
2961 core.List<Table> items; | 3013 core.List<Table> items; |
2962 | 3014 |
2963 /** Type name: a list of all tables. */ | 3015 /** |
| 3016 * The kind of item this is. For table list, this is always |
| 3017 * fusiontables#tableList. |
| 3018 */ |
2964 core.String kind; | 3019 core.String kind; |
2965 | 3020 |
2966 /** | 3021 /** |
2967 * Token used to access the next page of this result. No token is displayed if | 3022 * Token used to access the next page of this result. No token is displayed if |
2968 * there are no more tokens left. | 3023 * there are no more pages left. |
2969 */ | 3024 */ |
2970 core.String nextPageToken; | 3025 core.String nextPageToken; |
2971 | 3026 |
2972 | 3027 |
2973 TableList(); | 3028 TableList(); |
2974 | 3029 |
2975 TableList.fromJson(core.Map _json) { | 3030 TableList.fromJson(core.Map _json) { |
2976 if (_json.containsKey("items")) { | 3031 if (_json.containsKey("items")) { |
2977 items = _json["items"].map((value) => new Table.fromJson(value)).toList(); | 3032 items = _json["items"].map((value) => new Table.fromJson(value)).toList(); |
2978 } | 3033 } |
(...skipping 15 matching lines...) Expand all Loading... |
2994 } | 3049 } |
2995 if (nextPageToken != null) { | 3050 if (nextPageToken != null) { |
2996 _json["nextPageToken"] = nextPageToken; | 3051 _json["nextPageToken"] = nextPageToken; |
2997 } | 3052 } |
2998 return _json; | 3053 return _json; |
2999 } | 3054 } |
3000 } | 3055 } |
3001 | 3056 |
3002 | 3057 |
3003 /** | 3058 /** |
3004 * A background task on a table, initiated for time and or resource consuming | 3059 * A background task on a table, initiated for time- or resource-consuming |
3005 * operations such as a column type change or delete all rows operation. | 3060 * operations such as changing column types or deleting all rows. |
3006 */ | 3061 */ |
3007 class Task { | 3062 class Task { |
3008 /** Type name: a template for an individual task. */ | 3063 /** Type of the resource. This is always "fusiontables#task". */ |
3009 core.String kind; | 3064 core.String kind; |
3010 | 3065 |
3011 /** Task percentage completion. */ | 3066 /** Task percentage completion. */ |
3012 core.String progress; | 3067 core.String progress; |
3013 | 3068 |
3014 /** | 3069 /** |
3015 * True if the task is in progress, its progress indicator will indicated | 3070 * false while the table is busy with some other task. true if this background |
3016 * where it is, and it can't be deleted. | 3071 * task is currently running. |
3017 */ | 3072 */ |
3018 core.bool started; | 3073 core.bool started; |
3019 | 3074 |
3020 /** Identifier for the task. */ | 3075 /** Identifier for the task. */ |
3021 core.String taskId; | 3076 core.String taskId; |
3022 | 3077 |
3023 /** The type of task being executed in the background. */ | 3078 /** Type of background task. */ |
3024 core.String type; | 3079 core.String type; |
3025 | 3080 |
3026 | 3081 |
3027 Task(); | 3082 Task(); |
3028 | 3083 |
3029 Task.fromJson(core.Map _json) { | 3084 Task.fromJson(core.Map _json) { |
3030 if (_json.containsKey("kind")) { | 3085 if (_json.containsKey("kind")) { |
3031 kind = _json["kind"]; | 3086 kind = _json["kind"]; |
3032 } | 3087 } |
3033 if (_json.containsKey("progress")) { | 3088 if (_json.containsKey("progress")) { |
(...skipping 25 matching lines...) Expand all Loading... |
3059 _json["taskId"] = taskId; | 3114 _json["taskId"] = taskId; |
3060 } | 3115 } |
3061 if (type != null) { | 3116 if (type != null) { |
3062 _json["type"] = type; | 3117 _json["type"] = type; |
3063 } | 3118 } |
3064 return _json; | 3119 return _json; |
3065 } | 3120 } |
3066 } | 3121 } |
3067 | 3122 |
3068 | 3123 |
3069 /** Represents a list of tasks in a table. */ | 3124 /** Represents a list of tasks for a table. */ |
3070 class TaskList { | 3125 class TaskList { |
3071 /** List of all requested tasks. */ | 3126 /** List of all requested tasks. */ |
3072 core.List<Task> items; | 3127 core.List<Task> items; |
3073 | 3128 |
3074 /** Type name: a list of all tasks. */ | 3129 /** Type of the resource. This is always "fusiontables#taskList". */ |
3075 core.String kind; | 3130 core.String kind; |
3076 | 3131 |
3077 /** | 3132 /** |
3078 * Token used to access the next page of this result. No token is displayed if | 3133 * Token used to access the next page of this result. No token is displayed if |
3079 * there are no more tokens left. | 3134 * there are no more pages left. |
3080 */ | 3135 */ |
3081 core.String nextPageToken; | 3136 core.String nextPageToken; |
3082 | 3137 |
3083 /** Total number of tasks for the table. */ | 3138 /** Total number of tasks for the table. */ |
3084 core.int totalItems; | 3139 core.int totalItems; |
3085 | 3140 |
3086 | 3141 |
3087 TaskList(); | 3142 TaskList(); |
3088 | 3143 |
3089 TaskList.fromJson(core.Map _json) { | 3144 TaskList.fromJson(core.Map _json) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3129 core.List<core.String> automaticColumnNames; | 3184 core.List<core.String> automaticColumnNames; |
3130 | 3185 |
3131 /** | 3186 /** |
3132 * Body of the template. It contains HTML with {column_name} to insert values | 3187 * Body of the template. It contains HTML with {column_name} to insert values |
3133 * from a particular column. The body is sanitized to remove certain tags, | 3188 * from a particular column. The body is sanitized to remove certain tags, |
3134 * e.g., script. Only one of body or automaticColumns can be specified. | 3189 * e.g., script. Only one of body or automaticColumns can be specified. |
3135 */ | 3190 */ |
3136 core.String body; | 3191 core.String body; |
3137 | 3192 |
3138 /** | 3193 /** |
3139 * Type name: a template for the info window contents. The template can either | 3194 * The kind of item this is. For a template, this is always |
3140 * include an HTML body or a list of columns from which the template is | 3195 * fusiontables#template. |
3141 * computed automatically. | |
3142 */ | 3196 */ |
3143 core.String kind; | 3197 core.String kind; |
3144 | 3198 |
3145 /** Optional name assigned to a template. */ | 3199 /** Optional name assigned to a template. */ |
3146 core.String name; | 3200 core.String name; |
3147 | 3201 |
3148 /** Identifier for the table for which the template is defined. */ | 3202 /** Identifier for the table for which the template is defined. */ |
3149 core.String tableId; | 3203 core.String tableId; |
3150 | 3204 |
3151 /** | 3205 /** |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3201 return _json; | 3255 return _json; |
3202 } | 3256 } |
3203 } | 3257 } |
3204 | 3258 |
3205 | 3259 |
3206 /** Represents a list of templates for a given table. */ | 3260 /** Represents a list of templates for a given table. */ |
3207 class TemplateList { | 3261 class TemplateList { |
3208 /** List of all requested templates. */ | 3262 /** List of all requested templates. */ |
3209 core.List<Template> items; | 3263 core.List<Template> items; |
3210 | 3264 |
3211 /** Type name: a list of all templates. */ | 3265 /** |
| 3266 * The kind of item this is. For a template list, this is always |
| 3267 * fusiontables#templateList . |
| 3268 */ |
3212 core.String kind; | 3269 core.String kind; |
3213 | 3270 |
3214 /** | 3271 /** |
3215 * Token used to access the next page of this result. No token is displayed if | 3272 * Token used to access the next page of this result. No token is displayed if |
3216 * there are no more tokens left. | 3273 * there are no more pages left. |
3217 */ | 3274 */ |
3218 core.String nextPageToken; | 3275 core.String nextPageToken; |
3219 | 3276 |
3220 /** Total number of templates for the table. */ | 3277 /** Total number of templates for the table. */ |
3221 core.int totalItems; | 3278 core.int totalItems; |
3222 | 3279 |
3223 | 3280 |
3224 TemplateList(); | 3281 TemplateList(); |
3225 | 3282 |
3226 TemplateList.fromJson(core.Map _json) { | 3283 TemplateList.fromJson(core.Map _json) { |
(...skipping 21 matching lines...) Expand all Loading... |
3248 } | 3305 } |
3249 if (nextPageToken != null) { | 3306 if (nextPageToken != null) { |
3250 _json["nextPageToken"] = nextPageToken; | 3307 _json["nextPageToken"] = nextPageToken; |
3251 } | 3308 } |
3252 if (totalItems != null) { | 3309 if (totalItems != null) { |
3253 _json["totalItems"] = totalItems; | 3310 _json["totalItems"] = totalItems; |
3254 } | 3311 } |
3255 return _json; | 3312 return _json; |
3256 } | 3313 } |
3257 } | 3314 } |
3258 | |
3259 | |
OLD | NEW |