// // 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 SectionEventApi { SectionEventApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; /// Performs an HTTP 'POST /api/SectionEvent/{programmeBlockId}/map-annotations' operation and returns the [Response]. /// Parameters: /// /// * [String] programmeBlockId (required): /// /// * [MapAnnotationDTO] mapAnnotationDTO (required): Future sectionEventCreateMapAnnotationWithHttpInfo( String programmeBlockId, MapAnnotationDTO mapAnnotationDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/{programmeBlockId}/map-annotations' .replaceAll('{programmeBlockId}', programmeBlockId); // ignore: prefer_final_locals Object? postBody = mapAnnotationDTO; 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: /// /// * [String] programmeBlockId (required): /// /// * [MapAnnotationDTO] mapAnnotationDTO (required): Future sectionEventCreateMapAnnotation( String programmeBlockId, MapAnnotationDTO mapAnnotationDTO, ) async { final response = await sectionEventCreateMapAnnotationWithHttpInfo( programmeBlockId, mapAnnotationDTO, ); 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), 'MapAnnotationDTO', ) as MapAnnotationDTO; } return null; } /// Performs an HTTP 'POST /api/SectionEvent/{sectionEventId}/programmes' operation and returns the [Response]. /// Parameters: /// /// * [String] sectionEventId (required): /// /// * [ProgrammeBlockDTO] programmeBlockDTO (required): Future sectionEventCreateProgrammeBlockWithHttpInfo( String sectionEventId, ProgrammeBlockDTO programmeBlockDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/{sectionEventId}/programmes' .replaceAll('{sectionEventId}', sectionEventId); // ignore: prefer_final_locals Object? postBody = programmeBlockDTO; 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: /// /// * [String] sectionEventId (required): /// /// * [ProgrammeBlockDTO] programmeBlockDTO (required): Future sectionEventCreateProgrammeBlock( String sectionEventId, ProgrammeBlockDTO programmeBlockDTO, ) async { final response = await sectionEventCreateProgrammeBlockWithHttpInfo( sectionEventId, programmeBlockDTO, ); 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), 'ProgrammeBlockDTO', ) as ProgrammeBlockDTO; } return null; } /// Performs an HTTP 'DELETE /api/SectionEvent/map-annotations/{mapAnnotationId}' operation and returns the [Response]. /// Parameters: /// /// * [String] mapAnnotationId (required): Future sectionEventDeleteMapAnnotationWithHttpInfo( String mapAnnotationId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/map-annotations/{mapAnnotationId}' .replaceAll('{mapAnnotationId}', mapAnnotationId); // 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] mapAnnotationId (required): Future sectionEventDeleteMapAnnotation( String mapAnnotationId, ) async { final response = await sectionEventDeleteMapAnnotationWithHttpInfo( mapAnnotationId, ); 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/SectionEvent/programmes/{programBlockId}' operation and returns the [Response]. /// Parameters: /// /// * [String] programBlockId (required): Future sectionEventDeleteProgrammeBlockWithHttpInfo( String programBlockId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/programmes/{programBlockId}' .replaceAll('{programBlockId}', programBlockId); // 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] programBlockId (required): Future sectionEventDeleteProgrammeBlock( String programBlockId, ) async { final response = await sectionEventDeleteProgrammeBlockWithHttpInfo( programBlockId, ); 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/SectionEvent/{programBlockId}/map-annotations' operation and returns the [Response]. /// Parameters: /// /// * [String] programBlockId (required): Future sectionEventGetAllMapAnnotationsFromProgrammeBlockWithHttpInfo( String programBlockId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/{programBlockId}/map-annotations' .replaceAll('{programBlockId}', programBlockId); // 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] programBlockId (required): Future?> sectionEventGetAllMapAnnotationsFromProgrammeBlock( String programBlockId, ) async { final response = await sectionEventGetAllMapAnnotationsFromProgrammeBlockWithHttpInfo( programBlockId, ); 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/SectionEvent/{sectionEventId}/programmes' operation and returns the [Response]. /// Parameters: /// /// * [String] sectionEventId (required): Future sectionEventGetAllProgrammeBlockFromSectionWithHttpInfo( String sectionEventId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/{sectionEventId}/programmes' .replaceAll('{sectionEventId}', sectionEventId); // 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] sectionEventId (required): Future?> sectionEventGetAllProgrammeBlockFromSection( String sectionEventId, ) async { final response = await sectionEventGetAllProgrammeBlockFromSectionWithHttpInfo( sectionEventId, ); 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 'PUT /api/SectionEvent/map-annotations' operation and returns the [Response]. /// Parameters: /// /// * [MapAnnotationDTO] mapAnnotationDTO (required): Future sectionEventUpdateMapAnnotationWithHttpInfo( MapAnnotationDTO mapAnnotationDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/map-annotations'; // ignore: prefer_final_locals Object? postBody = mapAnnotationDTO; 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: /// /// * [MapAnnotationDTO] mapAnnotationDTO (required): Future sectionEventUpdateMapAnnotation( MapAnnotationDTO mapAnnotationDTO, ) async { final response = await sectionEventUpdateMapAnnotationWithHttpInfo( mapAnnotationDTO, ); 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), 'MapAnnotationDTO', ) as MapAnnotationDTO; } return null; } /// Performs an HTTP 'PUT /api/SectionEvent/programmes' operation and returns the [Response]. /// Parameters: /// /// * [ProgrammeBlockDTO] programmeBlockDTO (required): Future sectionEventUpdateProgrammeBlockWithHttpInfo( ProgrammeBlockDTO programmeBlockDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionEvent/programmes'; // ignore: prefer_final_locals Object? postBody = programmeBlockDTO; 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: /// /// * [ProgrammeBlockDTO] programmeBlockDTO (required): Future sectionEventUpdateProgrammeBlock( ProgrammeBlockDTO programmeBlockDTO, ) async { final response = await sectionEventUpdateProgrammeBlockWithHttpInfo( programmeBlockDTO, ); 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), 'ProgrammeBlockDTO', ) as ProgrammeBlockDTO; } return null; } }