system_config_api.dart 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 SystemConfigApi {
  11. SystemConfigApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
  12. final ApiClient apiClient;
  13. ///
  14. ///
  15. /// Note: This method returns the HTTP [Response].
  16. Future<Response> getConfigWithHttpInfo() async {
  17. // ignore: prefer_const_declarations
  18. final path = r'/system-config';
  19. // ignore: prefer_final_locals
  20. Object? postBody;
  21. final queryParams = <QueryParam>[];
  22. final headerParams = <String, String>{};
  23. final formParams = <String, String>{};
  24. const contentTypes = <String>[];
  25. return apiClient.invokeAPI(
  26. path,
  27. 'GET',
  28. queryParams,
  29. postBody,
  30. headerParams,
  31. formParams,
  32. contentTypes.isEmpty ? null : contentTypes.first,
  33. );
  34. }
  35. ///
  36. Future<SystemConfigDto?> getConfig() async {
  37. final response = await getConfigWithHttpInfo();
  38. if (response.statusCode >= HttpStatus.badRequest) {
  39. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  40. }
  41. // When a remote server returns no body with a status of 204, we shall not decode it.
  42. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  43. // FormatException when trying to decode an empty string.
  44. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  45. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto;
  46. }
  47. return null;
  48. }
  49. ///
  50. ///
  51. /// Note: This method returns the HTTP [Response].
  52. Future<Response> getDefaultsWithHttpInfo() async {
  53. // ignore: prefer_const_declarations
  54. final path = r'/system-config/defaults';
  55. // ignore: prefer_final_locals
  56. Object? postBody;
  57. final queryParams = <QueryParam>[];
  58. final headerParams = <String, String>{};
  59. final formParams = <String, String>{};
  60. const contentTypes = <String>[];
  61. return apiClient.invokeAPI(
  62. path,
  63. 'GET',
  64. queryParams,
  65. postBody,
  66. headerParams,
  67. formParams,
  68. contentTypes.isEmpty ? null : contentTypes.first,
  69. );
  70. }
  71. ///
  72. Future<SystemConfigDto?> getDefaults() async {
  73. final response = await getDefaultsWithHttpInfo();
  74. if (response.statusCode >= HttpStatus.badRequest) {
  75. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  76. }
  77. // When a remote server returns no body with a status of 204, we shall not decode it.
  78. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  79. // FormatException when trying to decode an empty string.
  80. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  81. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto;
  82. }
  83. return null;
  84. }
  85. ///
  86. ///
  87. /// Note: This method returns the HTTP [Response].
  88. Future<Response> getStorageTemplateOptionsWithHttpInfo() async {
  89. // ignore: prefer_const_declarations
  90. final path = r'/system-config/storage-template-options';
  91. // ignore: prefer_final_locals
  92. Object? postBody;
  93. final queryParams = <QueryParam>[];
  94. final headerParams = <String, String>{};
  95. final formParams = <String, String>{};
  96. const contentTypes = <String>[];
  97. return apiClient.invokeAPI(
  98. path,
  99. 'GET',
  100. queryParams,
  101. postBody,
  102. headerParams,
  103. formParams,
  104. contentTypes.isEmpty ? null : contentTypes.first,
  105. );
  106. }
  107. ///
  108. Future<SystemConfigTemplateStorageOptionDto?> getStorageTemplateOptions() async {
  109. final response = await getStorageTemplateOptionsWithHttpInfo();
  110. if (response.statusCode >= HttpStatus.badRequest) {
  111. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  112. }
  113. // When a remote server returns no body with a status of 204, we shall not decode it.
  114. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  115. // FormatException when trying to decode an empty string.
  116. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  117. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigTemplateStorageOptionDto',) as SystemConfigTemplateStorageOptionDto;
  118. }
  119. return null;
  120. }
  121. ///
  122. ///
  123. /// Note: This method returns the HTTP [Response].
  124. ///
  125. /// Parameters:
  126. ///
  127. /// * [SystemConfigDto] systemConfigDto (required):
  128. Future<Response> updateConfigWithHttpInfo(SystemConfigDto systemConfigDto,) async {
  129. // ignore: prefer_const_declarations
  130. final path = r'/system-config';
  131. // ignore: prefer_final_locals
  132. Object? postBody = systemConfigDto;
  133. final queryParams = <QueryParam>[];
  134. final headerParams = <String, String>{};
  135. final formParams = <String, String>{};
  136. const contentTypes = <String>['application/json'];
  137. return apiClient.invokeAPI(
  138. path,
  139. 'PUT',
  140. queryParams,
  141. postBody,
  142. headerParams,
  143. formParams,
  144. contentTypes.isEmpty ? null : contentTypes.first,
  145. );
  146. }
  147. ///
  148. ///
  149. /// Parameters:
  150. ///
  151. /// * [SystemConfigDto] systemConfigDto (required):
  152. Future<SystemConfigDto?> updateConfig(SystemConfigDto systemConfigDto,) async {
  153. final response = await updateConfigWithHttpInfo(systemConfigDto,);
  154. if (response.statusCode >= HttpStatus.badRequest) {
  155. throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  156. }
  157. // When a remote server returns no body with a status of 204, we shall not decode it.
  158. // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  159. // FormatException when trying to decode an empty string.
  160. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
  161. return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto;
  162. }
  163. return null;
  164. }
  165. }