manager-app/manager_api_new/lib/api/section_api.dart
2025-05-22 16:59:29 +02:00

1101 lines
34 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionApi {
SectionApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /api/Section' operation and returns the [Response].
/// Parameters:
///
/// * [SectionDTO] sectionDTO (required):
Future<Response> sectionCreateWithHttpInfo(
SectionDTO sectionDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section';
// ignore: prefer_final_locals
Object? postBody = sectionDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [SectionDTO] sectionDTO (required):
Future<SectionDTO?> sectionCreate(
SectionDTO sectionDTO,
) async {
final response = await sectionCreateWithHttpInfo(
sectionDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'SectionDTO',
) as SectionDTO;
}
return null;
}
/// Performs an HTTP 'DELETE /api/Section/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionDeleteWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<String?> sectionDelete(
String id,
) async {
final response = await sectionDeleteWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
/// Performs an HTTP 'DELETE /api/Section/configuration/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionDeleteAllForConfigurationWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<String?> sectionDeleteAllForConfiguration(
String id,
) async {
final response = await sectionDeleteAllForConfigurationWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
/// Performs an HTTP 'GET /api/Section' operation and returns the [Response].
/// Parameters:
///
/// * [String] instanceId:
Future<Response> sectionGetWithHttpInfo({
String? instanceId,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Section';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (instanceId != null) {
queryParams.addAll(_queryParams('', 'instanceId', instanceId));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] instanceId:
Future<List<SectionDTO>?> sectionGet({
String? instanceId,
}) async {
final response = await sectionGetWithHttpInfo(
instanceId: instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>')
as List)
.cast<SectionDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'GET /api/Section/AgendaDTO' operation and returns the [Response].
Future<Response> sectionGetAgendaDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/AgendaDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<AgendaDTO?> sectionGetAgendaDTO() async {
final response = await sectionGetAgendaDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'AgendaDTO',
) as AgendaDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/beacons/{instanceId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] instanceId (required):
Future<Response> sectionGetAllBeaconsForInstanceWithHttpInfo(
String instanceId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/beacons/{instanceId}'
.replaceAll('{instanceId}', instanceId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] instanceId (required):
Future<List<SectionDTO>?> sectionGetAllBeaconsForInstance(
String instanceId,
) async {
final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(
instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>')
as List)
.cast<SectionDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'GET /api/Section/{id}/subsections' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionGetAllSectionSubSectionsWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/{id}/subsections'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<dynamic> sectionGetAllSectionSubSections(
String id,
) async {
final response = await sectionGetAllSectionSubSectionsWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
/*final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<Object>')
as List)
.cast<Object>()
.toList(growable: false);*/
final decoded = json.decode(await _decodeBodyBytes(response));
return decoded;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/ArticleDTO' operation and returns the [Response].
Future<Response> sectionGetArticleDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/ArticleDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<ArticleDTO?> sectionGetArticleDTO() async {
final response = await sectionGetArticleDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ArticleDTO',
) as ArticleDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<Object?> sectionGetDetail(
String id,
) async {
final response = await sectionGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
/*return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'Object',
) as Object;*/
final decoded = json.decode(await _decodeBodyBytes(response));
return decoded; // <- Ce sera un Map<String, dynamic> ou une List<dynamic> selon le JSON
}
return null;
}
/// Performs an HTTP 'GET /api/Section/configuration/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionGetFromConfigurationWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<List<SectionDTO>?> sectionGetFromConfiguration(
String id,
) async {
final response = await sectionGetFromConfigurationWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>')
as List)
.cast<SectionDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'GET /api/Section/MapDTO' operation and returns the [Response].
Future<Response> sectionGetMapDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/MapDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<MapDTO?> sectionGetMapDTO() async {
final response = await sectionGetMapDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'MapDTO',
) as MapDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/MenuDTO' operation and returns the [Response].
Future<Response> sectionGetMenuDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/MenuDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<MenuDTO?> sectionGetMenuDTO() async {
final response = await sectionGetMenuDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'MenuDTO',
) as MenuDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/PdfDTO' operation and returns the [Response].
Future<Response> sectionGetPdfDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/PdfDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<PdfDTO?> sectionGetPdfDTO() async {
final response = await sectionGetPdfDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PdfDTO',
) as PdfDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/PuzzleDTO' operation and returns the [Response].
Future<Response> sectionGetPuzzleDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/PuzzleDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<PuzzleDTO?> sectionGetPuzzleDTO() async {
final response = await sectionGetPuzzleDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PuzzleDTO',
) as PuzzleDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/QuizDTO' operation and returns the [Response].
Future<Response> sectionGetQuizDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/QuizDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<QuizDTO?> sectionGetQuizDTO() async {
final response = await sectionGetQuizDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'QuizDTO',
) as QuizDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/SliderDTO' operation and returns the [Response].
Future<Response> sectionGetSliderDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/SliderDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<SliderDTO?> sectionGetSliderDTO() async {
final response = await sectionGetSliderDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'SliderDTO',
) as SliderDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/VideoDTO' operation and returns the [Response].
Future<Response> sectionGetVideoDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/VideoDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<VideoDTO?> sectionGetVideoDTO() async {
final response = await sectionGetVideoDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'VideoDTO',
) as VideoDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/WeatherDTO' operation and returns the [Response].
Future<Response> sectionGetWeatherDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/WeatherDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<WeatherDTO?> sectionGetWeatherDTO() async {
final response = await sectionGetWeatherDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'WeatherDTO',
) as WeatherDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/WebDTO' operation and returns the [Response].
Future<Response> sectionGetWebDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/WebDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<WebDTO?> sectionGetWebDTO() async {
final response = await sectionGetWebDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'WebDTO',
) as WebDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/PlayerMessageDTO' operation and returns the [Response].
Future<Response> sectionPlayerMessageDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/PlayerMessageDTO';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<PlayerMessageDTO?> sectionPlayerMessageDTO() async {
final response = await sectionPlayerMessageDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PlayerMessageDTO',
) as PlayerMessageDTO;
}
return null;
}
/// Performs an HTTP 'PUT /api/Section' operation and returns the [Response].
/// Parameters:
///
/// * [Object] body (required):
Future<Response> sectionUpdateWithHttpInfo(
Object body,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section';
// ignore: prefer_final_locals
Object? postBody = body;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [Object] body (required):
Future<Object?> sectionUpdate(
Object body,
) async {
final response = await sectionUpdateWithHttpInfo(
body,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final decoded = json.decode(await _decodeBodyBytes(response));
return decoded;
/*return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'SectionDTO',
) as SectionDTO*/;
}
return null;
}
/// Performs an HTTP 'PUT /api/Section/order' operation and returns the [Response].
/// Parameters:
///
/// * [List<SectionDTO>] sectionDTO (required):
Future<Response> sectionUpdateOrderWithHttpInfo(
List<SectionDTO> sectionDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/order';
// ignore: prefer_final_locals
Object? postBody = sectionDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [List<SectionDTO>] sectionDTO (required):
Future<String?> sectionUpdateOrder(
List<SectionDTO> sectionDTO,
) async {
final response = await sectionUpdateOrderWithHttpInfo(
sectionDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
}