system_config_api.dart 7.7 KB

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