// // 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 sectionCreateWithHttpInfo( SectionDTO sectionDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/Section'; // ignore: prefer_final_locals Object? postBody = sectionDTO; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'POST', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [SectionDTO] sectionDTO (required): Future 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 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 = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'DELETE', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] id (required): Future 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 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 = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'DELETE', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] id (required): Future 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 sectionGetWithHttpInfo({ String? instanceId, }) async { // ignore: prefer_const_declarations final path = r'/api/Section'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; if (instanceId != null) { queryParams.addAll(_queryParams('', 'instanceId', instanceId)); } const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] instanceId: Future?> 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') as List) .cast() .toList(growable: false); } return null; } /// Performs an HTTP 'GET /api/Section/AgendaDTO' operation and returns the [Response]. Future sectionGetAgendaDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/AgendaDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 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 = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] instanceId (required): Future?> 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') as List) .cast() .toList(growable: false); } return null; } /// Performs an HTTP 'GET /api/Section/{id}/subsections' operation and returns the [Response]. /// Parameters: /// /// * [String] id (required): Future 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 = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] id (required): Future 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') as List) .cast() .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 sectionGetArticleDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/ArticleDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 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 = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] id (required): Future 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 ou une List selon le JSON } return null; } /// Performs an HTTP 'GET /api/Section/configuration/{id}' operation and returns the [Response]. /// Parameters: /// /// * [String] id (required): Future 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 = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] id (required): Future?> 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') as List) .cast() .toList(growable: false); } return null; } /// Performs an HTTP 'GET /api/Section/configuration/{id}/detail' operation and returns the [Response]. /// Parameters: /// /// * [String] id (required): Future sectionGetFromConfigurationDetailWithHttpInfo( String id, ) async { // ignore: prefer_const_declarations final path = r'/api/Section/configuration/{id}/detail'.replaceAll('{id}', id); // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [String] id (required): Future sectionGetFromConfigurationDetail( String id, ) async { final response = await sectionGetFromConfigurationDetailWithHttpInfo( 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') as List) .cast() .toList(growable: false);*/ final decoded = json.decode(await _decodeBodyBytes(response)); return decoded; // <- Ce sera un Map ou une List selon le JSON } return null; } /// Performs an HTTP 'GET /api/Section/MapDTO' operation and returns the [Response]. Future sectionGetMapDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/MapDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetMenuDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/MenuDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetPdfDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/PdfDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetPuzzleDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/PuzzleDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetQuizDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/QuizDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetSliderDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/SliderDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetVideoDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/VideoDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetWeatherDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/WeatherDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionGetWebDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/WebDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionPlayerMessageDTOWithHttpInfo() async { // ignore: prefer_const_declarations final path = r'/api/Section/PlayerMessageDTO'; // ignore: prefer_final_locals Object? postBody; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = []; return apiClient.invokeAPI( path, 'GET', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future 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 sectionUpdateWithHttpInfo( Object body, ) async { // ignore: prefer_const_declarations final path = r'/api/Section'; // ignore: prefer_final_locals Object? postBody = body; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'PUT', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [Object] body (required): Future 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 (required): Future sectionUpdateOrderWithHttpInfo( List sectionDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/Section/order'; // ignore: prefer_final_locals Object? postBody = sectionDTO; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'PUT', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } /// Parameters: /// /// * [List] sectionDTO (required): Future sectionUpdateOrder( List 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; } }