manager-app/manager_api_new/lib/api/section_event_api.dart
2025-07-17 12:11:59 +02:00

485 lines
15 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 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<Response> 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 = <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:
///
/// * [String] programmeBlockId (required):
///
/// * [MapAnnotationDTO] mapAnnotationDTO (required):
Future<MapAnnotationDTO?> 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<Response> 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 = <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:
///
/// * [String] sectionEventId (required):
///
/// * [ProgrammeBlockDTO] programmeBlockDTO (required):
Future<ProgrammeBlockDTO?> 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<Response> 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 = <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] mapAnnotationId (required):
Future<String?> 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<Response> 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 = <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] programBlockId (required):
Future<String?> 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<Response>
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 = <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] programBlockId (required):
Future<List<MapAnnotationDTO>?>
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<MapAnnotationDTO>') as List)
.cast<MapAnnotationDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'GET /api/SectionEvent/{sectionEventId}/programmes' operation and returns the [Response].
/// Parameters:
///
/// * [String] sectionEventId (required):
Future<Response> 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 = <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] sectionEventId (required):
Future<List<ProgrammeBlock>?> 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<ProgrammeBlock>') as List)
.cast<ProgrammeBlock>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'PUT /api/SectionEvent/map-annotations' operation and returns the [Response].
/// Parameters:
///
/// * [MapAnnotationDTO] mapAnnotationDTO (required):
Future<Response> sectionEventUpdateMapAnnotationWithHttpInfo(
MapAnnotationDTO mapAnnotationDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionEvent/map-annotations';
// ignore: prefer_final_locals
Object? postBody = mapAnnotationDTO;
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:
///
/// * [MapAnnotationDTO] mapAnnotationDTO (required):
Future<MapAnnotationDTO?> 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<Response> sectionEventUpdateProgrammeBlockWithHttpInfo(
ProgrammeBlockDTO programmeBlockDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionEvent/programmes';
// ignore: prefer_final_locals
Object? postBody = programmeBlockDTO;
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:
///
/// * [ProgrammeBlockDTO] programmeBlockDTO (required):
Future<ProgrammeBlockDTO?> 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;
}
}