device_info_api.dart 5.5 KB

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