album_api.dart 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. //
  2. // AUTO-GENERATED FILE, DO NOT MODIFY!
  3. //
  4. // @dart=2.12
  5. // ignore_for_file: unused_element, unused_import
  6. // ignore_for_file: always_put_required_named_parameters_first
  7. // ignore_for_file: constant_identifier_names
  8. // ignore_for_file: lines_longer_than_80_chars
  9. part of openapi.api;
  10. class AlbumApi {
  11. AlbumApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
  12. final ApiClient apiClient;
  13. ///
  14. ///
  15. /// Note: This method returns the HTTP [Response].
  16. ///
  17. /// Parameters:
  18. ///
  19. /// * [String] albumId (required):
  20. ///
  21. /// * [AddAssetsDto] addAssetsDto (required):
  22. ///
  23. /// * [String] key:
  24. Future<Response> addAssetsToAlbumWithHttpInfo(String albumId, AddAssetsDto addAssetsDto, { String? key, }) async {
  25. // ignore: prefer_const_declarations
  26. final path = r'/album/{albumId}/assets'
  27. .replaceAll('{albumId}', albumId);
  28. // ignore: prefer_final_locals
  29. Object? postBody = addAssetsDto;
  30. final queryParams = <QueryParam>[];
  31. final headerParams = <String, String>{};
  32. final formParams = <String, String>{};
  33. if (key != null) {
  34. queryParams.addAll(_queryParams('', 'key', key));
  35. }
  36. const contentTypes = <String>['application/json'];
  37. return apiClient.invokeAPI(
  38. path,
  39. 'PUT',
  40. queryParams,
  41. postBody,
  42. headerParams,
  43. formParams,
  44. contentTypes.isEmpty ? null : contentTypes.first,
  45. );
  46. }
  47. ///
  48. ///
  49. /// Parameters:
  50. ///
  51. /// * [String] albumId (required):
  52. ///
  53. /// * [AddAssetsDto] addAssetsDto (required):
  54. ///
  55. /// * [String] key:
  56. Future<AddAssetsResponseDto?> addAssetsToAlbum(String albumId, AddAssetsDto addAssetsDto, { String? key, }) async {
  57. final response = await addAssetsToAlbumWithHttpInfo(albumId, addAssetsDto, key: key, );
  58. if (response.statusCode >= HttpStatus.badRequest) {
  59. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  60. }
  61. // When a remote server returns no body with a status of 204, we shall not decode it.
  62. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  63. // FormatException when trying to decode an empty string.
  64. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  65. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AddAssetsResponseDto',) as AddAssetsResponseDto;
  66. }
  67. return null;
  68. }
  69. ///
  70. ///
  71. /// Note: This method returns the HTTP [Response].
  72. ///
  73. /// Parameters:
  74. ///
  75. /// * [String] albumId (required):
  76. ///
  77. /// * [AddUsersDto] addUsersDto (required):
  78. Future<Response> addUsersToAlbumWithHttpInfo(String albumId, AddUsersDto addUsersDto,) async {
  79. // ignore: prefer_const_declarations
  80. final path = r'/album/{albumId}/users'
  81. .replaceAll('{albumId}', albumId);
  82. // ignore: prefer_final_locals
  83. Object? postBody = addUsersDto;
  84. final queryParams = <QueryParam>[];
  85. final headerParams = <String, String>{};
  86. final formParams = <String, String>{};
  87. const contentTypes = <String>['application/json'];
  88. return apiClient.invokeAPI(
  89. path,
  90. 'PUT',
  91. queryParams,
  92. postBody,
  93. headerParams,
  94. formParams,
  95. contentTypes.isEmpty ? null : contentTypes.first,
  96. );
  97. }
  98. ///
  99. ///
  100. /// Parameters:
  101. ///
  102. /// * [String] albumId (required):
  103. ///
  104. /// * [AddUsersDto] addUsersDto (required):
  105. Future<AlbumResponseDto?> addUsersToAlbum(String albumId, AddUsersDto addUsersDto,) async {
  106. final response = await addUsersToAlbumWithHttpInfo(albumId, addUsersDto,);
  107. if (response.statusCode >= HttpStatus.badRequest) {
  108. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  109. }
  110. // When a remote server returns no body with a status of 204, we shall not decode it.
  111. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  112. // FormatException when trying to decode an empty string.
  113. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  114. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
  115. }
  116. return null;
  117. }
  118. ///
  119. ///
  120. /// Note: This method returns the HTTP [Response].
  121. ///
  122. /// Parameters:
  123. ///
  124. /// * [CreateAlbumDto] createAlbumDto (required):
  125. Future<Response> createAlbumWithHttpInfo(CreateAlbumDto createAlbumDto,) async {
  126. // ignore: prefer_const_declarations
  127. final path = r'/album';
  128. // ignore: prefer_final_locals
  129. Object? postBody = createAlbumDto;
  130. final queryParams = <QueryParam>[];
  131. final headerParams = <String, String>{};
  132. final formParams = <String, String>{};
  133. const contentTypes = <String>['application/json'];
  134. return apiClient.invokeAPI(
  135. path,
  136. 'POST',
  137. queryParams,
  138. postBody,
  139. headerParams,
  140. formParams,
  141. contentTypes.isEmpty ? null : contentTypes.first,
  142. );
  143. }
  144. ///
  145. ///
  146. /// Parameters:
  147. ///
  148. /// * [CreateAlbumDto] createAlbumDto (required):
  149. Future<AlbumResponseDto?> createAlbum(CreateAlbumDto createAlbumDto,) async {
  150. final response = await createAlbumWithHttpInfo(createAlbumDto,);
  151. if (response.statusCode >= HttpStatus.badRequest) {
  152. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  153. }
  154. // When a remote server returns no body with a status of 204, we shall not decode it.
  155. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  156. // FormatException when trying to decode an empty string.
  157. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  158. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
  159. }
  160. return null;
  161. }
  162. ///
  163. ///
  164. /// Note: This method returns the HTTP [Response].
  165. ///
  166. /// Parameters:
  167. ///
  168. /// * [CreateAlbumShareLinkDto] createAlbumShareLinkDto (required):
  169. Future<Response> createAlbumSharedLinkWithHttpInfo(CreateAlbumShareLinkDto createAlbumShareLinkDto,) async {
  170. // ignore: prefer_const_declarations
  171. final path = r'/album/create-shared-link';
  172. // ignore: prefer_final_locals
  173. Object? postBody = createAlbumShareLinkDto;
  174. final queryParams = <QueryParam>[];
  175. final headerParams = <String, String>{};
  176. final formParams = <String, String>{};
  177. const contentTypes = <String>['application/json'];
  178. return apiClient.invokeAPI(
  179. path,
  180. 'POST',
  181. queryParams,
  182. postBody,
  183. headerParams,
  184. formParams,
  185. contentTypes.isEmpty ? null : contentTypes.first,
  186. );
  187. }
  188. ///
  189. ///
  190. /// Parameters:
  191. ///
  192. /// * [CreateAlbumShareLinkDto] createAlbumShareLinkDto (required):
  193. Future<SharedLinkResponseDto?> createAlbumSharedLink(CreateAlbumShareLinkDto createAlbumShareLinkDto,) async {
  194. final response = await createAlbumSharedLinkWithHttpInfo(createAlbumShareLinkDto,);
  195. if (response.statusCode >= HttpStatus.badRequest) {
  196. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  197. }
  198. // When a remote server returns no body with a status of 204, we shall not decode it.
  199. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  200. // FormatException when trying to decode an empty string.
  201. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  202. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
  203. }
  204. return null;
  205. }
  206. ///
  207. ///
  208. /// Note: This method returns the HTTP [Response].
  209. ///
  210. /// Parameters:
  211. ///
  212. /// * [String] albumId (required):
  213. Future<Response> deleteAlbumWithHttpInfo(String albumId,) async {
  214. // ignore: prefer_const_declarations
  215. final path = r'/album/{albumId}'
  216. .replaceAll('{albumId}', albumId);
  217. // ignore: prefer_final_locals
  218. Object? postBody;
  219. final queryParams = <QueryParam>[];
  220. final headerParams = <String, String>{};
  221. final formParams = <String, String>{};
  222. const contentTypes = <String>[];
  223. return apiClient.invokeAPI(
  224. path,
  225. 'DELETE',
  226. queryParams,
  227. postBody,
  228. headerParams,
  229. formParams,
  230. contentTypes.isEmpty ? null : contentTypes.first,
  231. );
  232. }
  233. ///
  234. ///
  235. /// Parameters:
  236. ///
  237. /// * [String] albumId (required):
  238. Future<void> deleteAlbum(String albumId,) async {
  239. final response = await deleteAlbumWithHttpInfo(albumId,);
  240. if (response.statusCode >= HttpStatus.badRequest) {
  241. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  242. }
  243. }
  244. ///
  245. ///
  246. /// Note: This method returns the HTTP [Response].
  247. ///
  248. /// Parameters:
  249. ///
  250. /// * [String] albumId (required):
  251. ///
  252. /// * [String] name:
  253. ///
  254. /// * [num] skip:
  255. ///
  256. /// * [String] key:
  257. Future<Response> downloadArchiveWithHttpInfo(String albumId, { String? name, num? skip, String? key, }) async {
  258. // ignore: prefer_const_declarations
  259. final path = r'/album/{albumId}/download'
  260. .replaceAll('{albumId}', albumId);
  261. // ignore: prefer_final_locals
  262. Object? postBody;
  263. final queryParams = <QueryParam>[];
  264. final headerParams = <String, String>{};
  265. final formParams = <String, String>{};
  266. if (name != null) {
  267. queryParams.addAll(_queryParams('', 'name', name));
  268. }
  269. if (skip != null) {
  270. queryParams.addAll(_queryParams('', 'skip', skip));
  271. }
  272. if (key != null) {
  273. queryParams.addAll(_queryParams('', 'key', key));
  274. }
  275. const contentTypes = <String>[];
  276. return apiClient.invokeAPI(
  277. path,
  278. 'GET',
  279. queryParams,
  280. postBody,
  281. headerParams,
  282. formParams,
  283. contentTypes.isEmpty ? null : contentTypes.first,
  284. );
  285. }
  286. ///
  287. ///
  288. /// Parameters:
  289. ///
  290. /// * [String] albumId (required):
  291. ///
  292. /// * [String] name:
  293. ///
  294. /// * [num] skip:
  295. ///
  296. /// * [String] key:
  297. Future<MultipartFile?> downloadArchive(String albumId, { String? name, num? skip, String? key, }) async {
  298. final response = await downloadArchiveWithHttpInfo(albumId, name: name, skip: skip, key: key, );
  299. if (response.statusCode >= HttpStatus.badRequest) {
  300. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  301. }
  302. // When a remote server returns no body with a status of 204, we shall not decode it.
  303. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  304. // FormatException when trying to decode an empty string.
  305. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  306. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile;
  307. }
  308. return null;
  309. }
  310. ///
  311. ///
  312. /// Note: This method returns the HTTP [Response].
  313. Future<Response> getAlbumCountByUserIdWithHttpInfo() async {
  314. // ignore: prefer_const_declarations
  315. final path = r'/album/count-by-user-id';
  316. // ignore: prefer_final_locals
  317. Object? postBody;
  318. final queryParams = <QueryParam>[];
  319. final headerParams = <String, String>{};
  320. final formParams = <String, String>{};
  321. const contentTypes = <String>[];
  322. return apiClient.invokeAPI(
  323. path,
  324. 'GET',
  325. queryParams,
  326. postBody,
  327. headerParams,
  328. formParams,
  329. contentTypes.isEmpty ? null : contentTypes.first,
  330. );
  331. }
  332. ///
  333. Future<AlbumCountResponseDto?> getAlbumCountByUserId() async {
  334. final response = await getAlbumCountByUserIdWithHttpInfo();
  335. if (response.statusCode >= HttpStatus.badRequest) {
  336. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  337. }
  338. // When a remote server returns no body with a status of 204, we shall not decode it.
  339. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  340. // FormatException when trying to decode an empty string.
  341. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  342. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumCountResponseDto',) as AlbumCountResponseDto;
  343. }
  344. return null;
  345. }
  346. ///
  347. ///
  348. /// Note: This method returns the HTTP [Response].
  349. ///
  350. /// Parameters:
  351. ///
  352. /// * [String] albumId (required):
  353. ///
  354. /// * [String] key:
  355. Future<Response> getAlbumInfoWithHttpInfo(String albumId, { String? key, }) async {
  356. // ignore: prefer_const_declarations
  357. final path = r'/album/{albumId}'
  358. .replaceAll('{albumId}', albumId);
  359. // ignore: prefer_final_locals
  360. Object? postBody;
  361. final queryParams = <QueryParam>[];
  362. final headerParams = <String, String>{};
  363. final formParams = <String, String>{};
  364. if (key != null) {
  365. queryParams.addAll(_queryParams('', 'key', key));
  366. }
  367. const contentTypes = <String>[];
  368. return apiClient.invokeAPI(
  369. path,
  370. 'GET',
  371. queryParams,
  372. postBody,
  373. headerParams,
  374. formParams,
  375. contentTypes.isEmpty ? null : contentTypes.first,
  376. );
  377. }
  378. ///
  379. ///
  380. /// Parameters:
  381. ///
  382. /// * [String] albumId (required):
  383. ///
  384. /// * [String] key:
  385. Future<AlbumResponseDto?> getAlbumInfo(String albumId, { String? key, }) async {
  386. final response = await getAlbumInfoWithHttpInfo(albumId, key: key, );
  387. if (response.statusCode >= HttpStatus.badRequest) {
  388. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  389. }
  390. // When a remote server returns no body with a status of 204, we shall not decode it.
  391. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  392. // FormatException when trying to decode an empty string.
  393. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  394. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
  395. }
  396. return null;
  397. }
  398. ///
  399. ///
  400. /// Note: This method returns the HTTP [Response].
  401. ///
  402. /// Parameters:
  403. ///
  404. /// * [bool] shared:
  405. ///
  406. /// * [String] assetId:
  407. /// Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
  408. Future<Response> getAllAlbumsWithHttpInfo({ bool? shared, String? assetId, }) async {
  409. // ignore: prefer_const_declarations
  410. final path = r'/album';
  411. // ignore: prefer_final_locals
  412. Object? postBody;
  413. final queryParams = <QueryParam>[];
  414. final headerParams = <String, String>{};
  415. final formParams = <String, String>{};
  416. if (shared != null) {
  417. queryParams.addAll(_queryParams('', 'shared', shared));
  418. }
  419. if (assetId != null) {
  420. queryParams.addAll(_queryParams('', 'assetId', assetId));
  421. }
  422. const contentTypes = <String>[];
  423. return apiClient.invokeAPI(
  424. path,
  425. 'GET',
  426. queryParams,
  427. postBody,
  428. headerParams,
  429. formParams,
  430. contentTypes.isEmpty ? null : contentTypes.first,
  431. );
  432. }
  433. ///
  434. ///
  435. /// Parameters:
  436. ///
  437. /// * [bool] shared:
  438. ///
  439. /// * [String] assetId:
  440. /// Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
  441. Future<List<AlbumResponseDto>?> getAllAlbums({ bool? shared, String? assetId, }) async {
  442. final response = await getAllAlbumsWithHttpInfo( shared: shared, assetId: assetId, );
  443. if (response.statusCode >= HttpStatus.badRequest) {
  444. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  445. }
  446. // When a remote server returns no body with a status of 204, we shall not decode it.
  447. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  448. // FormatException when trying to decode an empty string.
  449. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  450. final responseBody = await _decodeBodyBytes(response);
  451. return (await apiClient.deserializeAsync(responseBody, 'List<AlbumResponseDto>') as List)
  452. .cast<AlbumResponseDto>()
  453. .toList();
  454. }
  455. return null;
  456. }
  457. ///
  458. ///
  459. /// Note: This method returns the HTTP [Response].
  460. ///
  461. /// Parameters:
  462. ///
  463. /// * [String] albumId (required):
  464. ///
  465. /// * [RemoveAssetsDto] removeAssetsDto (required):
  466. Future<Response> removeAssetFromAlbumWithHttpInfo(String albumId, RemoveAssetsDto removeAssetsDto,) async {
  467. // ignore: prefer_const_declarations
  468. final path = r'/album/{albumId}/assets'
  469. .replaceAll('{albumId}', albumId);
  470. // ignore: prefer_final_locals
  471. Object? postBody = removeAssetsDto;
  472. final queryParams = <QueryParam>[];
  473. final headerParams = <String, String>{};
  474. final formParams = <String, String>{};
  475. const contentTypes = <String>['application/json'];
  476. return apiClient.invokeAPI(
  477. path,
  478. 'DELETE',
  479. queryParams,
  480. postBody,
  481. headerParams,
  482. formParams,
  483. contentTypes.isEmpty ? null : contentTypes.first,
  484. );
  485. }
  486. ///
  487. ///
  488. /// Parameters:
  489. ///
  490. /// * [String] albumId (required):
  491. ///
  492. /// * [RemoveAssetsDto] removeAssetsDto (required):
  493. Future<AlbumResponseDto?> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto,) async {
  494. final response = await removeAssetFromAlbumWithHttpInfo(albumId, removeAssetsDto,);
  495. if (response.statusCode >= HttpStatus.badRequest) {
  496. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  497. }
  498. // When a remote server returns no body with a status of 204, we shall not decode it.
  499. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  500. // FormatException when trying to decode an empty string.
  501. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  502. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
  503. }
  504. return null;
  505. }
  506. ///
  507. ///
  508. /// Note: This method returns the HTTP [Response].
  509. ///
  510. /// Parameters:
  511. ///
  512. /// * [String] albumId (required):
  513. ///
  514. /// * [String] userId (required):
  515. Future<Response> removeUserFromAlbumWithHttpInfo(String albumId, String userId,) async {
  516. // ignore: prefer_const_declarations
  517. final path = r'/album/{albumId}/user/{userId}'
  518. .replaceAll('{albumId}', albumId)
  519. .replaceAll('{userId}', userId);
  520. // ignore: prefer_final_locals
  521. Object? postBody;
  522. final queryParams = <QueryParam>[];
  523. final headerParams = <String, String>{};
  524. final formParams = <String, String>{};
  525. const contentTypes = <String>[];
  526. return apiClient.invokeAPI(
  527. path,
  528. 'DELETE',
  529. queryParams,
  530. postBody,
  531. headerParams,
  532. formParams,
  533. contentTypes.isEmpty ? null : contentTypes.first,
  534. );
  535. }
  536. ///
  537. ///
  538. /// Parameters:
  539. ///
  540. /// * [String] albumId (required):
  541. ///
  542. /// * [String] userId (required):
  543. Future<void> removeUserFromAlbum(String albumId, String userId,) async {
  544. final response = await removeUserFromAlbumWithHttpInfo(albumId, userId,);
  545. if (response.statusCode >= HttpStatus.badRequest) {
  546. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  547. }
  548. }
  549. ///
  550. ///
  551. /// Note: This method returns the HTTP [Response].
  552. ///
  553. /// Parameters:
  554. ///
  555. /// * [String] albumId (required):
  556. ///
  557. /// * [UpdateAlbumDto] updateAlbumDto (required):
  558. Future<Response> updateAlbumInfoWithHttpInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
  559. // ignore: prefer_const_declarations
  560. final path = r'/album/{albumId}'
  561. .replaceAll('{albumId}', albumId);
  562. // ignore: prefer_final_locals
  563. Object? postBody = updateAlbumDto;
  564. final queryParams = <QueryParam>[];
  565. final headerParams = <String, String>{};
  566. final formParams = <String, String>{};
  567. const contentTypes = <String>['application/json'];
  568. return apiClient.invokeAPI(
  569. path,
  570. 'PATCH',
  571. queryParams,
  572. postBody,
  573. headerParams,
  574. formParams,
  575. contentTypes.isEmpty ? null : contentTypes.first,
  576. );
  577. }
  578. ///
  579. ///
  580. /// Parameters:
  581. ///
  582. /// * [String] albumId (required):
  583. ///
  584. /// * [UpdateAlbumDto] updateAlbumDto (required):
  585. Future<AlbumResponseDto?> updateAlbumInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
  586. final response = await updateAlbumInfoWithHttpInfo(albumId, updateAlbumDto,);
  587. if (response.statusCode >= HttpStatus.badRequest) {
  588. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  589. }
  590. // When a remote server returns no body with a status of 204, we shall not decode it.
  591. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  592. // FormatException when trying to decode an empty string.
  593. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  594. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
  595. }
  596. return null;
  597. }
  598. }