OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.slides.v1; | 3 library googleapis.slides.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 /** | 253 /** |
254 * Generates a thumbnail of the latest version of the specified page in the | 254 * Generates a thumbnail of the latest version of the specified page in the |
255 * presentation and returns a URL to the thumbnail image. | 255 * presentation and returns a URL to the thumbnail image. |
256 * | 256 * |
257 * Request parameters: | 257 * Request parameters: |
258 * | 258 * |
259 * [presentationId] - The ID of the presentation to retrieve. | 259 * [presentationId] - The ID of the presentation to retrieve. |
260 * | 260 * |
261 * [pageObjectId] - The object ID of the page whose thumbnail to retrieve. | 261 * [pageObjectId] - The object ID of the page whose thumbnail to retrieve. |
262 * | 262 * |
263 * [thumbnailProperties_mimeType] - The optional mime type of the thumbnail | |
264 * image. | |
265 * | |
266 * If you don't specify the mime type, the default mime type will be PNG. | |
267 * Possible string values are: | |
268 * - "PNG" : A PNG. | |
269 * | |
270 * [thumbnailProperties_thumbnailSize] - The optional thumbnail image size. | 263 * [thumbnailProperties_thumbnailSize] - The optional thumbnail image size. |
271 * | 264 * |
272 * If you don't specify the size, the server chooses a default size of the | 265 * If you don't specify the size, the server chooses a default size of the |
273 * image. | 266 * image. |
274 * Possible string values are: | 267 * Possible string values are: |
275 * - "THUMBNAIL_SIZE_UNSPECIFIED" : A THUMBNAIL_SIZE_UNSPECIFIED. | 268 * - "THUMBNAIL_SIZE_UNSPECIFIED" : A THUMBNAIL_SIZE_UNSPECIFIED. |
276 * - "LARGE" : A LARGE. | 269 * - "LARGE" : A LARGE. |
277 * | 270 * |
| 271 * [thumbnailProperties_mimeType] - The optional mime type of the thumbnail |
| 272 * image. |
| 273 * |
| 274 * If you don't specify the mime type, the default mime type will be PNG. |
| 275 * Possible string values are: |
| 276 * - "PNG" : A PNG. |
| 277 * |
278 * Completes with a [Thumbnail]. | 278 * Completes with a [Thumbnail]. |
279 * | 279 * |
280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
281 * error. | 281 * error. |
282 * | 282 * |
283 * If the used [http.Client] completes with an error when making a REST call, | 283 * If the used [http.Client] completes with an error when making a REST call, |
284 * this method will complete with the same error. | 284 * this method will complete with the same error. |
285 */ | 285 */ |
286 async.Future<Thumbnail> getThumbnail(core.String presentationId, core.String p
ageObjectId, {core.String thumbnailProperties_mimeType, core.String thumbnailPro
perties_thumbnailSize}) { | 286 async.Future<Thumbnail> getThumbnail(core.String presentationId, core.String p
ageObjectId, {core.String thumbnailProperties_thumbnailSize, core.String thumbna
ilProperties_mimeType}) { |
287 var _url = null; | 287 var _url = null; |
288 var _queryParams = new core.Map(); | 288 var _queryParams = new core.Map(); |
289 var _uploadMedia = null; | 289 var _uploadMedia = null; |
290 var _uploadOptions = null; | 290 var _uploadOptions = null; |
291 var _downloadOptions = commons.DownloadOptions.Metadata; | 291 var _downloadOptions = commons.DownloadOptions.Metadata; |
292 var _body = null; | 292 var _body = null; |
293 | 293 |
294 if (presentationId == null) { | 294 if (presentationId == null) { |
295 throw new core.ArgumentError("Parameter presentationId is required."); | 295 throw new core.ArgumentError("Parameter presentationId is required."); |
296 } | 296 } |
297 if (pageObjectId == null) { | 297 if (pageObjectId == null) { |
298 throw new core.ArgumentError("Parameter pageObjectId is required."); | 298 throw new core.ArgumentError("Parameter pageObjectId is required."); |
299 } | 299 } |
| 300 if (thumbnailProperties_thumbnailSize != null) { |
| 301 _queryParams["thumbnailProperties.thumbnailSize"] = [thumbnailProperties_t
humbnailSize]; |
| 302 } |
300 if (thumbnailProperties_mimeType != null) { | 303 if (thumbnailProperties_mimeType != null) { |
301 _queryParams["thumbnailProperties.mimeType"] = [thumbnailProperties_mimeTy
pe]; | 304 _queryParams["thumbnailProperties.mimeType"] = [thumbnailProperties_mimeTy
pe]; |
302 } | 305 } |
303 if (thumbnailProperties_thumbnailSize != null) { | |
304 _queryParams["thumbnailProperties.thumbnailSize"] = [thumbnailProperties_t
humbnailSize]; | |
305 } | |
306 | 306 |
307 _url = 'v1/presentations/' + commons.Escaper.ecapeVariable('$presentationId'
) + '/pages/' + commons.Escaper.ecapeVariable('$pageObjectId') + '/thumbnail'; | 307 _url = 'v1/presentations/' + commons.Escaper.ecapeVariable('$presentationId'
) + '/pages/' + commons.Escaper.ecapeVariable('$pageObjectId') + '/thumbnail'; |
308 | 308 |
309 var _response = _requester.request(_url, | 309 var _response = _requester.request(_url, |
310 "GET", | 310 "GET", |
311 body: _body, | 311 body: _body, |
312 queryParams: _queryParams, | 312 queryParams: _queryParams, |
313 uploadOptions: _uploadOptions, | 313 uploadOptions: _uploadOptions, |
314 uploadMedia: _uploadMedia, | 314 uploadMedia: _uploadMedia, |
315 downloadOptions: _downloadOptions); | 315 downloadOptions: _downloadOptions); |
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2517 } | 2517 } |
2518 return _json; | 2518 return _json; |
2519 } | 2519 } |
2520 } | 2520 } |
2521 | 2521 |
2522 /** | 2522 /** |
2523 * The properties of Page are only | 2523 * The properties of Page are only |
2524 * relevant for pages with page_type LAYOUT. | 2524 * relevant for pages with page_type LAYOUT. |
2525 */ | 2525 */ |
2526 class LayoutProperties { | 2526 class LayoutProperties { |
2527 /** The human readable name of the layout in the presentation's locale. */ | 2527 /** The human-readable name of the layout. */ |
2528 core.String displayName; | 2528 core.String displayName; |
2529 /** The object ID of the master that this layout is based on. */ | 2529 /** The object ID of the master that this layout is based on. */ |
2530 core.String masterObjectId; | 2530 core.String masterObjectId; |
2531 /** The name of the layout. */ | 2531 /** The name of the layout. */ |
2532 core.String name; | 2532 core.String name; |
2533 | 2533 |
2534 LayoutProperties(); | 2534 LayoutProperties(); |
2535 | 2535 |
2536 LayoutProperties.fromJson(core.Map _json) { | 2536 LayoutProperties.fromJson(core.Map _json) { |
2537 if (_json.containsKey("displayName")) { | 2537 if (_json.containsKey("displayName")) { |
(...skipping 4727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7265 } | 7265 } |
7266 | 7266 |
7267 core.Map<core.String, core.Object> toJson() { | 7267 core.Map<core.String, core.Object> toJson() { |
7268 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7268 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
7269 if (requiredRevisionId != null) { | 7269 if (requiredRevisionId != null) { |
7270 _json["requiredRevisionId"] = requiredRevisionId; | 7270 _json["requiredRevisionId"] = requiredRevisionId; |
7271 } | 7271 } |
7272 return _json; | 7272 return _json; |
7273 } | 7273 } |
7274 } | 7274 } |
OLD | NEW |