// // 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 SectionParcoursApi { SectionParcoursApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; /// Performs an HTTP 'GET /api/SectionParcours/{sectionParcoursId}/guided-path' operation and returns the [Response]. Future sectionParcoursGetAllGuidedPathFromSectionWithHttpInfo( String sectionParcoursId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/{sectionParcoursId}/guided-path' .replaceAll('{sectionParcoursId}', sectionParcoursId); // 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?> sectionParcoursGetAllGuidedPathFromSection( String sectionParcoursId, ) async { final response = await sectionParcoursGetAllGuidedPathFromSectionWithHttpInfo( sectionParcoursId, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } 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 'POST /api/SectionParcours/{sectionParcoursId}/guided-path' operation and returns the [Response]. Future sectionParcoursCreateGuidedPathWithHttpInfo( String sectionParcoursId, GuidedPathDTO guidedPathDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/{sectionParcoursId}/guided-path' .replaceAll('{sectionParcoursId}', sectionParcoursId); // ignore: prefer_final_locals Object? postBody = guidedPathDTO; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'POST', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future sectionParcoursCreateGuidedPath( String sectionParcoursId, GuidedPathDTO guidedPathDTO, ) async { final response = await sectionParcoursCreateGuidedPathWithHttpInfo( sectionParcoursId, guidedPathDTO, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync( await _decodeBodyBytes(response), 'GuidedPathDTO', ) as GuidedPathDTO; } return null; } /// Performs an HTTP 'PUT /api/SectionParcours/guided-path' operation and returns the [Response]. Future sectionParcoursUpdateGuidedPathWithHttpInfo( GuidedPathDTO guidedPathDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/guided-path'; // ignore: prefer_final_locals Object? postBody = guidedPathDTO; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'PUT', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future sectionParcoursUpdateGuidedPath( GuidedPathDTO guidedPathDTO, ) async { final response = await sectionParcoursUpdateGuidedPathWithHttpInfo( guidedPathDTO, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync( await _decodeBodyBytes(response), 'GuidedPathDTO', ) as GuidedPathDTO; } return null; } /// Performs an HTTP 'DELETE /api/SectionParcours/guided-path/{guidedPathId}' operation and returns the [Response]. Future sectionParcoursDeleteGuidedPathWithHttpInfo( String guidedPathId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/guided-path/{guidedPathId}' .replaceAll('{guidedPathId}', guidedPathId); // 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, ); } Future sectionParcoursDeleteGuidedPath( String guidedPathId, ) async { final response = await sectionParcoursDeleteGuidedPathWithHttpInfo( guidedPathId, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } } /// Performs an HTTP 'GET /api/SectionParcours/guided-path/{guidedPathId}/guided-step' operation and returns the [Response]. Future sectionParcoursGetAllGuidedStepFromGuidedPathWithHttpInfo( String guidedPathId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/guided-path/{guidedPathId}/guided-step' .replaceAll('{guidedPathId}', guidedPathId); // 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?> sectionParcoursGetAllGuidedStepFromGuidedPath( String guidedPathId, ) async { final response = await sectionParcoursGetAllGuidedStepFromGuidedPathWithHttpInfo( guidedPathId, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } 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 'POST /api/SectionParcours/guided-path/{guidedPathId}/guided-step' operation and returns the [Response]. Future sectionParcoursCreateGuidedStepWithHttpInfo( String guidedPathId, GuidedStepDTO guidedStepDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/guided-path/{guidedPathId}/guided-step' .replaceAll('{guidedPathId}', guidedPathId); // ignore: prefer_final_locals Object? postBody = guidedStepDTO; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'POST', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future sectionParcoursCreateGuidedStep( String guidedPathId, GuidedStepDTO guidedStepDTO, ) async { final response = await sectionParcoursCreateGuidedStepWithHttpInfo( guidedPathId, guidedStepDTO, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync( await _decodeBodyBytes(response), 'GuidedStepDTO', ) as GuidedStepDTO; } return null; } /// Performs an HTTP 'PUT /api/SectionParcours/guided-step' operation and returns the [Response]. Future sectionParcoursUpdateGuidedStepWithHttpInfo( GuidedStepDTO guidedStepDTO, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/guided-step'; // ignore: prefer_final_locals Object? postBody = guidedStepDTO; final queryParams = []; final headerParams = {}; final formParams = {}; const contentTypes = ['application/json']; return apiClient.invokeAPI( path, 'PUT', queryParams, postBody, headerParams, formParams, contentTypes.isEmpty ? null : contentTypes.first, ); } Future sectionParcoursUpdateGuidedStep( GuidedStepDTO guidedStepDTO, ) async { final response = await sectionParcoursUpdateGuidedStepWithHttpInfo( guidedStepDTO, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { return await apiClient.deserializeAsync( await _decodeBodyBytes(response), 'GuidedStepDTO', ) as GuidedStepDTO; } return null; } /// Performs an HTTP 'DELETE /api/SectionParcours/guided-step/{guidedStepId}' operation and returns the [Response]. Future sectionParcoursDeleteGuidedStepWithHttpInfo( String guidedStepId, ) async { // ignore: prefer_const_declarations final path = r'/api/SectionParcours/guided-step/{guidedStepId}' .replaceAll('{guidedStepId}', guidedStepId); // 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, ); } Future sectionParcoursDeleteGuidedStep( String guidedStepId, ) async { final response = await sectionParcoursDeleteGuidedStepWithHttpInfo( guidedStepId, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } } }