device_info_api.dart 5.5 KB

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